router
Skill1 starsChanged 23 days agoMITView on GitHub
Check and relaunch subagent work by risk with the model router (`router` on the command line). The hook already picks model and effort on its own; use this skill when the user says "use the router", "verify this", "make it cheap but verified", or when a subtask is high or critical risk and a second subagent has to check it.
18 other projects use a version of this.
Adopted by
Most recently taken up by
- lizzyDeng/claude-skillstheir own version, first seen Nov 8, 2026
- apattichis/agentic-research-toolkittheir own version, first seen Nov 8, 2026
- Wellsonr/skillsettheir own version, first seen Nov 8, 2026
- guang-lee-cn/scaffold-skillstheir own version, first seen Nov 8, 2026
- sam-ash-cy/sams-agentic-workflowtheir own version, first seen Nov 8, 2026
- lubusIN/frappe-skillstheir own version, first seen Nov 4, 2026
Used with
Projects with it also use research and setup.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
NVIDIASkillresearch
Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.
Also in 3 projects that use this
VercelSkillsetup
Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".
Also in 3 projects that use this
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- gamedev-skills/awesome-gamedev-agent-skills★ 6.4ksame name
- grainulation/grainulator★ 86same name
- lubusIN/frappe-skills★ 68same name
- timharris707/skills★ 44same name
- jammyfu/open-game-skills★ 12same name
- Canary-ECAD/eplan-scripting-skill★ 5same name
- Aetherdz/huntpack★ 4same name
- SunCherry/agentic-AI_analog_IC_auto-designer★ 4same name
- Adnova-Group/muster★ 2same name
- guang-lee-cn/scaffold-skills★ 2same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- doctorSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
If the read-only agent answers that it cannot do the task, relaunch with access: write.
- Very specific: line 53
Do not set model on the Agent unless the user asks for it or the task is high risk.
- Distinctive: line 84
Check by risk, never with the subagent that did the work:
- Distinctive: line 106
If it fails, fix the design and repeat once.
- Distinctive: line 112
Do not change cells inside one subagent conversation: the cache is per model.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
The model router inside Claude Code
What already happens on its own: a PreToolUse hook on the Agent tool sets model and effort
on every general-purpose subagent you launch without model, from the kind and the risk of the
task. Declare both on the first line of the subagent's prompt, as kind: review, risk: high. A value
ends the line or is followed by a comma or a full stop, and only the first two lines count, so material
pasted below never sets the risk. A declared value beats what the hook infers from the text, and
critical is never inferred, only declared. The risk is the damage a wrong result does (low: you read it and can redo
it; medium: used without a second read; high: money, customers, production, legal, deletions,
publishing; critical: high and hard to detect), and only you know what the result is for.
Reading work goes to a read-only agent with Read, Grep, Glob, WebFetch and WebSearch only: no edits,
no shell, no MCP, and a fraction of the context per turn. Say it on the first line of every subagent's
prompt: access: read for work that only reads, access: write for anything that edits, saves, runs
commands or uses MCP tools. Only access: read on the first line, a line of declarations only, sends a
subagent to the read-only agent; the hook never guesses it from the wording, which is not safe.
If the read-only agent answers that it cannot do the task, relaunch with access: write. What every
subagent spent is measured when it ends: router stats. When a subagent's result is not good enough,
relaunch the same task higher (set model, or more effort) rather than rephrasing it: the router reads
that as a fail of its first choice and, after a few in the same repository, starts that kind of task
higher there (router project shows it). Keep the declaration line the same when you relaunch, apart
from access: a relaunch counts only for the same kind and risk.
What this skill adds is the rest of the loop: check by risk and relaunch higher on failure.
When not to launch a subagent
A subagent costs two steps before it does anything: writing the brief and reading its answer, and it starts with none of this conversation. Do the work yourself when:
- you would do it in two or three steps;
- it depends on what was said here and does not fit in a brief of a few lines.
Delegate what makes you read a lot (sweeps, logs, long files) and returns a conclusion, and work that runs while you do something else.
Workflows
The hook does not see the agents a workflow script spawns: they run on the session's model and effort
unless the script names them. Measured, they show in router stats all the same. Give every agent()
call its own options from the router, by the kind and risk of that stage:
router plan --kind search --risk low --workflow # {model: 'haiku', effort: 'medium'}When to step in yourself
- Do not set
modelon the Agent unless the user asks for it or the task is high risk. If you set it, the hook keeps it, unless that model is over its usage limit: then the launch is refused with the time it resets, and a launch withoutmodelgoes to an available one. - Agents defined in
.claude/agents/*.mdwith amodelof their own do not go through the hook: their frontmatter rules. One with no model, ormodel: inherit, gets its model from the hook and keeps its type.router agentssays, from what they spent and how often they were repeated, which look too high or too low; the change is the user's. - High or critical risk (production, money, customers, deletions, legal): follow the steps below. The hook does not do this part.
- A repository can raise the risk from what its briefs say, in
.claude/model-router.json(its risk floors), never lower it;router projectlists the rules and how often each fired. - A model over its usage limit is refused until its reset, which the session context and
router limitsgive; launch withoutmodeland the hook picks an available one.
The plugin brings the router command; until the first session has built its environment it says
"not ready yet", and after that router doctor explains anything that fails.
Steps for a subtask with risk
Plan, at no cost:
router plan "<the subtask in one sentence>" --kind <kind> --risk <risk>Kinds: classify, extract, summarize, search, chat, write, code, review, analysis, agentic (research counts as search, writing as write, summary / extraction / classification as their verbs). Risks: low, medium, high, critical. It prints the classification and the start cell.
- Launch the subagent with the
modelandeffortof the start cell and the full brief. - Check by risk, never with the subagent that did the work:
- low or medium: accept.
- high: check the result against the brief yourself, or with a test (run it, validate the JSON).
- critical: launch another subagent without
model, first linekind: review, risk: critical, fresh context, with the brief and the result, and ask it forpassed / reason / issues. The hook keeps it off the chat's model.
- On failure, relaunch the task one step up (set
model, or more effort) with the reason for the failure in the brief and the same declaration line. Stop when it passes, or when the cost is not worth it. - In the final message say which cell solved it and how many attempts it took.
Verifying your own design
You, the main chat, have no automatic verifier or escalation: no hook can change your model. When the design is yours and it touches production, money, customers or deletions:
- Launch a general-purpose subagent without
modelwhose first line iskind: review, risk: critical, with the brief, the full design and the request forpassed / reason / issues. - The hook sends it to a model other than yours (for example, with the chat on Opus, the review runs on fable/low). You will see "cross-checked against the chat" in the notice.
- If it fails, fix the design and repeat once; if it fails again, tell the user before running anything.
Rules
- A test beats any judge. If there are tests, the verdict is "they pass or they don't".
- Do not change cells inside one subagent conversation: the cache is per model.
- The hook's decisions are kept in
<profile>/model-router/hook.jsonl;router statssummarises them.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

