Select optimal Claude model tier (Haiku/Sonnet/Opus) for any task using Mixture of Experts routing — 5 modes including tier classification, cascade escalation, parallel expert panel, domain routing, and budget governance
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Select optimal Claude model tier (Haiku/Sonnet/Opus) for any task using Mixture of Experts routing — 5 modes including tier classification, cascade escalation, parallel expert panel, domain routing, and budget governance
Model Router — Mixture of Experts Routing
When to activate
User asks which Claude model to use for a task ("should I use Opus or Haiku?")
Optimizing cost by routing to the cheapest capable model tier
Building a multi-agent workflow and need to assign model tiers to subtasks
User mentions "MoE", "model routing", "tier selection", "cost optimization", "smart model selection"
Debugging a workflow where wrong model was selected for a task
Understanding Haiku/Sonnet/Opus capability boundaries and when to switch between them
Session has token budget constraints and needs dynamic routing
When NOT to use
Model is already explicitly specified by the user (no routing needed)
Single short interactive conversation where overhead exceeds benefit
Runs the same task prompt against all 3 model tiers simultaneously, aggregates results via voting.
Voting strategies:
Majority: Tier chosen by most experts wins (e.g., 2/3 vote for Sonnet)
Confidence-weighted: Score each tier by average confidence; highest-confidence tier wins
Synthesis: Return all 3 results for an external judge model (Sonnet) to synthesize consensus
When to use: High-stakes decisions (security designs, architecture choices) where you want consensus from diverse model strengths. Costs 3x more upfront but reduces escalation/retry risk.
Routes by file paths and task domain, without inspecting task text deeply.
Domain rules (checked in priority order):
Path Pattern
Domain
Tier
Reasoning
security/, auth, credentials, secrets, cors
Security
Opus
High stakes, exploit-adjacent
architecture/, .yaml, .yml, .tf
Infra/Architecture
Opus
System design decisions
data/, ml/, .py
Data/ML
Sonnet
Complex but not architectural
.ts, .tsx, .js, .jsx
Source Code
Sonnet
Coding work, balanced reasoning
.md, .txt
Documentation
Haiku
Text formatting only
(no paths provided)
Task classification
Per Tier Router
Falls back to keyword analysis
When to use: Codebases with clear domain structure. Automatic routing with zero inspection overhead. Ideal for high-volume pipelines.
Routing Mode 5: Budget Governor (Token Ratio Thresholds)
Dynamically routes based on remaining token budget as a percentage of total session budget.
Thresholds:
If remaining / total < 15%: Force Haiku (conservation mode; preserve tokens for critical tasks)
If remaining / total >= 50% AND task classified as Opus: Use Opus (budget permissive)
Otherwise: Use Tier Router classification
Budget ratio thresholds:
Below 15%: "budget critical" → Haiku only
15–50%: "moderate budget" → Sonnet or Haiku
50%+: "budget healthy" → Any tier permitted
When to use: Long-running sessions with fixed token caps. Ensures you won't run out of tokens mid-session by auto-downgrading complexity under budget pressure.
Budget impact: At 60% budget remaining, this Opus task is acceptable. If budget had been 12% remaining, Budget Governor would force Haiku instead despite security domain (conservation mode).
Cost note: Choosing Haiku over Opus saves ~300x on tokens for simple tasks. Cascade Escalator prevents overpaying for easy work while protecting against under-speccing hard problems.