model-routing
Skill0 starsChanged 27 days agoMITView on GitHub
Adaptive budget-aware model routing. Manages 4-tier system to maximize $200/mo Max plan usage across full weekly cycle. Run when starting sessions, hitting usage warnings, or optimizing sub-agent costs.
30 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- cveralyon/axel-setuptheir own version, first seen Nov 8, 2026
- naman10parikh/pennyword for word, first seen Nov 8, 2026
- weedmo/skillstheir own version, first seen Nov 8, 2026
- naman10parikh/wikimemedited, first seen Nov 8, 2026
- fal-ai-community/skillstheir own version, first seen Nov 7, 2026
- ArcReel/ArcReeltheir own version, first seen Nov 1, 2026
Other versions30 projects use a version of this.
Word for word · 2
- naman10parikh/penny★ 0100% same
- naman10parikh/turbo★ 0100% same
Edited · 2
- naman10parikh/agentgrid★ 999% same
- naman10parikh/wikimem★ 899% same
Wrote their own version · 26
- ArcReel/ArcReel★ 6.6ksame name
- alinaqi/maggy★ 711same name
- alinaqi/claude-bootstrap★ 708same name
- fal-ai-community/skills★ 265same name
- NoobyGains/godmode★ 120same name
- nahid-sparktales/agent-dispatcher★ 59same name
- echo-of-machines/fable-advisor★ 27same name
- frankxai/agentic-creator-os★ 10same name
- FaisalAlqarni/sp-ecc★ 9same name
- yeaight7/agent-powerups★ 6same name
16 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 repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- agent-runtimeSkill
- frontend-designSkill
- architectSkill
- deep-thinkSkill
- design-systemsSkill
- ecosystem-referenceSkill
- fractal-delegationSkill
- harness-reviewSkill
- heartbeatSkill
- integrate-resourcesSkill
- llm-council-critiqueSkill
- loop-createSkill
- mcp-setupSkill
- memory-compressionSkill
- memorySkill
- oss-project-scaffoldSkill
- playwright-cliSkill
- repo-scoutSkill
- self-improveSkill
- skill-creatorSkill
- skill-routingSkill
- sprintSkill
- test-visualSkill
- troubleshootSkill
- ux-auditSkill
- Accessibility AuditorSkill
- artifacts-builderSkill
- brand-guidelinesSkill
- canvas-designSkill
- frontend-patternsSkill
- design-mirrorSkill
- design-system-starterSkill
- design-to-codeSkill
- feature-design-assistantSkill
- figma-implement-designSkill
- frontend-designSkill
- frontend-dev-guidelinesSkill
- mobile-designSkill
- motion-canvasSkill
- pixel-agent-uiSkill
- pixel-animateSkill
- pixel-anti-slopSkill
- pixel-brain-pageSkill
- pixel-migrate-next16Skill
- pixel-rsc-boundarySkill
- pixel-ship-gateSkill
- premium-web-designSkill
- senior-frontendSkill
- shadcnSkill
- tailwind-design-systemSkill
- tailwind-patternsSkill
- theme-factorySkill
- ui-design-systemSkill
- ui-ux-pro-maxSkill
- ux-researcher-designerSkill
- web-design-guidelinesSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
When Claude flags usage at 75%, 90%, or 95%
- Distinctive: line 11
When starting overnight/long-running autonomous sessions
- Distinctive: line 12
When you want to check or change the current budget tier
- Very specific: line 84
Use /effort in-session or CLAUDE_CODE_EFFORT_LEVEL env var.
“Common” is measured: kept by at least 6 in 10 of the 27 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
When to Use
- Session start (automatically via hook)
- When Claude flags usage at 75%, 90%, or 95%
- Breaking large tasks into sub-tasks with different complexity levels
- When starting overnight/long-running autonomous sessions
- When you want to check or change the current budget tier
Adaptive Budget System (Chairman Directive — April 10, 2026)
The $200/mo Max plan has a weekly rolling limit. Opus burns ~5x faster than Sonnet. Without management, budget exhausts in 3 days.
4-Tier System
| Tier | Name | Model | Effort | Subagents | Cost vs Opus |
| 1 | FULL POWER | opus | max | inherit | 1x (baseline) |
| 2 | BALANCED | opusplan | high | sonnet | ~0.3-0.4x |
| 3 | CONSERVE | sonnet | high | haiku | ~0.15x |
| 4 | EMERGENCY | sonnet | medium | haiku | ~0.1x |
Quick Commands
# Check current tier
scripts/budget-manager.sh status
# Record a usage warning (when Claude flags it)
scripts/budget-manager.sh warn 75
scripts/budget-manager.sh warn 90
# Force full power for a critical session
scripts/budget-manager.sh set 1
# Return to adaptive after override
scripts/budget-manager.sh auto
# New weekly cycle started
scripts/budget-manager.sh reset
# Apply current tier to settings (auto-runs on session start)
scripts/budget-manager.sh applyHow opusplan Works
The opusplan model alias (Tier 2) is the efficiency sweet spot:
- Plan mode (Shift+Tab): Uses Opus for deep reasoning, architecture, trade-offs
- Execution mode: Switches to Sonnet for code generation, edits, tool calls
- Result: Opus-quality planning at ~30-40% of full Opus cost
Sub-Agent Routing
CLAUDE_CODE_SUBAGENT_MODEL env var controls what model sub-agents use:
- Tier 1: Subagents inherit Opus (no env var set)
- Tier 2:
CLAUDE_CODE_SUBAGENT_MODEL=sonnet - Tier 3-4:
CLAUDE_CODE_SUBAGENT_MODEL=haiku
Override per-agent via frontmatter in agent .md files:
---
model: opus
effort: max
---Effort Levels
| Level | Thinking Budget | When |
| max | Unconstrained | Deep architecture, security review |
| high | Large budget | Standard development, debugging |
| medium | Moderate | Simple tasks, file edits |
| low | Minimal | Quick lookups, formatting |
Use /effort in-session or CLAUDE_CODE_EFFORT_LEVEL env var.
Model Tier Recommendations (When Manually Routing)
Tier 0 — No Model Needed
Pure code operations: formatting, linting, file copying, git operations, running tests.
Tier 1 — Haiku (fast, cheapest)
- Simple text transformations and formatting
- Straightforward search and replace
- Generating boilerplate code from clear templates
- Summarizing short documents
Tier 2 — Sonnet (default, balanced)
- Standard coding tasks (implement a function, fix a bug, write tests)
- Multi-file refactoring with clear scope
- Processing articles and extracting insights
- Most development work falls here
Tier 3 — Opus (deep thinking, expensive)
- Architecture decisions with trade-offs
- Security reviews and vulnerability analysis
- Complex multi-system design
- Resolving contradictory requirements
- Writing or revising vision documents
Cost Reference
| Model | Input/MTok | Output/MTok | Relative Cost |
| Haiku 4.5 | $0.80 | $4.00 | 1x |
| Sonnet 4.6 | $3.00 | $15.00 | ~4x |
| Opus 4.6 | $15.00 | $75.00 | ~19x |
Additional Token Savings
- Use
/clearbetween unrelated tasks — stale context wastes tokens every message - Delegate verbose operations to subagents — logs, tests, docs stay in subagent context
- CLAUDE.md under 200 lines — move specialized instructions to skills (on-demand loading)
- Use skills over MCP when possible — skills = ~70 tokens, MCP tool definitions = ~4,200 tokens
- Specific prompts — "add validation to auth.ts" not "improve the codebase"
- Plan mode for complex tasks — Shift+Tab before implementation prevents expensive re-work
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.

