model-routing
Skill4 starsChanged 6 months agoMITView on GitHub
Routes each subagent to the right model tier (fable, opus, sonnet, haiku) when orchestrating multi-agent work via the Agent tool or Workflow. Use whenever spawning 2+ agents or activating Coordinator Mode. Keeps judgment on Fable (main thread), delegates token-heavy work to cheaper tiers, and enforces handoff packets plus vetting of subagent reports.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- frankxai/skillstheir own version, first seen Sep 30, 2026
- aditya-deokar/software-factorytheir own version, first seen Sep 29, 2026
- lucas-Oliveira-01/agentstheir own version, first seen Sep 28, 2026
- nahid-sparktales/agent-dispatchertheir own version, first seen Sep 21, 2026
- verivus-oss/llm-cli-gatewaytheir own version, first seen Sep 3, 2026
- gaganjainse/shesh-skillstheir own version, first seen Aug 15, 2026
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- Archive228/loopkit★ 756same name
- alinaqi/maggy★ 707same name
- fal-ai-community/skills★ 249same name
- nahid-sparktales/agent-dispatcher★ 59same name
- echo-of-machines/fable-advisor★ 26same name
- cobusgreyling/agent-skills★ 18same name
- verivus-oss/llm-cli-gateway★ 17same name
- FaisalAlqarni/sp-ecc★ 9same name
- naman10parikh/agentgrid★ 9same name
- yeaight7/agent-powerups★ 6same name
5 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 repository5 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- context-budgetSkill
- memory-reviewSkill
- posthog-weeklySkill
- ui-ux-pro-maxSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 9 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
9
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
- Distinctive: line 37
Write the prompt as if the subagent has zero chat context.
- Distinctive: line 43
Stop conditions: if live code contradicts the prompt, a command fails twice after a reasonable retry, or the task needs out-of-scope files, …
- Distinctive: line 45
Prefer parallel subagents (one message, one tool block per agent) when slices are independent.
- Distinctive: line 49
Treat subagent reports as leads, not facts:
- Distinctive: line 51
Before acting on a high-impact finding, reopen the cited files and confirm the line refs or failures yourself.
- Distinctive: line 52
Before opening a PR or reporting work as done, review the final diff against the task in the main thread.
- Distinctive: line 53
Before accepting dismissals (FP, OUTDATED, MOOT), run an adversarial refute pass: skeptic agents with the inverted instruction (prove the …
- Distinctive: line 58
Do not spawn an agent for a single targeted read or an already-known file path: read it directly.
- Very specific: line 60
Run long agents with run_in_background: true and keep orchestrating.
- Distinctive: line 65
When Coordinator Mode triggers (3+ files), apply this mapping to its mandatory minimums:
- Very specific: line 69
Verify: excelsior-verifier runs on opus, in background.
“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
Model Routing for Multi-Agent Orchestration
The main thread (Fable) is the orchestrator, architect, synthesizer, and final judge. Cheaper subagents do bounded, token-heavy work. Never delegate judgment.
Reserved for Fable (main thread, never spawn for this)
- Decomposing ambiguous work into clean parallel slices.
- Architecture, product, security, and payment-flow tradeoffs.
- Reading conflicting subagent reports and deciding what matters.
- Integrating partial implementations into one coherent plan.
- Final review, risk assessment, and user-facing synthesis.
Routing Table
Set the model param explicitly on every Agent call. Default to sonnet when a task does not match a row.
| Task type | model | Why |
| Broad codebase exploration, file/pattern discovery (Explore agents) | sonnet | High read volume, moderate judgment |
| Mechanical reduction: log filtering, test output triage, inventories, classification, link checking | haiku | Zero judgment, maximum volume |
| External docs research, dependency or vendor comparison | sonnet | Needs criteria but not deep tradeoffs |
| Bounded implementation from a precise, file-scoped spec (1 logical unit) | sonnet | Spec quality carries the work |
| Complex implementation, risky refactor, DB migrations, security or payment code | opus | Error cost exceeds the price delta |
| Code review, adversarial verification (excelsior-verifier, refute passes, skeptic agents) | opus | Must independently catch errors from other agents |
| Sub-coordinators that themselves spawn agents (cross-repo, debug session managers) | opus | Orchestration judgment without Fable price |
| Synthesis of conflicting findings, final verdicts, anything ambiguous | fable (stay in main thread) | This is the judgment layer |
Cost anchors per 1M tokens (input/output): haiku $1/$5, sonnet $3/$15, opus $5/$25, fable $10/$50. Fable's tokenizer also emits roughly 30% more tokens for the same content, so its effective cost is about 2.6x opus. Every token kept out of the main thread is saved at the most expensive rate in the catalog.
Handoff Packets (required for every delegated prompt)
Write the prompt as if the subagent has zero chat context. Include:
- Repo path and the exact objective.
- Scope: files, packages, or surfaces in scope, and what is explicitly out of scope.
- Evidence format to return: file paths with line refs, commands run, diffs, failures, uncertainties, stop conditions hit.
- Verification: commands or flows to run, and what success looks like when knowable.
- Stop conditions: if live code contradicts the prompt, a command fails twice after a reasonable retry, or the task needs out-of-scope files, stop and report instead of improvising.
Prefer parallel subagents (one message, one tool block per agent) when slices are independent. Keep blocking or tightly coupled work local.
Vetting Delegated Work
Treat subagent reports as leads, not facts:
- Before acting on a high-impact finding, reopen the cited files and confirm the line refs or failures yourself.
- Before opening a PR or reporting work as done, review the final diff against the task in the main thread.
- Before accepting dismissals (FP, OUTDATED, MOOT), run an adversarial refute pass: skeptic agents with the inverted instruction (prove the bug is still alive on staging/main today).
- PR reviewers must read repo state via
git show origin/branch:path, never the working tree, which may sit on another branch.
Anti-waste Rules
- Do not spawn an agent for a single targeted read or an already-known file path: read it directly.
- Group by file or surface: one finding repeated across 15 lines of one file is 1 agent, not 15.
- Run long agents with
run_in_background: trueand keep orchestrating; never poll. - Verification agents (excelsior-verifier) run in background on opus; do not block reporting structure on them, but do not claim "verified" before they return.
Integration with Coordinator Mode (CLAUDE.md)
When Coordinator Mode triggers (3+ files), apply this mapping to its mandatory minimums:
- Research: the 2+ parallel Explore agents run on
sonnet(orhaikuif purely mechanical inventory). - Implement: workers default to
sonnet; escalate a worker toopuswhen its unit touches migrations, auth, payments, multi-tenant scoping, or cross-repo contracts. - Verify:
excelsior-verifierruns onopus, in background. - Synthesize and final judgment: never delegated, stays in the main thread.
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.

