Claude Router
by Rohit Gampa
Claude Code plugin that sorts each prompt into simple, medium or complex, then picks the Claude model, thinking effort and validator for it, so your subscription goes further.
Free
Claude Router
Example session with this skill installed
Migrate the auth module from server-side sessions to JWT across the API and the React frontend, keep refresh tokens working, and update the tests. #validate
- Read your context and instructions
- Compiled the claude router
Summary
Claude Router classified the prompt before it ran and routed it to the
complex tier. #validate was stripped from the prompt and turned the validator on for the session.
Status line after the prompt:
router: complex/mid · opus:high → sonnet:high · val fable:high
How the prompt was routed
| Step | What happened |
|---|---|
| Classifier | Haiku rated it a multi-file change with design decisions, not just a question, and with no bug report or reproduction steps |
| Tier | complex (mid band) |
| Main loop | Opus at high effort plans the migration and delegates |
| Executors | Sonnet subagents at high effort make the edits and run the tests |
| Validator | On (forced by #validate); reviews the result and ends with VERDICT: PASS or FAIL |
| Log | One counts-only line appended to ~/.claude-router/log.jsonl |
The same session, later prompts
| Prompt | Status line |
|---|---|
now add tests for token expiry (6 words) | router: complex/mid (kept) · opus:high → sonnet:high · val fable:high (tier kept, so the cache survives; no classifier call) |
/clear then what does the refresh endpoint return? | router: simple/low · haiku:low · val off |
Fix: login returns 500 when email has a plus sign. Steps: ... | router: medium/mid · haiku:medium → haiku:medium · val off. A bug report with steps to reproduce is never routed to complex; Opus takes over only if an executor reports STATUS: FAILED or a test fails |
Next steps
- Watch the status line for a few sessions; add
#complexor#simplewhen you disagree with a call. - Run
node eval/catch-rate.mjsto see how often the router caught a failed cheap attempt. - Tune the cut-offs in
logic.ts(TIERS,EFFORT,CUTS) if your work skews hard or easy.
Connects securely to your tools. The creator never sees your data.
About this skill
Most prompts don't need your biggest model. Claude Router is a Claude Code plugin (installed as router) that reads each prompt before it runs, sorts it into simple, medium or complex, and picks which Claude model does the work, how hard it thinks, and whether a validator checks the result.
What it does
- Haiku classifier: before each prompt, Claude Haiku answers three questions: how much effort the request needs, whether it is only a question, and whether it includes an error or steps to reproduce. Fixed cut-offs turn the answers into a tier. Cost: up to about $0.001 of your own usage per prompt.
- Keyword fallback: if the Haiku call fails, a simple keyword check decides.
- Tiers: simple runs on a small model alone; medium has Haiku orchestrate Haiku subagents, with Opus taking over after a caught failure; complex has Opus orchestrate Sonnet executors with a validator.
- Sticky tiers: switching models mid-conversation throws away the prompt cache, so the tier only moves down while a conversation is short. Follow-ups of six words or fewer keep the current tier.
- Status line: shows tier, models and effort after every prompt.
- Manual override tags:
#simple#medium#complexforce a tier;#validate/#novalidate/#autovalidatecontrol the validator. Tags are stripped before the model sees the prompt. - Private, counts-only log at
~/.claude-router/log.jsonl(no prompt text). SetROUTER_LOG=0to turn it off.
What it saves
On 500 SWE-bench issues (Claude 4.5 models, API prices), routing cost 16–32% less than always using Opus while solving 1.1–5.6 points fewer; against always-Sonnet the saving was 3–22%. Orchestration overhead isn't in that data, so expect real savings to be lower.
Install
/plugin install router --marketplace gamparohit/claude-router
Answer y to add the marketplace, pick user scope, start a new session. Nothing else to install.
Status
Early release. The hooks are tested against Claude Code's plugin test kit with stubbed model calls, but haven't yet been verified in a live session. Reports from real use, including "it worked", are very welcome on GitHub. MIT licensed.
Adds approximately $0.001 cost and short latency per prompt. Haiku evaluator has not been verified in a live session.
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
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 12 days ago
- Free with an Agensi account
- Accounts
- Claude subscriptionorAnthropic API access
- Software
- Claude Code
- Optional
Node.js (only for the eval/ scripts)
Permissions
Hooks read each prompt to classify it with a small Claude Haiku request (your own Claude usage, up to ~$0.001/prompt). The only file written is a counts-only log at ~/.claude-router/log.jsonl (no prompt text); set ROUTER_LOG=0 to disable.
What's inside
Creator
Rohit Gampa
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.