Skip to content
Back to skills

Model Routing

ASecurity

Pick the agent, model tier and effort for a subagent dispatch that is already decided. Use when dispatching implementation, review, exploration or test-run work to a subagent, or when the user asks about token economy / cost optimization. It never decides whether to dispatch.

  • 5 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
ai-agentsgosecurity

Works with

  • cli

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add AqueGen/model-routing --skill model-routing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Routing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Model Routing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aquegen-model-routing/badge)](https://www.skillsdirectory.com/skills/aquegen-model-routing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: model-routing
description: Pick the agent, model tier and effort for a subagent dispatch that is already decided. Use when dispatching implementation, review, exploration or test-run work to a subagent, or when the user asks about token economy / cost optimization. It never decides whether to dispatch.
---

# Model Routing

A dispatched subagent should run on the cheapest tier and effort that hold the quality its role needs, not inherit the session model. Claude cannot switch the session model; routing works through the bundled agents and the `model` and `effort` params of the Agent tool. This skill never decides whether to dispatch - that belongs to the user, repo policy and other skills. It only says what a dispatch runs on.

## Which agent

Pins come from each agent's frontmatter. Name the agent as `model-routing:<name>`.

| Dispatched task | Agent | Model | Effort |
|-----------------|-------|-------|--------|
| Judgement exploration ("how does Y work", "does this retry") | `scout` | sonnet | low |
| Breadth sweep: enumerate, list, trace a chain end to end | `surveyor` | haiku | medium |
| Implement a plan task or spec, multi-file included | `implementer` | sonnet | medium |
| Per-task review or scoped re-review inside a plan loop | `task-reviewer` | sonnet | high |
| Final, whole-branch, high-risk or pre-PR review; a verdict on external review findings | `reviewer` | opus | high |
| Run tests, builds, linters and report | `test-runner` | haiku | low |
| Browser/E2E scenarios, telling product bug from test bug from flake | `e2e-runner` | sonnet | medium |

Notes on the table:

- A mechanical exploration that only needs candidates ("which files mention X") can go to the built-in Explore agent. Verified lists go to `surveyor`; judgement goes to `scout`.
- Sanity-checking an agent's diff against its task needs no agent: the main session reads the diff, and a real review goes to `task-reviewer` or `reviewer`.
- Confirmed findings from a `reviewer` verdict go to `implementer`.
- Pick the agent pinned for the tier you need rather than overriding a role agent downward: `reviewer` with `model=haiku` is a weaker review, not a cheaper one.

## Automatic default

A bare dispatch of `general-purpose`, `Explore`, `claude` or `Plan`, or of a user agent with no model pin (or `model: inherit`), runs on sonnet (Explore: haiku) when the session model is strictly above that target. This happens by itself, so do not pass `model` just to get it. It never raises a model. It is skipped when the call passes `model`, or when `CLAUDE_CODE_SUBAGENT_MODEL` or `CLAUDE_CODE_SUBAGENT_MODEL_FORCE` is set. Pass `model` yourself when a task needs a different tier.

## When to go up

- `implementer` with `model=opus` is for security, money, data migrations, concurrency, or a retry after a weak sonnet result. Multi-file work alone stays on sonnet. An ambiguous task is not an escalation case: clarify first.
- A failed or visibly weak result goes one step up when re-dispatched: the next tier via `model`, or the same tier at higher effort (the Agent `effort` param) when the miss looks like shallow thinking. One step, never a leap to the top, never the same level that just failed. A second failure means the task is mis-scoped: take it to the main session.
- A refusal (`stop_reason: "refusal"`) is a classifier declining, not a weak result. Do not re-dispatch it on a higher tier; hand it back to the main session to rephrase or drop.
- A subagent stuck on the approach hands back its state (what it tried, why it failed, the directions it sees) for a main-session decision, then continues via SendMessage, or a re-dispatch that carries the decision.

## Effort

The Agent call takes an `effort` param on any non-fork dispatch, pinned or not, and it is the lever for a retry. Without it a pinned agent runs its pin and an unpinned one inherits the session level; for unpinned agents use the levels below as the target. `model=opus` alone changes the model, not the effort.

- low: mechanical or well-scoped work (exploration, renames, test runs).
- medium: normal implementation where the approach is clear.
- high: hard reasoning, high-risk review, work where a wrong approach is costly to unwind.
- xhigh, max: session or Workflow choices for long or frontier work, never a routine dispatch level.

Pick effort by task difficulty, not by tier. Do not open an extra review round on top of the one the plan, the user or a repo policy asked for.

## Tags (optional guard)

Applies only outside the routing mode `quality` (the default), which the user switches with the band buttons above the prompt. Then a dispatch of `general-purpose`, `Explore` or an `implementer` on opus or fable needs one of these in the description: `[opus: asked]`, `[opus: retry]`, `[opus: security]`, `[opus: money]`, `[opus: migration]`, `[opus: concurrency]`. A dispatch of `model-routing:reviewer` needs `[final]`; use `task-reviewer` for a per-task review. In `quality` none of this applies; `strict` accepts only security, money and migration.

## Rules

- Write self-contained task descriptions: goal, files, constraints, verification commands. A subagent cannot see the conversation.
- Repo-specific policies override this table.
- Size dispatches by plan task: one task with its own check is one `implementer` dispatch; batch only small edits touching the same files with one check. Group review fixes by shared root cause or files. Run agents of one change one at a time unless they touch disjoint files, and pass the previous agent's "What was changed" list to the next.
- A finished agent does not take the next task. A text-only end of turn with items left and no named blocker is a continuation: send one short message naming them, at the same tier. Stop after two or three continuations and take it to the main session.
- With no approved plan, brief a cheap agent to return the plan only and check it in the main session before it writes code.
- In Workflow scripts, set `model` and `effort` on every `agent()` call: a forgotten opt inherits the session model at session effort, times the fan-out. Precedence: script opt, then frontmatter pin, then `CLAUDE_CODE_SUBAGENT_MODEL`, then the session model; `CLAUDE_CODE_SUBAGENT_MODEL_FORCE` overrides all of them.
- Verify what actually ran with `/model-routing:stats`.

The reasoning behind each pin, the cost figures and the evidence are in the site page "Why each choice".

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.