# Model Route

> Recommends the optimal Claude model tier (Opus, Sonnet, or Haiku) for a given task by analyzing reasoning depth, blast radius, domain expertise, output length, and correctness cost, and suggests parallelization opportunities.

- Skill: `samyakjhaveri/model-route` (Agent Skill)
- Install (CLI): `npx skillmds add samyakjhaveri/model-route`
- Raw SKILL.md: https://api.skillmd.com/api/skills/samyakjhaveri/model-route/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML, Agent Building
- Tags: Cost Optimization, Haiku, Model Routing, Opus, Sonnet, Task Analysis
- Author: SamyakJhaveri (https://skillmd.com/u/samyakjhaveri)
- Updated: 2026-08-22
- Page: https://skillmd.com/skills/samyakjhaveri/model-route

---


# Model Route Advisor

Recommend the optimal Claude model for a given task based on Osmani's multi-model
routing principle. Analyzes task complexity, token budget, and parallelization
opportunities to suggest the best model allocation.

**Trigger:** When user types `/model-route` or `/model-route "<task description>"`

## Arguments

- `$ARGUMENTS` — optional task description in quotes. If omitted, prompt the user
  to describe what they want to do.

## Policy Context

Check your project's CLAUDE.md for any model selection policy. The routing
recommendation is advisory — it shows what the optimal allocation WOULD be under a
cost-optimized policy. The user decides whether to follow it or stick with their
preferred model.

## Routing Matrix

### Tier 1: Opus (highest capability, highest cost)

**Route to Opus when the task involves:**
- Architecture decisions or system design
- Complex debugging across multiple files
- Security review or adversarial analysis
- Planning and plan-reviewer verification
- Paper writing, scientific argumentation
- Interpreting eval results or research claims
- Self-critic and validation waves
- Any task where a wrong answer is expensive to fix

**Token estimate:** 10K-50K per task (high reasoning depth)

### Tier 2: Sonnet (strong capability, moderate cost)

**Route to Sonnet when the task involves:**
- Implementing a well-defined plan (code already designed)
- Writing boilerplate or mechanical code changes
- Routine refactoring with clear patterns
- Data migration or format conversion scripts
- Adding tests for existing code (test patterns clear)
- Subagent work with structured output requirements

**Token estimate:** 5K-20K per task (less reasoning, more generation)

### Tier 3: Haiku (fast, lowest cost)

**Route to Haiku when the task involves:**
- Commit message generation
- File formatting and linting
- Simple lookups (find a function, check a value)
- Mechanical git operations (push, tag, branch)
- Generating structured data from templates
- Simple text transformations

**Token estimate:** 1K-5K per task (minimal reasoning needed)

## Workflow

### Step 1: Analyze the Task

Parse the task description and classify it along these dimensions:

| Dimension | Low | High |
|-----------|-----|------|
| **Reasoning depth** | Mechanical, pattern-following | Novel, requires inference |
| **Blast radius** | Single file, reversible | Multi-file, hard to undo |
| **Domain expertise** | Generic programming | HPC/CUDA/research-specific |
| **Output length** | Short (< 500 tokens) | Long (> 2K tokens) |
| **Correctness cost** | Easy to verify, cheap to retry | Hard to verify, expensive if wrong |

### Step 2: Generate Recommendation

Present the recommendation in this format:

```
=== MODEL ROUTE: <task summary> ===

Recommended: <MODEL> (<tier>)

Reasoning:
  - <dimension 1>: <assessment> -> <model implication>
  - <dimension 2>: <assessment> -> <model implication>
  - <dimension 3>: <assessment> -> <model implication>

Token estimate: ~<N>K tokens
Cost estimate: ~$<X.XX> (at current pricing)

Project policy: see CLAUDE.md (this recommendation is advisory)
```

### Step 3: Suggest Parallelization (if applicable)

If the task can be decomposed, suggest splitting:

```
Parallelization opportunity:
  Instead of 1 Opus call (~40K tokens, ~$X.XX):
  - 3 Sonnet subagents (~15K each, ~$X.XX total)
  - Each handles: <subtask description>
  - Savings: ~<N>% cost, ~<N>x faster (parallel execution)
```

Only suggest parallelization when subtasks are genuinely independent and don't
need shared state or sequential reasoning.

### Step 4: Note Alternatives

If the task sits at a boundary between tiers:

```
Alternative approaches:
  a) <Model A>: <tradeoff> (e.g., "Opus for safety, +$0.50")
  b) <Model B>: <tradeoff> (e.g., "Haiku for speed, risk of shallow analysis")
  c) <Split>: <tradeoff> (e.g., "Opus for planning + Sonnet for implementation")
```

## Project-Specific Routing Rules

Override the general matrix based on your project's needs. Examples:

| Task | Suggested Model | Reason |
|------|----------------|--------|
| Architecture decisions | Opus | Wrong decisions are expensive to fix |
| Paper / scientific writing | Opus | Deep reasoning required |
| Commit + push | Haiku | Mechanical git operations |
| `/validate` waves | Opus | Self-critic requires adversarial reasoning |
| `/catchup` briefing | Haiku | Mechanical: run git commands, format output |
| Boilerplate generation | Sonnet | Pattern-following, no deep reasoning |

## Context Management

This skill is pure analysis — no file reads, no subagents, no bash commands.
It analyzes the task description and produces a recommendation. Total output: ~20 lines.

