# Harness Model Router

> Use when harness-orchestrator is about to dispatch parallel subagents, to classify each task by complexity and annotate it with the right model tier (haiku/sonnet/opus) so cheaper models handle trivial work automatically.

- **Type:** Skill
- **Install:** `agentstack add skill-chetan25-harness-claude-skills-harness-model-router`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [chetan25](https://agentstack.voostack.com/s/chetan25)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [chetan25](https://github.com/chetan25)
- **Source:** https://github.com/chetan25/harness-claude-skills/tree/main/skills/harness-model-router

## Install

```sh
agentstack add skill-chetan25-harness-claude-skills-harness-model-router
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Harness Model Router

Classify a list of parallel task descriptions by complexity and emit a routing table that maps each task to a model tier. **You do this yourself** — read each task description and apply the classification procedure below.

## When to run
- Called by `harness-orchestrator` at step 5, immediately before building the `Agent()` call list for independent parallel tasks.
- No-op for serial tasks — only invoke when tasks are genuinely parallel.

## Procedure

### 1. Receive the parallel task list
Take the list of parallel task descriptions from `harness-orchestrator`. Each entry is a short description of independent work.

### 2. Classify each task

Apply both signals in order. Keywords can only **upgrade** a tier, never downgrade.

#### Signal 1 — Task type (primary signal)

| Task type | Tier |
|---|---|
| Read-only / explanation | haiku |
| Trivial mutation (rename, typo, constant, comment) | haiku |
| Code generation (component, endpoint, hook, service) | sonnet |
| Standard feature addition | sonnet |
| Cross-cutting reasoning (debug across layers, investigate) | opus |
| Architecture / design / migration | opus |

#### Signal 2 — Keyword scan (confirms or upgrades)

| Keywords present | Tier signal |
|---|---|
| `rename`, `typo`, `comment`, `explain`, `describe`, `list`, `show`, `format` | haiku |
| `add`, `create`, `write`, `implement`, `update`, `build`, `generate`, `test`, `endpoint`, `component`, `hook` | sonnet |
| `refactor`, `debug`, `design`, `architect`, `analyze`, `migrate`, `restructure`, `investigate`, `across`, `system-wide` | opus |

#### Tie-breaking rules

- **Ambiguous → sonnet.** Never silently under-allocate.
- **Multiple modules or layers mentioned → minimum sonnet.** Upgrade to opus if opus keywords are also present.
- **Keywords only upgrade.** A haiku-type task with sonnet keywords becomes sonnet. Never the reverse.

### 3. Emit the routing table

Output the table in context (do **not** write to a file — it is ephemeral per dispatch):

```
ROUTING TABLE — 
  [1] ""   → haiku
  [2] ""   → sonnet
  [3] ""   → opus
```

The run identifier is a short label (e.g. the batch name or a sequential counter) so multiple routing calls in the same session are distinguishable.

`harness-orchestrator` reads this table and passes `model: ""` to each `Agent` call.

## Model tier reference

| Tier | Model ID | Best for |
|---|---|---|
| haiku | `claude-haiku-4-5-20251001` | Trivial mutations, read-only, explanations |
| sonnet | `claude-sonnet-4-6` | Code generation, standard feature work, tests |
| opus | `claude-opus-4-8` | Architecture, cross-cutting refactors, debugging across layers |

## See also
- `harness-orchestrator` — invokes this skill before parallel dispatch
- `superpowers:dispatching-parallel-agents` — the dispatch mechanism this routing feeds into

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [chetan25](https://github.com/chetan25)
- **Source:** [chetan25/harness-claude-skills](https://github.com/chetan25/harness-claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-chetan25-harness-claude-skills-harness-model-router
- Seller: https://agentstack.voostack.com/s/chetan25
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
