Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By MoxyWolfLLCv0.4.0In 1 marketplace
v0.3.0 (MR-004): the hook recommends and records, never rewrites a tool input unless MODEL_ROUTER_REWRITE=1; a required-floor role launched without a model is denied with the model to use; route.py recommend gives the dispatcher the model before launch; the ledger separates recommended, requested and confirmed launch (post-tool-use). v0.2.0 (CS-007): department-subagent class (ten departments, security never below floor), department and cos_run on the ledger line, route.py aar prints one day after-action report (rates over calls, the selection-effect note, counts under 10 as leads, one decision), score counts distinct sessions. v0.1.0: MR-003. Every tool call is classified by code against a committed ontology (references/call-ontology.json); only calls that carry a model choice (subagent launches, LLM-backed scripts) are routed, by the table or by Jev at the MR-002 bars; every call is written to a per-session ledger under $GSTACK_PEER_REVIEW_DIR/model-routing/ and route.py score counts it. A hook never blocks a call. The hard limit: a hook cannot change the model answering the current turn, only a subagent launch is rewritten.
Trending plugins
7-day copy clicks
Run automatically on Claude Code events. Claude doesn't decide.
1 critical · 2 cautions to review before installing
A hook runs before every tool call and can block or approve it
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Every call a session makes is classified by code against an ontology. Only the calls that carry a model choice ask Jev. Everything is written to a ledger so the ontology and the choices can be reviewed. Design: MR-003 in DESIGN.md.
Version: see .claude-plugin/plugin.json.
A hook cannot change the model answering the current turn. The session sets that. A hook can watch every call, classify it, record it, and rewrite the input of a call before it runs. The only calls that carry a model choice are subagent launches (the Agent tool's model field: haiku, sonnet, opus) and scripts that make their own LLM calls (packet coverage, model selection, the cross-vendor reviewer). Routing lands on subagent launches, as a recommendation (MR-004, below). Script classes are recorded with the tier the table gives them and left alone, because each script chooses its own model. Every other call is classified and ledgered, not rerouted. Don't read this plugin as "every call gets cheaper".
Through 0.2.0 the PreToolUse hook added model to any Agent call that had none, through updatedInput. A host that runs the subagent outside the hook's own environment (the Cowork cloud host, Claude Code 2.1.328, 2026-11-19) refuses every such call: "A plugin hook changed this tool call's input. That is allowed only for calls that run in the same environment as the hook... the call was not made." Every unmodelled Agent launch failed, and the 0.2.0 ledger still wrote routed: true, applied_model: ... for launches that never happened.
From 0.3.0:
recommended_model, requested_model (the model the call itself carries, or null), mutated and launch to the ledger. A call without a model runs on the host's default and is marked inherited: true.review-subagent, the security department) is denied unless the launch names a model at or above the floor that the host allows (haiku < sonnet < opus < fable; an unknown model is denied), whether it names none or names one below, in every mode. The check runs before routing, the table and the ledger, so routing off, a missing table or an unwritable ledger can't let such a launch through, and a failure in the check refuses it. The reason gives the model to relaunch on; the line says launch: refused_floor_unverified. It is never run below its floor. Script reviewers that choose their own model (peer_review.py) are outside the hook; their floor is that script's own.python3 scripts/route.py recommend --subagent-type T [--description D] [--prompt-file F] prints {model, tier, class, decided_by, required_floor} from the same table, Jev and locks, limited to the models the host's Agent tool allows (opus, sonnet, haiku, fable; MODEL_ROUTER_ALLOWED_MODELS overrides). An unclassified role with Jev down gets the floor, never a guess downward. Exit 2 when the tier's model isn't allowed.MODEL_ROUTER_REWRITE=1. Any other value, or none, is the non-mutating default.route.py post-tool-use writes {event: launch, tool_use_id, outcome: returned} when an Agent call ran and returned; that line, matched by tool_use_id, is the only confirmed launch. Wiring it into hooks/hooks.json is a separate, code-owned change.references/call-ontology.json. One entry per call class:
| Field | Meaning |
|---|---|
class | short slug, what the ledger and score count by |
tool | the tool name the hook sees (Read, Grep, Bash, Agent, ...) |
match | null, or {input field: regex}; every regex must match for the entry to apply |
carries_model | true only for Agent classes and the LLM-backed script classes |
default_tier | floor, standard, light or none |
ask | true when Jev is consulted even though the class is known |
The first matching entry wins, in file order, so put specific matches (git) before the catch-all (shell). tiers maps each tier to a model name: floor to opus, standard to sonnet, light to haiku. A call that matches no entry is class unclassified: recorded, counted in the session summary, never rewritten, unless it is an Agent launch, which asks Jev. A review subagent is never moved below floor whatever Jev says.
To add a class: add the entry, run python3 scripts/route.py --selftest and python3 scripts/test_route.py, and move version.
Table. carries_model true and ask false: the tier is the entry's default, the model is written into the launch, the line says decided_by: table. No Jev call, under two seconds.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground
npx claudepluginhub moxywolfllc/moxywolf-plugins --plugin model-router