agent-routing

agent-routing is a skill for Claude Code, Codex from oaustegard/claude-skills. It costs 188 tokens per session (4,974 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: mentions subagents; positional $N argument; mentions Claude Code.

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 188 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,974 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.00188 $0.04974
Opus 5 $0.00094 $0.02487
Sonnet 5 $0.00038 $0.00995
Haiku 4.5 $0.00019 $0.00497

Measured 7d ago against content hash c79a17c2dfa3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 7d 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 · 322 lines

How it starts

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

Agent Routing — model, effort, and cascade selection

The rule that decides everything

Cost is output tokens × output price. Prices span ~5× across tiers. Token counts span up to 7× within a single tier depending on task shape. The shape therefore decides more than the tier does, and routing on the per-token discount gets the answer backwards.

Measured 2026-08-17, 14 spec-dense Python modules graded by hidden tests, all tiers at equal quality where noted:

arm tok/task pass $/task vs opus
haiku-solo 20,051 14/14 $0.1007 1.30×
haiku + concision 13,342 12/14 $0.0672 1.01×
opus-solo 3,001 14/14 $0.0774 1.00×
sonnet-base 4,687 14/14 $0.0478 0.62×
sonnet + concision 2,951 13/14 $0.0305 0.42×
sonnet cascade (below) 14/14 $0.0315 0.41×

Haiku is 5× cheaper per token and cost 30% more per solved task than Opus, because it emitted 6.7× the tokens. Prices: Haiku 4.5 $1/$5, Sonnet 5 $2/$10, Opus 5 $5/$25 per MTok.

Two questions before spawning

  1. Is the output short or long? Short = a schema instance, a label, an answer, a small patch. Long = a module, a document, a plan, a review.
  2. Is it mechanically checkable, or does it need judgment?
short output long output
checkable haiku @ low + verifier sonnet @ medium + concision + verifier
judgment sonnet @ medium sonnet/opus @ high

Output length is the discriminator because it is what the verbosity multiplier multiplies. Haiku's premium is invisible on a 200-token JSON object and ruinous on a 700-token module that costs it 13,000 tokens of thinking to produce.

Routing table

Task shape Model Effort Verify with
Extraction, classification, format transforms, schema-bound output haiku low schema / spot-check
Closed-form computation, state tracking, multi-hop lookup haiku low deterministic check
Constraint-bound generation (exact counts, required tokens, lipograms) haiku low mechanical checker
Bulk scans/greps, per-file summaries, fan-out reads haiku low sample audit
Code generation from a spec; any long structured artifact sonnet medium run the tests
Code edits with tests available sonnet medium run the tests
Judging / scoring another model's output sonnet+ medium — (judge ≠ worker)
Ambiguity resolution, novel synthesis, architecture, taste sonnet/opus high human or panel
Long-horizon multi-step agentic work, cross-file reasoning sonnet/opus high/xhigh milestone checks

Read the full file on GitHub · 322 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. 7d ago Changed · +47 lines · +19 tokens per session c79a17c2dfa3
  2. 12d 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 (148 stars, last pushed yesterday), licensed MIT. It adds 188 tokens to every session and 4,974 once invoked, about $0.0009 per session on Opus 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

Other skills, from other repositories

superdesign

Design or redesign frontend UI, presentations, and graphics on the Superdesign canvas with a choice of leading AI models. Use whenever the user wants to design a page, feature, flow, slide deck, or brand-new product; improve or reproduce existing UI; compare design results across top models; explore visual variants…

superdesigndev/superdesign-skill · 115 tokens

Linear

Managing Linear issues, projects, and teams. Use when working with Linear tasks, creating issues, updating status, querying projects, or managing team workflows.

wrsmith108/linear-claude-skill · 32 tokens

chanlun-engine-skill

A Chinese-language stock-analysis skill based on Chan theory, a method for interpreting price-chart structures such as turning points and trading ranges.

adsorgcn/chanlun-engine-skill · 128 tokens

youtube-summary

Summarize a YouTube video into structured notes — TL;DR, key takeaways, chapter-by-chapter breakdown, and reference links. Use when the user shares a YouTube URL (or invokes /youtube-summary ) and wants a summary, takeaways, transcript notes, or a write-up of a talk, lecture, or tutorial. Fetches the transcript and…

ParthGanatra/agent-skills · 137 tokens

plangate

Use for any non-trivial task with 2+ open decisions/tradeoffs OR multiple implementation steps — instead of deliberating one question at a time in chat, write a structured plan to a file and let the user review it inline in vim with > Q: / > A: blockquote markers, then revise until agreed before touching any code.…

ParthGanatra/agent-skills · 131 tokens

coinmarketcap

Expert assistant for CoinMarketCap Pro API — price quotes, listings, historical OHLCV, market metrics, Fear & Greed Index, CMC100/CMC20 indices, exchange data, DEX data, airdrops, trending, community sentiment. Covers 10+ endpoint categories across REST + MCP + x402 pay-per-call modes. Use when the user wants: current…

Vo1ganin/crypto-claude-skills · 183 tokens