agent-routing

agent-routing is a skill for Claude Code, Codex from oaustegard/claude-skills. It costs 210 tokens per session (9,596 once invoked), scanned A, original, MIT.

A routing guide for choosing an AI model, effort level, and multi-agent review pattern for each coding task. It bases choices on measured cost per completed task, including how many tokens the task tends to require.

In plain words
What is it for?
Use it to decide whether a task needs a short or long-running agent, which model tier fits it, and whether an improvement or review loop is worthwhile.
Why use it?
It helps avoid choosing a cheaper model that uses more output or fails more often, increasing the real cost of completion.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions subagents; positional $N argument.

Good fit Use it to decide whether a task needs a short or long-running agent, which model tier fits it, and whether an improvement or review loop is worthwhile.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/oaustegard/claude-skills/agent-routing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add oaustegard/claude-skills --skill agent-routing
Clone the repo
git clone --depth 1 https://github.com/oaustegard/claude-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-routing

README.md
[![agentmods](https://agentmods.dev/badge/skills/oaustegard/claude-skills/agent-routing/github.svg)](https://agentmods.dev/skills/oaustegard/claude-skills/agent-routing)
Your own site
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/agent-routing"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/agent-routing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-routing

Your own site · 80×15
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/agent-routing"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/agent-routing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 210 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,596 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Output Handling · line 244
    Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.
    Fix: Validate and sanitize all model output before using it in downstream contexts. Use parameterized queries for SQL, shell quoting for commands, and HTML encoding for web output.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00210 $0.09596
Opus 5.5 $0.00084 $0.03838
Sonnet 5.5 $0.00042 $0.01919
Haiku 4.5 $0.00021 $0.00960

Measured 6d ago against content hash 1d214d13c6ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-routing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agent-routing/SKILL.md · 541 lines

How it starts

The opening of the file, as written. The whole thing — 541 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Routing — model, effort, and cascade selection

Current prices, and what changed in 2026-10

model $/MTok in out cache read one Agent-tool spawn, small seeded repo one spawn, SWE-bench Verified
Haiku 5.5 $0.10 $0.50 $0.01 $0.005–0.011 $0.024–0.037
Sonnet 5.5 $2 $10 $0.20 $0.17 $0.23–0.35
Opus 5.5 $4 $20 $0.20 ~$0.34 (2× Sonnet, not measured) —
Fable 5.1 $10 $50 $0.25 — —

Haiku 5.5 is 20× under Sonnet 5.5 on every token class (Haiku 4.5 was 2–5×), and its prices hold for prompts up to 100K tokens ($0.50/$2.50 beyond). On the 14-repo seeded-bug battery it solved 11/14 at rung 1, which is the pass set Sonnet 5.5 at low gets. With the same-model informed retry it solved 14/14 for $0.12 in total, less than one Sonnet 5.5 spawn (oaustegard/experiments → temporal-routing-headroom, 2026-10-07). Where the Haiku 4.5 figures below say Haiku loses on cost, rerun the arithmetic at 5.5 prices before trusting them.

On real issues the picture holds with a smaller margin. Over 295 SWE-bench Verified tasks (django and sympy) Haiku 5.5 resolved 256 (86.8%) at rung 1 for $7.06 in total. On its 39 misses, rung 2 with the failing tests' output resolved 30 retrying Haiku ($1.43) and 34 escalating to Sonnet 5.5 ($13.53). Sonnet solved every task the Haiku retry did and 4 more (p = 0.125) (oaustegard/experiments → swe-ladder, 2026-10-09). Real repair spawns run longer than seeded ones, so a spawn costs 3–5× the small-repo figure on Haiku and 1.5–2× on Sonnet; the ratio between the tiers stays near 10×.

In Claude Code, price a subagent per spawn first. A fresh Agent-tool subagent writes a ~55K-token prefix (system prompt, tools, skills list) to the 5-minute cache on its first request. On short repair tasks that prefix outweighed everything the subagent produced: a Sonnet 5.5 spawn cost $0.17 input-side, 14× the $0.0121 output-only figure this skill used to quote per completed task. Same-model spawns in sequence share the cached prefix (reads cost 0.1×), so serialise spawns of one model when they can wait, and count spawns before counting output tokens. Every table further down prices output tokens only. That is still right for comparing tiers on long outputs, but it understates what a spawn costs.

Read the full file on GitHub · 541 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · +31 lines 1d214d13c6ca
  2. 24d ago Changed dd83976e06f1
  3. 26d ago Changed · +8 lines 038d873a7b07
  4. 27d ago Changed · +8 lines · -12 tokens per session 2b475d42cecb
  5. 29d ago Changed · +39 lines · +1 tokens per session 722bb0e82ee3
  6. 1mo ago Changed · +73 lines · +24 tokens per session 7d59a2c89a13
  7. 1mo ago Changed · +60 lines · +9 tokens per session c1ac54d7d7e7
  8. 2mo ago Changed · +47 lines · +19 tokens per session c79a17c2dfa3
  9. 2mo ago First seen · 275 lines · 169 tokens per session scan A 8d6e979ed69c

Subscribe to this mod's changes

agent-routing is a skill published in the GitHub repository oaustegard/claude-skills (158 stars, last pushed yesterday), licensed MIT. It adds 210 tokens to every session and 9,596 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

agent-routing compared with skills from other repositories

agent-routing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agent-routingoaustegard/claude-skillsSkill158yesterdayMITA210Claude Code, Codex
superdesignsuperdesigndev/superdesign-skillSkill9632mo agoMITA115Claude Code, Codex
figma-to-codescoobynko/claude-code-design-skillsSkill401mo agoMITA0Claude Code, Codex
Linearwrsmith108/linear-claude-skillSkill1403mo agoMITA32Claude Code
bpmn-xml-generatorstateway-io/bpmn-xml-generatorSkill413d agoApache-2.0A177Claude Code
smb-sales-boostTomsonx232/smb-sales-boost-skillSkill525d agoMITA200Claude Code, Codex
free-public-rest-apisaisenseapi/aisense-free-public-rest-apisSkill1yesterdayMITA366Claude Code, Codex