agent-routing

Solid

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 spawning subagents via the Agent or Workflow tools, when fanning out more than a handful of agents, or when asked which model or effort a task should get. Grounded in measured calibration (references/calibration-2026-07-15.md), a 2026-08 coding-cost study, and a 2026-09 agentic-repair battery that measured the cascade rungs directly; Managed Agents API specifics are operational, not calibrated.

AI & Automation 148 stars 5 forks Updated today MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
72
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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`/...

Details

Author
oaustegard
Repository
oaustegard/claude-skills
Created
10 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

route

Split the current task into chunks and delegate each to the cheapest capable model via subagents. Use when the user asks to route work cost-efficiently, says "route this", "use cheap models where possible", or hands over a multi-part task and mentions credits, cost, or model choice.

0 Updated today
Salish-Studios
AI & Automation Listed

cost-lean-orchestration

Token-efficient model routing for complex engineering sessions. The main model (Opus / Fable, high reasoning) never bulk-reads or explores — it delegates all exploration, bulk file reading, codebase search, log scanning, dependency tracing, and documentation reading to Sonnet subagents that return compact structured findings, and it spends its own tokens only on synthesis, architecture, judgment, and final code. Use this skill in EVERY session that involves reading more than a couple of files, exploring or mapping a codebase, investigating a bug, auditing call sites, reviewing a large diff, digesting logs or docs, or any multi-step engineering task — even if the user never mentions cost, tokens, subagents, or delegation. This is a standing operating discipline, not an on-request feature.

1 Updated 1 months ago
itzTiru
AI & Automation Listed

delegate

Token-saving subagent routing. Use when facing token-heavy, read-heavy, conclusion-only work (reading Lark/Feishu in full or writing to it, wide code searches, log/long-document analysis) to decide whether to offload the work to a cheaper-model subagent and which tier to use.

0 Updated yesterday
chinayin