# Model Router

> Routes work to capability tiers (fast, coding, deep-reasoning, long-context, writing) with fallbacks and a suggested skill sequence. Use before costly multi-step work. Emits ROUTE_DECISION. Never performs the engineering task itself and never hardcodes ephemeral vendor model marketing names as the only option.

- Skill: `willianbs/model-router` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add willianbs/model-router`
- Raw SKILL.md: https://api.skillmd.com/api/skills/willianbs/model-router/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Marketing & Growth
- Author: willianbs (https://skillmd.com/u/willianbs)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/willianbs/model-router

---


# Purpose

Pick the cheapest capability tier that still yields excellent results, and suggest which OS skills to run.

# When to Use / When NOT to Use

**Use when:** starting a non-trivial task; cost/latency matters; engineering-os wants a tier hint.

**Do not use when:** user already pinned a model; task is already mid-flight with a working setup.

# Preconditions

Task description available. Optional: risk, context size estimate, deadline.

# Inputs / Outputs

**Inputs:** task, risk, rough context size, iteration expectation.

**Outputs:** `ROUTE_DECISION`

# Upstream / Downstream

**Upstream:** engineering-os, user.

**Downstream:** whatever skills are suggested—router does not execute them.

# Core Principles

1. Optimize quality-to-cost.
2. Route by capability tier, not brand names.
3. Risk elevates tier.
4. Large context elevates long-context tier or demands context-loader first.
5. Always provide a fallback chain.
6. Prefer skill sequence over “use a bigger model for everything.”
7. Never do the task.

# Process

1. **Classify** — architecture, coding, debugging, review, docs, security, etc.
2. **Complexity** — Trivial → Very High (reasoning depth, unknowns, cross-service—not just file count).
3. **Risk** — Low/Medium/High/Critical elevates tier one step when ≥ High.
4. **Context** — if huge, recommend context-loader + long-context tier; avoid stuffing.
5. **Select tier:**

| Tier | Use for |
|------|---------|
| `fast` | tiny edits, formatting, simple Q&A |
| `coding` | implementation, tests, focused refactors |
| `deep-reasoning` | architecture, security strategy, hard bugs, ADRs |
| `long-context` | large diffs, multi-package reasoning when necessary |
| `writing` | docs, PR prose, RFC polishing |

6. Map tiers to the user’s available models (from their environment) without assuming a specific vendor SKU. If unknown, name the tier and let the host pick.
7. Suggest ordered skills (usually via engineering-os paths).
8. Fallback chain: e.g. deep-reasoning → coding → fast.

# Evidence Requirements

Brief rationale tied to complexity/risk/context. No fake token counts.

# Stop Conditions / Failure Modes

| Condition | Action |
|-----------|--------|
| Insufficient task info | Ask one clarifying question; default coding + standard path |
| Preferred tier unavailable | Use next fallback |

# Severity + Confidence

Risk feeds tier. Confidence on classification if ambiguous.

# Output Contract

```
## ROUTE_DECISION
Tier: fast | coding | deep-reasoning | long-context | writing
Fallback chain: ...
Suggested skills: [ordered]
Path hint: lite | standard | incident | architecture | review-only
Rationale: ...
Decision: Proceed
```

# Handoffs

- **engineering-os** — execute suggested path
- Individual skills as listed

# Never

- Never hard-require “Claude Opus” / “GPT-X” as the only answer—tiers first.
- Never perform implementation/review inside the router.
- Never upsell the largest model for chores.

