Agent Routing (model, effort & cascade selection)
Decides which model and effort level each Claude Code subagent gets, and how to escalate failures safely, routing on measured cost-per-completed-task instead of per-token price.
Dev & CodingAdvanced★ 418⑂ 18AI score 9/10Last updated: Nov 22, 2026
What it does
- Picks the model (Haiku/Sonnet/Opus) and effort level for a subagent based on task shape: short vs long output, mechanically checkable vs judgment-bound.
- Routes on cost per completed task, not per-token price — a cheap but verbose tier can cost more per solved task than a pricier one.
- Gives a cascade ladder: cheap tier first, then an informed retry on the same model with the prior diff and failing test output, and a tier jump only as the exception.
- States hard preconditions: no verifier means no cascade; the holder of the verifier (the orchestrator), never the worker, makes the escalation call.
- Documents which channel actually delivers an effort setting to a subagent (Workflow
agent({effort}), agent-type frontmatter,claude -p --effort, session/effort). - Adds a context-handoff checklist (artifact paths, verbatim commands, anti-crawl rules, output spec) and the limits of the "be concise" lever.
Who it's for
- Claude Code users orchestrating fan-outs of subagents.
- Teams trying to cut agent spend without losing pass rate.
- Anyone building an improvement loop against an automatic scorer.
- Not applicable to plain claude.ai chat usage.
Example uses
- Bulk extraction into a fixed schema → route to Haiku with a schema check, and explicitly do not up-tier "to be safe".
- Bug fix with tests available → Haiku rung 1, informed Haiku retry on failure, Sonnet only on what the retry still fails.
- Rule-less triage or architecture review → route straight to Sonnet/Opus at high effort, because the cheap tier fails as "right headline, missed confound" that mechanical checks won't catch.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/oaustegard/claude-skills/HEAD/agent-routing/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the agent-routing folder from the GitHub repo oaustegard/claude-skills into my ~/.claude/skills/agent-routing/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/oaustegard/claude-skills.git && mkdir -p ~/.claude/skills && cp -r claude-skills/agent-routing ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repository:
git clone https://github.com/oaustegard/claude-skills.git - Create the skills directory if needed:
mkdir -p ~/.claude/skills - Copy this skill in:
cp -r claude-skills/agent-routing ~/.claude/skills/ - Confirm
SKILL.mdand thereferences/folder landed in~/.claude/skills/agent-routing/. - Restart Claude Code and ask something like "which model and effort should this subtask get?" to trigger the skill.
- Treat the pricing and benchmark tables as a dated snapshot — check them against current official pricing before acting on the cost math.
View source on GitHub ↗License: MIT