Team Lead — Compose & Coordinate Agent Teams
Analyze a task, pick the right team shape, spawn agents with the right skills, coordinate work.
Step 0: Detect the Stack and Project Config
Before spawning agents, check for .claude/project.local.json (local override) then .claude/project.json (build commands) and read CLAUDE.md / AGENTS.md for project conventions. Then detect the stack:
${CLAUDE_PLUGIN_ROOT}/scripts/cli init # creates .claude/project.json if missing
All spawned agents read this file — no per-agent re-detection needed.
Model Tiers
| Tier |
Model |
Use for |
| Think |
sonnet |
Planning, architecture, debugging, review, decisions |
| Execute |
haiku |
Implementation, commands, edits, fixes, formatting |
Default to haiku. Use sonnet only when reasoning depth matters.
Engineering Role Roster
Each role maps to a skill. Spawn the agent and tell it which skill to use.
| Role |
Skill |
Owns |
| Architect |
/architect |
System design, DB selection, API contracts, project structure |
| Backend |
/buildit |
API routes, services, business logic, background jobs |
| Frontend |
/buildit + /design |
Components, UI state, client-side logic, responsiveness |
| Database |
/architect |
Schema design, migrations, query optimization, indexes |
| API |
/buildit + /architect |
Endpoint design, versioning, auth, request/response contracts |
| UI/UX |
/design |
Layout, component patterns, accessibility, visual consistency |
| Reviewer |
/review |
Cross-cutting quality gate — trust boundaries, N+1s, races |
| DevOps |
/devops |
CI/CD, Docker, infra, monitoring, deployment |
| Security |
/security |
Auth, OWASP, compliance, encryption |
Business Role Roster
| Role |
Skill |
Owns |
| Strategist |
/strategy |
ICP, competitive intel, positioning, pricing |
| Growth |
/gtm |
Launch, viral loops, acquisition |
| Copywriter |
/pcp-engine + /voice |
Landing pages, email sequences, conversion |
| Finance |
/finance |
Unit economics, burn, runway, models |
| Sales |
/sales |
Outreach, demos, objection handling |
Team Recipes
Full-Stack Feature (3-4 agents)
Trigger: New features touching UI + API + DB.
| Name |
Model |
Role |
Skill |
| architect |
sonnet |
API contracts, shared types, system design |
/architect |
| backend |
haiku |
Routes, services, DB |
/buildit |
| frontend |
haiku |
Components, UI (blocked by backend API contract) |
/buildit + /design |
| reviewer |
sonnet |
Quality gate after both ship |
/review |
API-Only / Backend Sprint (2 agents)
Trigger: Backend features, API design, DB changes.
| Name |
Model |
Role |
Skill |
| backend |
sonnet |
Design + implement |
/architect + /buildit |
| reviewer |
haiku |
Review after done |
/review |
UI / Design Sprint (2 agents)
Trigger: UI overhaul, component library, design system work.
| Name |
Model |
Role |
Skill |
| designer |
sonnet |
Layout, patterns, component spec |
/design |
| frontend |
haiku |
Implement (blocked by designer) |
/buildit |
Code Quality (2 agents)
Trigger: Tech debt, security audit, pre-release review.
| Name |
Model |
Role |
Skill |
| reviewer |
sonnet |
Correctness, security, patterns |
/review + /security |
| debt |
haiku |
Duplicates, dead code, over-engineering |
/buildit |
Bug Hunt (2 agents)
Trigger: Bug fixes, debugging, production incidents.
| Name |
Model |
Role |
Skill |
| investigator |
sonnet |
Root cause, reproduction |
/review |
| fixer |
haiku |
Implement fix (blocked by investigator) |
/buildit |
Strategic Sprint (2-3 agents)
Trigger: Market research, fundraising, competitive analysis, OKR planning.
| Name |
Model |
Role |
Skill |
| researcher |
sonnet |
Market intelligence, competitors |
/strategy |
| strategist |
sonnet |
Prioritization, roadmap (blocked by researcher) |
/cto or /ceo |
| synthesizer |
sonnet |
Decisions, OKRs, resource calls (blocked by strategist) |
/ceo |
Workflow
- Analyze — Read task, identify roles needed, pick closest recipe (or compose one — cap at 4 agents)
- Create team —
TeamCreate, then TaskCreate for each work item
- Spawn agents —
Agent tool with model tier, role, skill instruction, and team name
- Coordinate —
TaskUpdate to assign, SendMessage for blockers and handoffs
- Gate — Each agent runs
/gate before declaring done
- Memory — After a significant milestone, run
/team-memory to consolidate
- Ship — Run
/shipit to push and open PR
How to instruct an agent to use a skill
When spawning, include the skill in the agent's prompt:
You are the backend engineer on this team. Use /buildit to implement the payments API.
Read the API contract from the architect agent's output before starting.
Run /gate before declaring done.
The agent will invoke the skill by name — no additional wiring needed.
Rules
- Smallest team possible. 2 agents over 3 when feasible.
- Skip the team for single-focus tasks — do it yourself.
mode: "acceptEdits" for builders and fixers, mode: "default" for reviewers.
- Never spawn duplicates — shut down stuck agents first.
- Always assign a reviewer for any work that will be merged.
- Simple tasks don't need teams. Use judgment.
1---2name: team-lead3description: (forwward) Orchestrates multi-agent engineering and business teams by analyzing tasks, selecting team shapes, assigning specialist roles, and coordinating parallel agent work with skill dispatch. Triggers on tasks needing 2+ agents, feature dev with frontend + backend, quality audits, research sprints, bug hunts, or any work that benefits from parallel specialization.4---56# Team Lead — Compose & Coordinate Agent Teams78Analyze a task, pick the right team shape, spawn agents with the right skills, coordinate work.910## Step 0: Detect the Stack and Project Config1112Before spawning agents, check for `.claude/project.local.json` (local override) then `.claude/project.json` (build commands) and read `CLAUDE.md` / `AGENTS.md` for project conventions. Then detect the stack:1314```bash15${CLAUDE_PLUGIN_ROOT}/scripts/cli init # creates .claude/project.json if missing16```1718All spawned agents read this file — no per-agent re-detection needed.1920## Model Tiers2122| Tier | Model | Use for |23|------|-------|---------|24| Think | `sonnet` | Planning, architecture, debugging, review, decisions |25| Execute | `haiku` | Implementation, commands, edits, fixes, formatting |2627Default to `haiku`. Use `sonnet` only when reasoning depth matters.2829## Engineering Role Roster3031Each role maps to a skill. Spawn the agent and tell it which skill to use.3233| Role | Skill | Owns |34|------|-------|------|35| **Architect** | `/architect` | System design, DB selection, API contracts, project structure |36| **Backend** | `/buildit` | API routes, services, business logic, background jobs |37| **Frontend** | `/buildit` + `/design` | Components, UI state, client-side logic, responsiveness |38| **Database** | `/architect` | Schema design, migrations, query optimization, indexes |39| **API** | `/buildit` + `/architect` | Endpoint design, versioning, auth, request/response contracts |40| **UI/UX** | `/design` | Layout, component patterns, accessibility, visual consistency |41| **Reviewer** | `/review` | Cross-cutting quality gate — trust boundaries, N+1s, races |42| **DevOps** | `/devops` | CI/CD, Docker, infra, monitoring, deployment |43| **Security** | `/security` | Auth, OWASP, compliance, encryption |4445## Business Role Roster4647| Role | Skill | Owns |48|------|-------|------|49| **Strategist** | `/strategy` | ICP, competitive intel, positioning, pricing |50| **Growth** | `/gtm` | Launch, viral loops, acquisition |51| **Copywriter** | `/pcp-engine` + `/voice` | Landing pages, email sequences, conversion |52| **Finance** | `/finance` | Unit economics, burn, runway, models |53| **Sales** | `/sales` | Outreach, demos, objection handling |5455## Team Recipes5657### Full-Stack Feature (3-4 agents)58**Trigger**: New features touching UI + API + DB.5960| Name | Model | Role | Skill |61|------|-------|------|-------|62| architect | sonnet | API contracts, shared types, system design | `/architect` |63| backend | haiku | Routes, services, DB | `/buildit` |64| frontend | haiku | Components, UI (blocked by backend API contract) | `/buildit` + `/design` |65| reviewer | sonnet | Quality gate after both ship | `/review` |6667### API-Only / Backend Sprint (2 agents)68**Trigger**: Backend features, API design, DB changes.6970| Name | Model | Role | Skill |71|------|-------|------|-------|72| backend | sonnet | Design + implement | `/architect` + `/buildit` |73| reviewer | haiku | Review after done | `/review` |7475### UI / Design Sprint (2 agents)76**Trigger**: UI overhaul, component library, design system work.7778| Name | Model | Role | Skill |79|------|-------|------|-------|80| designer | sonnet | Layout, patterns, component spec | `/design` |81| frontend | haiku | Implement (blocked by designer) | `/buildit` |8283### Code Quality (2 agents)84**Trigger**: Tech debt, security audit, pre-release review.8586| Name | Model | Role | Skill |87|------|-------|------|-------|88| reviewer | sonnet | Correctness, security, patterns | `/review` + `/security` |89| debt | haiku | Duplicates, dead code, over-engineering | `/buildit` |9091### Bug Hunt (2 agents)92**Trigger**: Bug fixes, debugging, production incidents.9394| Name | Model | Role | Skill |95|------|-------|------|-------|96| investigator | sonnet | Root cause, reproduction | `/review` |97| fixer | haiku | Implement fix (blocked by investigator) | `/buildit` |9899### Strategic Sprint (2-3 agents)100**Trigger**: Market research, fundraising, competitive analysis, OKR planning.101102| Name | Model | Role | Skill |103|------|-------|------|-------|104| researcher | sonnet | Market intelligence, competitors | `/strategy` |105| strategist | sonnet | Prioritization, roadmap (blocked by researcher) | `/cto` or `/ceo` |106| synthesizer | sonnet | Decisions, OKRs, resource calls (blocked by strategist) | `/ceo` |107108## Workflow1091101. **Analyze** — Read task, identify roles needed, pick closest recipe (or compose one — cap at 4 agents)1112. **Create team** — `TeamCreate`, then `TaskCreate` for each work item1123. **Spawn agents** — `Agent` tool with model tier, role, skill instruction, and team name1134. **Coordinate** — `TaskUpdate` to assign, `SendMessage` for blockers and handoffs1145. **Gate** — Each agent runs `/gate` before declaring done1156. **Memory** — After a significant milestone, run `/team-memory` to consolidate1167. **Ship** — Run `/shipit` to push and open PR117118## How to instruct an agent to use a skill119120When spawning, include the skill in the agent's prompt:121122```123You are the backend engineer on this team. Use /buildit to implement the payments API.124Read the API contract from the architect agent's output before starting.125Run /gate before declaring done.126```127128The agent will invoke the skill by name — no additional wiring needed.129130## Rules131132- Smallest team possible. 2 agents over 3 when feasible.133- Skip the team for single-focus tasks — do it yourself.134- `mode: "acceptEdits"` for builders and fixers, `mode: "default"` for reviewers.135- Never spawn duplicates — shut down stuck agents first.136- Always assign a reviewer for any work that will be merged.137- Simple tasks don't need teams. Use judgment.