By raviyelna
Cost-aware model and effort routing guidance for Claude Code prompts, tools, skills, and subagents.
Self Decide Router is a shared classifier and plugin scaffold for routing Codex and Claude Code work to lower-cost or higher-capability model profiles.
The router classifies both user prompts and visible agent-originated work units such as subagent tasks, skill calls, and tool-heavy phases. It selects a configured model and effort profile, while falling back to quality when the task is risky or uncertain.
src/self_decide_router/: shared routing engine and CLI.plugins/codex-self-decide/: Codex plugin package with skill and hook adapter.plugins/claude-self-decide/: Claude Code plugin package with skill, hook adapter, and sample agents..agents/plugins/marketplace.json: repo-local Codex marketplace entry..claude-plugin/marketplace.json: repo-local Claude Code marketplace entry.examples/self-decide.config.toml: user/project config example.python -m pip install -e .
python -m pytest
python -m self_decide_router.cli classify --text "rename this variable and update references"
python -m self_decide_router.cli classify --text "redesign authentication and migrate the production database"
Use --config examples/self-decide.config.toml to test custom profiles.
The router looks for config in this order:
SELF_DECIDE_CONFIG.self-decide.toml in the current project or one of its parent directories~/.self-decide/config.tomlProject config can restrict selectable profiles with allowed_profiles. When a user profile conflicts with project restrictions, the router chooses the strongest allowed quality profile instead of silently using a blocked profile.
Routing decisions are appended to <repo>/.self-decide/decisions.jsonl by default, including silent hook classifications. The repo root is the nearest parent directory containing .git; outside a git repo, Self Decide uses the current working directory. Inspect recent entries with:
self-decide log --limit 10 --pretty
Summarize estimated savings with:
self-decide monitor --pretty
The monitor compares selected profiles against the strongest allowed profile and reports estimated budget saved plus rough input-token estimates. It is not provider billing: Codex and Claude hooks do not expose actual per-event model usage.
Set [logging].enabled = false or [logging].path = "..." in config to change this behavior.
The plugin hook scripts read JSON from stdin and classify the event. They do not assume the host can mutate an already-started model request. Codex and Claude hooks run in silent, suggestion-only mode because current hooks do not expose a reliable model-switch response contract. Use the CLI directly for visible routing decisions, logs, wrapper scripts, subagent selection, or suggestion-only mode.
Install the Python package first:
python -m pip install -e .
For Codex, add or use the repo marketplace at .agents/plugins/marketplace.json, then install codex-self-decide.
For Claude Code, add the repo marketplace at .claude-plugin/marketplace.json, then install claude-self-decide.
From the repo root:
claude plugin marketplace add ./
claude plugin install claude-self-decide@self-decide-local
claude plugin enable claude-self-decide@self-decide-local
Set Claude plugin profiles from the CLI without manually editing TOML:
self-decide configure-claude --quality sonnet --balanced haiku --cheap haiku
Both plugin directories are self-contained enough to copy into a personal or team marketplace.
Publish this repository as the marketplace source. Keep these paths in the repo:
Self-Decide/
pyproject.toml
src/self_decide_router/
.agents/plugins/marketplace.json
.claude-plugin/marketplace.json
plugins/
codex-self-decide/
claude-self-decide/
Other Claude Code users can install from a clone:
git clone <repo-url>
cd Self-Decide
python -m pip install -e .
claude plugin marketplace add ./
claude plugin install claude-self-decide@self-decide-local
claude plugin enable claude-self-decide@self-decide-local
Other Codex users can add the repo marketplace from .agents/plugins/marketplace.json and install codex-self-decide from the plugins UI.
Before publishing a release:
python -m pytest
claude plugin validate plugins/claude-self-decide
Update plugin and marketplace versions together when tagging releases.
Matches all tools
Hooks run on every tool call, not just specific ones
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub raviyelna/self-decide --plugin claude-self-decideHarness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Superpowers Plus core skills library for Claude Code: planning, execution routing, TDD, debugging, and collaboration workflows
Claude harness - A harness for solo developers (Vibecoders) to handle full-cycle contract development.
Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques
v9.44.1 — Patch release for Gemini environment/version detection and qwen auth gating. Run /octo:setup.
AI-powered development tools for code review, research, design, and workflow automation.