Agent Model Router
by Anmol Rajput
Sizes every coding task as light, regular or heavy and hands it to the cheapest Claude model that can do it well: Haiku, Sonnet or Opus. When unsure, it rounds up.
$9
About this skill
Stop paying Opus prices to change a button colour.
Most of a working day is small stuff: renames, typos, spacing tweaks, short copy. Your agent still runs all of it on the biggest model you have. This skill asks one question before each task: how hard is this, really?
Light work (one file, a small edit, a clear instruction) maps to Haiku. Regular work, like multi-file features, research, explaining code or debugging a clear error, maps to Sonnet. Heavy work goes to Opus: architecture, maths, security changes, migrations, large refactors, and bugs that survived one fix. If the signals are mixed, it rounds up one tier, because a cheap wrong answer costs more than an expensive right one.
How it routes in Claude Code:
- Same tier as your main model: the main agent does the work itself.
- Different tier: it hands the task to a helper locked to that model (router-light, router-regular or router-heavy) with a short brief: the goal, the exact files, the constraints and what done looks like.
- If writing the brief would cost more than the edit, it just does the edit.
- If a helper fails or says it is unsure, the task moves up one tier. It never steps down mid-task.
- Heavy work that needs a back-and-forth, such as a design discussion, is not handed off. It suggests you switch your main model to Opus for that stretch instead.
Every reply ends with a tag like [router: light → haiku], so you can see which model did the work. A small notes file at .model-router/context.md gives helpers the project context without crawling your repo. It stays under about 40 lines and never stores secrets, keys or personal data.
Two modes. Auto (the default in Claude Code) routes on its own. Manual keeps you on the model you picked and adds a one-line suggestion when the tier changes. Type "router auto" or "router manual" to switch; the choice is saved per project.
First test, on Claude Code with 15 requests in a small sample project: $2.70 with everything on Opus, $2.47 with the router on and the main session on Sonnet. That is about 9% less. One run on one project is a hint, not proof, and in that run light tasks stayed on the main model rather than reaching Haiku, since handing off a one-line edit cost more than doing it.
Install with Node 18 or newer: npx agent-model-router install. The installer asks before it adds its marked block to CLAUDE.md, and npx agent-model-router uninstall removes exactly what it added. It also installs for Codex, Gemini CLI and GitHub Copilot, but only Claude Code has been verified so far. MIT licensed. Source: github.com/anmol26rajput/agent-model-router
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 16 days ago
Permissions
No special permissions declared or detected
What's inside
Frequently Asked Questions
New in LLM Ops
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.