agent-routing
БесплатноБез исполняемых скриптовНе проверенDecide which model, effort level, and cascade shape each subagent gets, and how to keep improvement loops safe (evaluator-as-selector, stop on regression)…
от oaustegard★ 425 звёзд на 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.
The rule that decides everything
Cost is output tokens × output price, plus the spawn's prefix. 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 4.5 was 5× cheaper per token and cost 30% more per solved task than Opus, because it emitted 6.7× the tokens. Prices then: Haiku 4.5 $1/$5, Sonnet 5 $2/$10, Opus 5 $5/$25 per MTok. At Haiku 5.5's $0.50 output price the same 20,051 tokens would cost $0.010 a task, a fifth of Sonnet's $0.048. Whether Haiku 5.5 is as verbose as 4.5 on generation is unmeasured. It would have to emit about 95K tokens a task to lose on output cost.
Two questions before spawning
- 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.
- Is it mechanically checkable, or does it need judgment?
| short output | long output | |
|---|---|---|
| checkable | haiku + verifier |
haiku + verifier, informed retry on haiku, then sonnet @ high |
| judgment | sonnet @ medium |
sonnet @ high, or opus when the work must be discovered |
On Haiku 4.5, output length was the discriminator, because it is what the verbosity multiplier multiplies: Haiku 4.5's premium was invisible on a 200-token JSON object and ruinous on a 700-token module that cost it 13,000 tokens of thinking. At 5.5 prices verbosity no longer decides it, so the checkable column now starts on Haiku at any output length. The long-output cell is projected from price and from the repair battery, and has not been measured on generation.
The one measurement that has separated Haiku 5.5 from Sonnet 5.5 is judgment without a stated rule: triage of real private email, 84.7% against 91.7% (McNemar p = 0.0005), in the same external study whose two synthetic benchmarks with stated rules did not separate them. That the missing rule is the cause is the study's hypothesis, not a measurement. Until s
Установить agent-routing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл agent-routing?
Decide which model, effort level, and cascade shape each subagent gets, and how to keep improvement loops safe (evaluator-as-selector, stop on regression). Routes on measured cost-per-completed-task rather than per-token price, because a tier's token count varies more by task shape than price varies across tiers. Covers per-model effort semantics, the concision lever, cascade preconditions, context handoff, and watching a subagent fan-out live. Use when choosing a subagent's model or effort, when choosing how to escalate a failed attempt, or when asked which model or effort a task should get. Grounded in a 2026-07 calibration, a 2026-08 coding-cost study, a 2026-09 seeded-bug repair battery, a 2026-10 Haiku 5.5 ladder priced per spawn, a 2026-10 retry-versus-escalation ladder on 295 SWE-bench Verified tasks, and a 2026-11 Haiku-swarm-versus-Sonnet-loop search at equal spend; Managed Agents API specifics are operational, not calibrated.
Как установить скилл agent-routing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-routing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic