agentleFS
kienbui1995kienbui1995/magic-powers/skills/model-selection-guide/SKILL.md

model-selection-guide

Skill0 starsChanged 8 months agoMITView on GitHub

Use when choosing between Claude models for a task — decision tree for Haiku/Sonnet/Opus based on task type, cost estimates, escalation triggers, and cascade patterns.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use Opus even for "simple" tasks if:

    line 47
  2. Distinctive:

    Use Haiku even for "complex" tasks if:

    line 51
  3. Distinctive:

    When uncertain, start cheaper and escalate only if needed:

    line 81
  4. Distinctive:

    Never using Haiku (leaving 60x savings on the table for review tasks)

    line 127

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Model Selection Guide

When to Use

  • Unsure which model to use for a specific task
  • Want to reduce cost without sacrificing quality
  • Designing a multi-phase workflow with model assignments per phase
  • @workflow-model-advisor uses this as its decision framework

Core Jobs

1. Decision Tree

Step 1: Identify task type

Is this primarily reading + pattern matching + structured output?
  → Haiku (fast, cheap, accurate for structured tasks)
  Examples: code review, lint check, classify intent, format output,
            summarize doc, extract fields, check compliance

Is this implementation, debugging, or moderate reasoning?
  → Sonnet (balanced quality + cost)
  Examples: write code, fix bug, explain concept, write tests,
            analyze trade-offs (simple), build feature

Is this deep architecture, novel problem, or complex multi-step reasoning?
  → Opus (highest capability, use sparingly)
  Examples: system design, architecture decisions, evaluate complex trade-offs,
            research synthesis, "should we X or Y?" with many unknowns

Step 2: Apply cost heuristic

ModelRelative costSpeedBest for
Haiku$ (1x)FastestReview, classify, format, extract
Sonnet$$ (5x)FastImplement, debug, explain, write
Opus$$$$ (15x)SlowerDesign, architecture, deep analysis

Step 3: Check override conditions

Use Opus even for "simple" tasks if:

  • Task has irreversible consequences (production changes, data migrations)
  • Previous Sonnet attempt produced insufficient output

Use Haiku even for "complex" tasks if:

  • Output is structured/templated (Haiku excels at templates)
  • Task is repetitive across many items (batch processing)
  • Speed is critical and quality threshold is moderate

2. Per-Workflow Model Assignments

WorkflowPhaseAgentModelWhy
featureplan@architectOpusArchitecture decisions need deep reasoning
featureimplementsubagentSonnetCode generation, balanced
featuretestsubagentSonnetTest writing needs understanding
featurereview@reviewerHaikuPattern matching, structured output
bugfixreproducesubagentSonnetNeeds to understand codebase
bugfixdiagnose@debuggerSonnetSystematic debugging
bugfixfixsubagentSonnetCode fix, minimal
bugfixverify@reviewerHaikuCheck fix completeness
refactoranalyze@architectOpusUnderstanding complex structure
refactorplan@architectOpusDesign target state
refactorimplementsubagentSonnetMechanical refactoring
refactorreview@reviewerHaikuPattern check
researchgathersubagentSonnetInformation gathering
researchsynthesize@architectOpusComplex reasoning over options
researchdocument@technical-writerHaikuStructured doc output
incidenttriage@debuggerSonnetFast diagnosis
incidenthotfixsubagentSonnetMinimal fix
incidentpostmortem@technical-writerHaikuStructured template

3. Cascade Pattern

When uncertain, start cheaper and escalate only if needed:

1. Try Haiku → evaluate output quality
2. If insufficient → escalate to Sonnet → evaluate
3. If still insufficient → escalate to Opus
4. Never auto-escalate without notifying user of cost increase

4. Cost Estimates Per Task

Task typeModelEstimated cost
Code review (500 lines)Haiku~$0.01
Bug fix (small)Sonnet~$0.05-0.15
Feature implementationSonnet~$0.10-0.50
Architecture designOpus~$0.50-2.00
Research synthesisOpus~$0.50-1.50

Cost reminder: Opus = 15x Haiku. Code review in Opus costs 15x more with same quality output.

Key Concepts

  • Haiku — fast, cheap, accurate for structured/pattern tasks; NOT for deep reasoning
  • Sonnet — balanced for most implementation; default for unknown tasks
  • Opus — most capable; use only when task genuinely requires deep reasoning
  • Cascade — start cheap, escalate if output quality insufficient
  • Cost multiplier — Opus = 15x Haiku; always ask "does this task need Opus?"

Checklist

  • Task type identified before selecting model?
  • Haiku considered first for review/classification/formatting tasks?
  • Opus reserved for genuine architecture/deep-reasoning tasks?
  • User notified if escalating from Haiku to Opus (15x cost increase)?
  • Per-phase model assignments made for multi-phase workflows?

Key Outputs

  • Model recommendation with reasoning + cost estimate
  • Cascade suggestion if task type is ambiguous

Output Format

  • 🔴 Critical — using Opus for code review or formatting (massive overspend), using Haiku for architecture decisions (under-powered)
  • 🟡 Warning — defaulting to Sonnet for everything without considering Haiku for structured tasks
  • 🟢 Suggestion — use cascade pattern for uncertain tasks, assign Haiku to all review phases

Anti-Patterns

  • Using Opus as the safe default (expensive, often unnecessary)
  • Never using Haiku (leaving 60x savings on the table for review tasks)
  • Using model complexity as proxy for task importance
  • Switching models mid-task without reason (inconsistent output)

Integration

  • workflow-templates — model assignments per phase come from this skill
  • @workflow-model-advisor uses this as its decision framework
  • @workflow-orchestrator reads model assignments when dispatching phase subagents

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.