/switchboard:model-routingfrom switchboard
Routes prompts to the appropriate Claude model and effort level based on task complexity. Helps save tokens and cost by matching work to the cheapest capable model.
Ships in switchboard. 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.
Use the cheapest setting that does the job well, and step up when the work is hard. The switchboard-hook companion plugin, when installed, picks a setting per prompt; when the session's setting does not fit, the main agent runs the prompt in an Agent subagent with that model and effort. The session's own setting never changes.
"model" and "effort" in the session transcript).Agent with model (haiku, sonnet, opus), effort from the table, subagent_type: "general-purpose" and a complete brief. The brief carries the prompt plus whatever this conversation knows that the task needs: the subagent starts cold. Say it in one line first: Routing to <Model> at <effort>.| Prompt looks like | Model (/model) | Effort (/effort) |
|---|---|---|
| Quick question, lookup, definition, "where is X" | Haiku 5.5 (haiku, claude-haiku-5-5) | low |
| Routine code edit: add, fix, rename, write a test, small feature | Sonnet 5.5 (sonnet, claude-sonnet-5-5) | medium |
| Architecture, security, hard or intermittent bugs, root cause, migrations, large refactors | Opus 5.5 (opus, claude-opus-5-5) | high |
| Very hard or long-horizon work the user flags as critical | Opus 5.5 | xhigh or max |
| "yes", "ok", "continue", slash commands | no suggestion: keep the current setting |
Fable 5.2 (fable, claude-fable-5-2) also supports all five effort levels; the hook does not route to it.
/model haiku|sonnet|opus (or a full ID), /effort low|medium|high|xhigh|max, /effort auto to clear./fast: toggles fast mode, faster output on the current model where supported (it may move the session to Opus). It is about speed, not saving tokens.hooks/route_model.py in the switchboard-hook plugin runs on UserPromptSubmit. Keywords pick the tier: Opus words first (architecture, security, auth, flaky, root cause, migrate, rewrite...), then code verbs or prompts over 1,500 characters go to Sonnet, then short questions go to Haiku. Anything else defaults to Sonnet. It reads the current model and effort from the end of the transcript, because the hook input carries neither. It stays quiet when the current setting fits and when the prompt is an acknowledgement or a slash command. It routes every prompt that does not fit, not only the first, but worth_routing() drops the step-downs a cold subagent would make dearer: everything but routine code changes. Past each 100k tokens of context it also adds a session-size line with this session's artifact links; the session-fit skill handles that line (stay, subagent or new session with a carry-over brief).
switchboard: this looks like <reason>; <Model> at effort <level> fits for fewer tokens | a better result. You are on <current>. Route it: call the Agent tool with model "<alias>", effort "<level>", subagent_type "general-purpose" and a complete brief (...). Relay its result; do not redo the work. Skip routing if you are already on <Model> at effort <level>, or the prompt only needs this conversation.
Key decision in this skill: stepping down to Haiku or Sonnet for work that touches security, auth, data model or money, or that the user called hard.
Before suggesting that, get a second opinion: call the Agent tool with model: "opus" (subagent_type Plan, read-only). Give it the prompt, the two settings in one line each, and the risk of each. Ask for a pick and what would change its mind.
Spend the strong models on judgment and the cheap ones on volume. When this skill spawns subagents with the Agent tool, set model by role:
| Role | Model | Use for |
|---|---|---|
| Think | fable (Fable 5.2), or opus when limits are tight | Plan, decompose, pick an approach. One call, read-only (subagent_type: "Plan"). |
| Execute | sonnet (Sonnet 5.5) | Write and edit code, run checks, produce the deliverable. |
| Review | opus (Opus 5.5) | Check the finished work before reporting: correctness, security, money, data loss. |
| Swarm | haiku (Haiku 5.5) | Many small parallel jobs: search, read, extract, classify, per-file scans. |
mcp__ccd_session_mgmt__get_usage (load it with ToolSearch if deferred). Use fable only when every window has room: 5-hour limit under 70% used, "Weekly · all models" under 80%, and "Weekly · Fable" (if listed) under 80%. Otherwise use opus. If the tool is missing, or its status is unavailable or not_applicable (API key, Bedrock, Vertex), use opus. Say the pick in one line: Think: <model> (5h <n>%, weekly <n>%, Fable <n>%).Lessons from earlier runs live in two files: ~/.claude/skill-lessons/model-routing.md (any repo) and .claude/skill-lessons/model-routing.md at the repo root (this repo only).
- <YYYY-MM-DD>: <do or avoid X> because <Y>. (seen: 1). When a line already says the same thing, raise its seen count and date instead of adding one. Facts about this repo go in the repo file, everything else in the user file. Keep each file under 30 lines by merging or dropping stale lessons.seen: 3: if the ashish-claude-skills source repo is open, propose the edit to plugins/switchboard/skills/model-routing/SKILL.md as a diff and wait for a yes, then delete the lesson once it lands; otherwise say Lesson ready to promote: <line> in the report.Learned: <the line written | nothing>.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
model-routing, cost-optimization, token-saving, effort-levels
Other plugins' skills for the same job
2 skills in this plugin
npx claudepluginhub ashishyd/ashish-claude-skills --plugin switchboard