From Occam
Route each coding task to the cheapest Claude model that can do it well, and escalate only on failure. This is the cost lever ponytail-style rulesets ignore.
How this skill is triggered — by the user, by Claude, or both
Slash command
/occam:model-routingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Right-sizing code cuts output tokens. Routing the task to the cheapest *capable*
Right-sizing code cuts output tokens. Routing the task to the cheapest capable model cuts the price-per-token underneath them, and that's the larger win. A ruleset that saves 50% of output tokens on Opus is still paying 5× the price of Haiku for the same tokens.
| Model | ID | Input | Output | Use for |
|---|---|---|---|---|
| Haiku 4.5 | claude-haiku-4-5 | $1 | $5 | trivial / mechanical |
| Sonnet 4.6 | claude-sonnet-4-6 | $3 | $15 | standard single-file work |
| Opus 4.8 | claude-opus-4-8 | $5 | $25 | hard / ambiguous / multi-file |
Output is 5× input everywhere, and Opus output is 5× Haiku output. So the two biggest levers, in order, are: (1) pick the cheapest capable model, (2) emit fewer output tokens. Occam's core ruleset does (2); this skill does (1).
Route on the hardest sub-step the task contains, not its surface size.
Haiku 4.5, trivial / mechanical. No design decisions; the answer is mechanical once you read the code.
Sonnet 4.6, standard. One file, clear requirement, a real but bounded decision.
Opus 4.8, hard. Spans files, the requirement is ambiguous, or a wrong answer is expensive or hard to detect.
Start one tier below your first instinct and escalate on a concrete signal, it's cheaper to retry on a bigger model than to default everything to Opus.
Escalate when any of these fire:
De-escalate the next task if the current one finished comfortably below tier.
Switching models mid-conversation invalidates the prompt cache (caches are
model-scoped, see caching/NOTES.md). So:
Default to Sonnet. Drop to Haiku when the task is mechanical. Reach for Opus only when a wrong answer is expensive or the problem spans files. Escalate on a failed check, never on a hunch.
npx claudepluginhub borghei/occam --plugin occamProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.