AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

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

  1. Bulk extraction into a fixed schema → route to Haiku with a schema check, and explicitly do not up-tier "to be safe".
  2. Bug fix with tests available → Haiku rung 1, informed Haiku retry on failure, Sonnet only on what the retry still fails.
  3. 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download 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.

  1. Open a terminal.
  2. Clone the repository: git clone https://github.com/oaustegard/claude-skills.git
  3. Create the skills directory if needed: mkdir -p ~/.claude/skills
  4. Copy this skill in: cp -r claude-skills/agent-routing ~/.claude/skills/
  5. Confirm SKILL.md and the references/ folder landed in ~/.claude/skills/agent-routing/.
  6. Restart Claude Code and ask something like "which model and effort should this subtask get?" to trigger the skill.
  7. Treat the pricing and benchmark tables as a dated snapshot — check them against current official pricing before acting on the cost math.