model-router
Skill0 starsChanged 7 months agoMITView on GitHub
Classify a task and recommend the optimal model tier (Opus/Sonnet/Haiku) based on reasoning complexity, output length, and cost sensitivity. Produces a routing decision with rationale and estimated cost delta.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- tance-mang/chinese-webnovel-skillstheir own version, first seen Nov 8, 2026
- hamzzaqureshi/gravidextheir own version, first seen Nov 8, 2026
- uniqaiapp/model-routertheir own version, first seen Nov 1, 2026
- francoisdp/skillstheir own version, first seen Oct 22, 2026
- yosukekurita-rgb/model-routertheir own version, first seen Oct 20, 2026
- Zelray/hermes-model-routertheir own version, first seen Oct 20, 2026
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- tance-mang/chinese-webnovel-skills★ 97same name
- nidhi-singh02/agent-router★ 87same name
- RandomNest/aivideo-production-skills★ 15same name
- manishk753/claude-model-router★ 3same name
- francoisdp/skills★ 2same name
- NorkzYT/claude-code-autopilot★ 2same name
- hamzzaqureshi/gravidex★ 1same name
- mehtab78/skills★ 1same name
- tammai/bigin-skills★ 1same name
- Zelray/hermes-model-router★ 1same name
7 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 repository24 other files it gives its agents.
- aarSkill
- agent-cost-modelSkill
- banana-makerSkill
- bitter-lesson-scorecardSkill
- boot-tax-monitorSkill
- compensating-complexity-auditorSkill
- context-fork-guideSkill
- context-hygieneSkill
- counterargument-stress-testSkill
- dark-code-auditSkill
- executive-briefingSkill
- failure-asymmetrySkill
- failure-postmortemSkill
- file-intelSkill
- geopolitical-signal-enricherSkill
- get-api-docsSkill
- gh-reviewSkill
- optimize-descriptionSkill
- prompt-rewriterSkill
- skill-auditSkill
- skill-maintenanceSkill
- spec-gap-detectorSkill
- token-burn-auditorSkill
- what-am-i-forgettingSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use when the user says "which model should I use", "model router", "route this task", "is this an Opus task", "Haiku or Sonnet for this", …
- Distinctive: line 56
If the task involves planning or architecture: always Opus
- Distinctive: line 57
If the task is pure formatting/cleanup: always Haiku
- Distinctive: line 58
If the task requires long output (>2K tokens) of code: Sonnet minimum
- Distinctive: line 59
If the user says "make it good" or similar quality signal: upgrade one tier
- Distinctive: line 60
If the user says "quick and dirty" or similar speed signal: downgrade one tier
- Distinctive: line 81
Use current pricing (verify via /chub before citing -- do not assume from training data).
- Distinctive: line 85
If the user describes a multi-step pipeline, route each step independently:
- Distinctive: line 98
If the user is building an agent pipeline (YCE harness, ClaudeClaw, etc.), suggest a routing function pattern matching task types to model …
“Common” is measured: kept by at least 6 in 10 of the 16 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 Router
Analyzes a task description and recommends which model tier to use. Prevents the common pattern of using Opus for everything (expensive) or Haiku for everything (quality loss).
Trigger
Use when the user says "which model should I use", "model router", "route this task", "is this an Opus task", "Haiku or Sonnet for this", "model selection", or describes a task and asks about the right model tier.
Phase 1: Task Classification
Analyze the task against these dimensions:
Reasoning Depth
- Low: Formatting, cleanup, simple transforms, template filling
- Medium: Standard code generation, bug fixes, content writing, data extraction
- High: Architecture decisions, multi-step reasoning, novel algorithm design, nuanced analysis
Output Complexity
- Structured: JSON, YAML, tables, lists -- predictable format
- Creative: Prose, explanations, design docs -- open-ended
- Code: Functions, classes, full files -- needs correctness
Context Requirements
- Minimal (<5K tokens): Self-contained task, no project context needed
- Moderate (5K-50K): Some files/docs for reference
- Heavy (50K+): Full codebase context, long documents, multi-file analysis
Error Tolerance
- High: Draft content, brainstorming, exploration -- mistakes are cheap to fix
- Medium: Code that will be reviewed, content with editing pass
- Low: Production code, client deliverables, one-shot outputs
Phase 2: Routing Decision
Apply this decision matrix:
| Reasoning | Output | Error Tolerance | Recommended Model |
| Low | Structured | Any | Haiku |
| Low | Creative | High | Haiku |
| Low | Creative | Low | Sonnet |
| Low | Code | Any | Sonnet |
| Medium | Any | High | Sonnet |
| Medium | Any | Medium | Sonnet |
| Medium | Any | Low | Sonnet (with review pass) |
| High | Any | High | Sonnet |
| High | Any | Medium | Opus |
| High | Any | Low | Opus |
Override Rules
- If the task involves planning or architecture: always Opus
- If the task is pure formatting/cleanup: always Haiku
- If the task requires long output (>2K tokens) of code: Sonnet minimum
- If the user says "make it good" or similar quality signal: upgrade one tier
- If the user says "quick and dirty" or similar speed signal: downgrade one tier
Phase 3: Cost Comparison
Show what each tier would cost for this task (estimate):
Task: [short description]
Estimated input: ~XXK tokens
Estimated output: ~XXK tokens
| Model | Input Cost | Output Cost | Total | Quality |
|--------|-----------|-------------|---------|---------|
| Haiku | $X.XXX | $X.XXX | $X.XXX | [risk] |
| Sonnet | $X.XXX | $X.XXX | $X.XXX | [ok] |
| Opus | $X.XXX | $X.XXX | $X.XXX | [best] |
Recommendation: **[Model]** -- [one-line rationale]
Savings vs Opus: $X.XX per call / $X.XX per day at [N] callsUse current pricing (verify via /chub before citing -- do not assume from training data).
Phase 4: Batch Routing (Optional)
If the user describes a multi-step pipeline, route each step independently:
Pipeline: [name]
Step 1: [task] -> Haiku ($X.XX/call)
Step 2: [task] -> Sonnet ($X.XX/call)
Step 3: [task] -> Opus ($X.XX/call)
Total per run: $X.XX
vs all-Opus: $X.XX (XX% savings)Phase 5: Agent Harness Integration (Optional)
If the user is building an agent pipeline (YCE harness, ClaudeClaw, etc.), suggest a routing function pattern matching task types to model tiers.
Output Format
Lead with the recommendation. Show the cost table. Keep rationale to one line. Don't over-explain the obvious.
Source Attribution
Technique derived from Nate's Newsletter (2026-04-02): "You're Loading 66,000 Tokens of Plugins Before You Even Type" -- model tier routing as a token cost optimization strategy, formalized into a decision framework.
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.

