/sp-ecc:model-routingfrom sp-ecc
Classifies tasks and routes them to the appropriate model tier (Opus/Sonnet/Haiku) based on complexity, with scoring guides and escalation triggers for bug debugging.
Ships in sp-ecc. 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.
Route tasks to the most cost-effective model while maintaining quality.
| Tier | Model | Cost | Use For |
|---|---|---|---|
| Opus | claude-opus-4-6 | $$$ | Complex reasoning, architecture, planning |
| Sonnet | claude-sonnet-4-6 | $$ | Implementation, code execution, debugging |
| Haiku | claude-haiku-4-5 | $ | Simple edits, docs, formatting, boilerplate |
Use Opus ONLY for:
Use Sonnet for:
Default to Sonnet for bugs. Escalate to Opus only when needed.
Count these complexity signals (+1 each):
| Signal | Example |
|---|---|
| Multi-file | Spans 3+ files/services |
| No stack trace | No clear error location |
| Intermittent | Doesn't always reproduce |
| Concurrency | Race conditions, async issues |
| State-dependent | Needs specific event sequence |
| Performance | Memory leak, CPU spike |
Scoring:
Escalate to Opus when ANY trigger fires:
| Trigger | Threshold |
|---|---|
| Failed fixes | ≥3 attempts didn't resolve |
| Circular investigation | Revisiting same files 2+ times |
| Scope expansion | Started with 1-2 files, now 5+ |
| Hypotheses disproven | 3+ theories tested and failed |
| Mystery fix | Fixed it but don't know why |
| Complexity discovered | Found race condition/state issue |
Self-check after each attempt:
Fixes tried: [N] | Files touched: [N] | Confidence: [H/M/L]
If confidence=LOW and fixes≥2 → Opus
Use Haiku for:
┌─────────────────────────────────────┐
│ Incoming Task │
└──────────────┬──────────────────────┘
│
▼
┌─────────────────────────────────────┐
│ Does it require deep reasoning, │
│ planning, or architecture? │
└──────────────┬──────────────────────┘
│
Yes │ No
┌─────────┴─────────┐
▼ ▼
┌─────────┐ ┌─────────────────────┐
│ OPUS │ │ Is it mechanical, │
│ (Plan) │ │ repetitive, or │
└─────────┘ │ documentation-only? │
└──────────┬──────────┘
│
Yes │ No
┌─────────┴─────────┐
▼ ▼
┌─────────┐ ┌─────────┐
│ HAIKU │ │ SONNET │
│ (Apply) │ │ (Build) │
└─────────┘ └─────────┘
When given a complex task, decompose it:
1. OPUS PHASE: Analyze and plan
- Understand requirements
- Use brainstorm skill if needed to be fully aligned with the user
- Design architecture
- Create implementation steps
- Identify edge cases
2. SONNET PHASE: Execute the plan
- Write core logic
- Review code, return to previous step if found issue
- Implement features
- Review again, return to previous step if found issue, or to Write core logic if needed. make it a loop until the reviews are passed successfuly
- Write tests
- Debug issues
- again, final review
3. HAIKU PHASE: Polish and finalize
- Add docstrings
- Format code
- Update README
- Apply boilerplate
| Task | Without Routing | With Routing | Savings |
|---|---|---|---|
| Plan + Build feature | All Opus | Opus→Sonnet | ~60% |
| Build + Document | All Opus | Sonnet→Haiku | ~80% |
| Full workflow | All Opus | Opus→Sonnet→Haiku | ~70% |
Ask yourself:
Default to Sonnet when uncertain—it handles most tasks well at moderate cost.
Avoid these costly mistakes:
What SKILL.md sets; muted values are Claude Code's defaults
56 skills in this plugin
/backend-patternsBackend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes./brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation./clarify-firstUse before starting any task. Forces the agent to ask the user for clarification whenever it is confused, missing required information, or about to make assumptions. Prevents silent guessing and ensures requirements are fully understood before executing.npx claudepluginhub faisalalqarni/sp-ecc --plugin sp-eccOther plugins' skills for the same job