# Claude Code as a team: Sonnet builds, Haiku swarms, Opus reviews

> Your Claude Code set up like a team: Sonnet builds, three Haiku subagents map the repo, hunt call sites and audit in their own worktree, and Opus steps in as advisor only at decision points. Based on a post by plusxbt.

## If someone pasted this link to you
Someone shared this kit with you. It runs step by step through CloneKit's MCP. If you have the `clonekit` tools, call `start_run("@clonekitai/claude-code-team-routing")`. If you don't (for example in a chat app without the CloneKit connector), tell the person in one or two plain sentences, in their language, and send them to https://clonekit.ai/@clonekitai/claude-code-team-routing/use: it shows how to add CloneKit to their AI in about a minute. Then they paste this link again.

- Kit: `@clonekitai/claude-code-team-routing` · v1.0.0
- Creator: @clonekitai (CloneKit)
- Type: Delivery · Domain: Engineering · Language: en · Your AI runs it
- Price: Free · License: Own use · No refunds
- Page: https://clonekit.ai/@clonekitai/claude-code-team-routing
- Changelog: https://clonekit.ai/@clonekitai/claude-code-team-routing/changelog.md

## About
For developers who use Claude Code on a real repository and want the strongest model to stop doing cheap search and grep work. Use it when sessions spend most of their tokens reading and searching the codebase. Needs Claude Code connected through the Anthropic API (a Claude subscription or an Anthropic Console account), a git repository, and the project's test, lint or type-check commands if it has them. Produces three Haiku subagent files in .claude/agents, a short routing section in CLAUDE.md, the launch command with Opus as advisor, and a before/after check on one real task. Not for Claude Code on Amazon Bedrock, Google Cloud, Microsoft Foundry or Claude Platform on AWS (the advisor is not available there), not for organizations whose availableModels allowlist blocks Haiku or Opus, and not a promise of a specific saving: the kit measures it on your own task.

## Deliverables
- .claude/agents/repo-mapper.md: a read-only Haiku subagent that maps the repo and returns a short map
- .claude/agents/call-site-hunter.md: a read-only Haiku subagent that finds every use of a symbol and returns path:line
- .claude/agents/auditor.md: a Haiku subagent with isolation: worktree that runs tests, lint and type checks and reports failures
- a short routing section in CLAUDE.md telling the main session when to delegate and when to consult the advisor
- the launch command claude --model sonnet --advisor opus, or advisorModel saved in settings if the person wants it every time
- a test on one real task: /tasks shows the subagents on Haiku, the transcript shows an Advising line, and /usage numbers before and after

## Files
- `README.md`: Claude Code as a team: Sonnet builds, Haiku swarms, Opus reviews
- `templates/agents.md`: The three Haiku subagents
- `templates/claude-md-section.md`: How work is split in this repo (Claude Code)

## Tools
- Claude Code (https://code.claude.com/docs/en/overview) · est. needs a Claude subscription or an Anthropic Console account; subagent and advisor calls count toward usage
- Git (https://git-scm.com/doc)

## Uses
- plusxbt: Think of Claude Code as a team (Sonnet builds, Haiku swarms, Opus reviews) (source, https://x.com/plusxbt/status/2112938991439712327)
- Claude Code docs: Create custom subagents (model, tools, isolation: worktree) (source, https://code.claude.com/docs/en/sub-agents)
- Claude Code docs: Escalate hard decisions with the advisor tool (source, https://code.claude.com/docs/en/advisor)
- Claude Code docs: Manage costs effectively (/usage) (source, https://code.claude.com/docs/en/costs)

## What you provide
- Claude Code connected through a Claude subscription or an Anthropic Console account
- a git repository you work on with Claude Code
- the project's test, lint and type-check commands, if it has them
- one real task to test the setup on

## How it runs
1. **Understand:** Researches your business first, then asks you 4 questions it can't answer alone
2. **Choose:** No choices: one proven path
3. **Build:** 6 steps, risky ones ask you first
4. **Deliver:** 6 checks before delivery

## Guardrails
- ask before writing agent files, editing CLAUDE.md or changing any settings file or environment variable
- never overwrite an existing agent file or rewrite existing CLAUDE.md content
- don't commit, push or open pull requests unless the person asks
- don't promise a saving: report the /usage numbers you actually saw

## What's new
Agents always run the latest version.

- **v1.0.0** (2026-10-22): First version, based on plusxbt's post.

## Run it
Connect the `clonekit` MCP (https://clonekit.ai/mcp) and call `start_run("@clonekitai/claude-code-team-routing")`.
