/agents:model-routerfrom AI Agents and Models
Triage what you're about to do and decide whether a different model should do it instead — route mechanical, well-specified work down to Haiku/Sonnet, escalate hard architecture/debugging/security reasoning up to Opus/Fable, and fan independent work out across parallel subagents. Consult this on every request before starting substantive work, not just when the user mentions models, cost, speed, or subagents — the whole point is that the user should never have to ask. Especially relevant for bulk mechanical edits, repo-wide sweeps, migrations, test scaffolding, boilerplate, deep debugging, architecture decisions, security review, and any task that decomposes into independent chunks.
Ships in AI Agents and Models. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are one model in a family with very different cost and capability profiles. Doing every task yourself is the wrong default: a rename across 40 files does not need frontier reasoning, and a subtle concurrency bug does not deserve a cheap one. Your job here is a fast call about who should do this, then get on with it.
Handle it inline and stop reading if any of these hold:
This is the common case. Most requests are not worth routing. Delegation is not free: a subagent starts cold, re-reads files you've already read, and reports back through a narrow channel. That overhead is real, and it's why the bail-out comes first.
Only continue if the task is substantial and specifiable — you could write down what "done" looks like in a paragraph, and it's more than a handful of tool calls.
| Model | model value | Cost vs. Opus | Use for |
|---|---|---|---|
| Haiku 4.5 | haiku | ~0.2× | Mechanical, pattern-following work with a clear spec. 200K context. |
| Sonnet 5 | sonnet | ~0.6× | Real coding that doesn't need frontier reasoning. Strong default for bulk implementation. |
| Opus 5 | opus | 1× | Hard reasoning, architecture, subtle debugging, security. |
| Fable 5 | fable | 2× | Reserve for genuinely frontier problems the session model is failing at. Not a default escalation. |
Route down when the work is mechanical and well-specified: bulk renames and find-replace with a stated rule, applying one known pattern across many files, scaffolding tests from an existing example, changelog and doc generation from a diff, config and boilerplate, mechanical migrations where the transform is already decided. The tell is that you already know the answer and what remains is typing.
Route up when the session model is below the task: architecture with real tradeoffs, a bug that has survived one honest attempt, security-sensitive logic, anything where being wrong is expensive and hard to detect. If you are already on Opus, escalating to Fable is rarely right — try harder yourself first. Escalate on evidence of difficulty, not on the topic sounding hard.
Fan out when the work splits into chunks that don't need to see each other: independent files or modules, per-item work across a discovered list, several unrelated investigations. Launch them in one message so they run concurrently, and pick the model per chunk — a sweep is often Haiku, an audit often Sonnet or Opus.
Don't route down when correctness is hard to verify, the spec is fuzzy, or the work needs judgment about the surrounding codebase. A cheap wrong answer you then have to find and fix costs more than doing it right.
Use the Agent tool with an explicit model. Brief it properly: subagents inherit no conversation history, so state the goal, the exact files or scope, the convention to follow, and what to report back. A vague brief to a cheap model is how routing goes wrong.
Say the call in one line before you spawn, so the user can see and override it:
Mechanical rename across 41 files, rule is already fixed — sending to Haiku. Three independent modules to audit — fanning out to three Sonnet agents. This race condition survived my first pass — escalating to a fresh Opus agent with the repro.
One line. Not a section, not a table, not a justification — the user wants the work, not your reasoning about the work.
Verification stays with you. When a subagent reports back, you own whether the result is right — don't relay a cheap model's confident summary as if it were checked. If you delegated, commit to it: don't redo the work or re-derive its findings.
Route on the shape of the work, not on how the request was phrased. "Just rename this everywhere" and "I need you to carefully update every reference" can be the same mechanical task. Conversely, a casual "quick question about our auth" can be a security review.
If the routing call is genuinely close, do it yourself. A wrong delegation costs a full round trip; a slightly-too-expensive inline answer costs a little money and no time.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mattmakes/skill-marketplace --plugin agents24 skills in this plugin
/agent-architecture-auditFull-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack./autoresearch-agentAutonomous experiment loop that optimizes any file by a measurable metric. Inspired by Karpathy's autoresearch. The agent edits a target file, runs a fixed evaluation, keeps improvements (git commit), discards failures (git reset), and loops indefinitely. Use when: user wants to optimize code speed, reduce bundle/image size, improve test pass rate, optimize prompts, improve content quality (headlines, copy, CTR), or run any measurable improvement loop. Requires: a target file, an evaluation command that outputs a metric, and a git repo./book-to-skillConverts books, documentation folders, and source collections (PDF, EPUB, DOCX, HTML, Markdown, RST, AsciiDoc, RTF, MOBI/AZW) into structured agent skills — extracting named frameworks, principles, techniques, and anti-patterns into a master SKILL.md plus on-demand chapter files, a glossary, a patterns file, and a decision cheatsheet. Use when the user wants to study a document with an agent, apply an author's frameworks while working, turn internal docs or standards into a reusable knowledge base, or package a compiled book skill as a Claude Code plugin./checkpoint-promotionGate fine-tuned checkpoints with drift budgets, paired comparison, and forgetting checks before promotion. Use after a training run produces a checkpoint, when deciding whether a tuned model ships, or when a promoted model needs re-gating against updated goldens./cli-for-agentsDesigns or reviews CLIs so coding agents can run them reliably: non-interactive flags, layered --help with examples, stdin/pipelines, fast actionable errors, idempotency, dry-run, and predictable structure. Use when building a CLI, adding commands, writing --help, or when the user mentions agents, terminals, or automation-friendly CLIs./dataset-curationPrepare, format, and validate datasets for supervised fine-tuning and preference training. Use when converting raw data into training format, applying chat templates, configuring sequence packing, generating synthetic training data, or writing a dataset card before a run.