بنقرة واحدة
Model selection guidance — match task complexity to model capability
npx skills add https://github.com/andrem-sec/psc-comet --skill model-routerانسخ والصق هذا الأمر في Claude Code لتثبيت المهارة
Model selection guidance — match task complexity to model capability
npx skills add https://github.com/andrem-sec/psc-comet --skill model-routerانسخ والصق هذا الأمر في Claude Code لتثبيت المهارة
| name | model-router |
| description | Model selection guidance — match task complexity to model capability |
| version | 0.1.0 |
| level | 1 |
| triggers | ["which model","model router","use haiku","use opus","cost-sensitive"] |
| context_files | [] |
| steps | [{"name":"Classify Task","description":"Identify the task category and complexity"},{"name":"Apply Routing Rules","description":"Match to model tier using the routing table"},{"name":"State Recommendation","description":"Name the model and the reason in one line"}] |
Match the task to the right model. Using Opus on trivial tasks wastes money. Using Haiku on complex reasoning tasks wastes time and produces wrong answers.
Without routing guidance, every task defaults to the same model regardless of whether it needs that model's capability. The result is either unnecessary cost (heavy model on simple tasks) or degraded quality (light model on complex tasks).
Pro plan note: Opus requires Anthropic Max plan. If on Pro plan, Sonnet will still work for agent/tool selection but may default to suboptimal choices. Treat Opus as a soft recommendation, not a hard requirement, for this category.
Apply the same logic to agent model selection in frontmatter:
model: claude-haiku-4-5-20251001 # retrieval, simple execution
model: claude-sonnet-4-6 # standard work (default)
model: claude-opus-4-6 # deep reasoning, high stakes
Before delivering Sonnet output, scan for low-confidence signals. If any are present, escalate to Opus and re-run the same prompt before delivering:
Escalation signals:
On escalation:
Do not escalate on tasks where Sonnet hedging is appropriate (open-ended questions, design tradeoffs with no clear winner). Escalate only when a concrete answer was expected and Sonnet failed to commit.
When a model fails or produces poor output, escalate to the next tier:
Haiku → Sonnet: If Haiku produces incorrect or incomplete output Sonnet → Opus: If Sonnet gets stuck or produces low-confidence results Opus → Human: If Opus cannot solve the problem, surface to user
Document the fallback decision:
Primary model: Haiku (simple transformation)
Result: Failed - produced malformed JSON
Fallback model: Sonnet
Result: Success
Reason for escalation: Task complexity was misjudged, required parsing ambiguous input
This creates a trail showing why model selection changed mid-task.
If a task cannot be completed in 15 minutes, it is not a unit — it is a task list.
Break it down:
Example of bad decomposition:
Example of good decomposition:
Why 15 minutes: Matches human attention span, allows frequent checkpoints, makes progress measurable.
Model routing + 15-min rule: If a Sonnet task takes >15 minutes, either decompose further OR escalate to Opus.
Running 10 Haiku calls costs roughly the same as 1 Sonnet call. Running 10 Sonnet calls costs roughly the same as 1 Opus call.
For batch operations on simple tasks, always use Haiku. For orchestrator-level decisions in agent teams, consider Opus. For most interactive work, Sonnet is correct.
In multi-agent workflows, model assignment is per agent role, not per session. The session default does not override an agent's role-based assignment.
Rule: Assign models in the agent's spawn prompt or YAML frontmatter, not in the orchestrator's session config.
Architect agent → Opus (even if session default is Sonnet)
Implementer agent → Sonnet
Verifier agent → Sonnet
Classifier agent → Haiku
Reference agentic-engineering skill for the full per-role table and rationale.
Do not route to Opus because a task feels important. Route to Opus because it requires deep multi-step reasoning that Sonnet demonstrably gets wrong.
Do not route to Haiku because you want to save money on a task where quality matters.
Convert PDF/EPUB library to Markdown and generate Obsidian MOC notes
Hook-based compaction suggestions at logical task boundaries
Context window management — track spend, decide when to compact, preserve state
Session-start orientation — loads context, surfaces learnings, confirms registry
Quality and semantic review — catches what automated tools miss
Planner → Architect → Critic deliberation loop — produces a formally validated ADR