Agent Routing (model, effort, cascade selection)
Decides which model, effort level, and cascade shape each subagent gets, routing on measured cost per completed task instead of per-token price.
AutomationAdvanced★ 146⑂ 6AI score 9/10Last updated: Aug 18, 2026
What it does
- Classifies work on two axes — output length (short vs. long) and mechanically checkable vs. judgment — then assigns a model (
haiku/sonnet/opus) and effort level (low→xhigh) from a concrete routing table. - Routes on measured cost per completed task, not per-token price: a 5×-cheaper tier that emits 6.7× the tokens ends up 30% more expensive.
- Documents the "concision lever" (27–37% fewer output tokens at no quality cost) and where suppression turns harmful (pass rate halved when thinking was engineered down).
- Gives two hard preconditions before building a cascade (is the cheap tier actually cheaper per task; is there a verifier) plus informed-retry mechanics — carry the prior attempt and raw failure output (12/12 vs. 9/12 blind).
- Adds loop discipline (out-of-band evaluator, argmax selection, stop on first regression), judge rules, escalation triggers, context-handoff checklists, and how to watch a subagent fan-out live via per-thread streams.
Who it's for
- Engineers building orchestrators that spawn subagents through Claude Code's Agent/Workflow tools.
- Teams trying to cut agent-pipeline API spend without losing pass rate.
- Anyone whose self-improvement loops keep freezing on degraded output.
Examples
- Bulk fan-out reads: route 20 per-file summaries to
haiku @ lowwith sample auditing, and lift only the synthesis step tosonnet @ high. - Spec-to-code: first rung
sonnet @ low + concision; on test failure retry atsonnet @ mediumwith the prior code and test output attached (measured 14/14 at 0.41× Opus cost). - Handoff design: before launching explore agents on a 2,300-file repo, serialize index slices, verbatim commands, anti-crawl rules, and an output spec into the prompt so discovery cost drops to near zero.
· · · 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 Claude 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 and go to your home directory:
cd ~ - Clone the repository:
git clone https://github.com/oaustegard/claude-skills.git - Make sure the skills folder exists:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r claude-skills/agent-routing ~/.claude/skills/ - Confirm the contents, including the
references/folder:ls ~/.claude/skills/agent-routing - Restart Claude Code, then ask something like "which model and effort should this subagent get?" to confirm the skill loads.
- The price and token figures are tied to a specific measurement date — if your models or pricing differ, run a small benchmark of your own and update the tables.
View source on GitHub ↗License: MIT