AgentSkillsCN

team-build

利用 Claude Code 代理团队并行构建。创建后端、前端及质量保障团队,通过共享任务列表实现协同作业。需启用 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1。

SKILL.md
--- frontmatter
name: team-build
description: Parallel build using Claude Code agent teams. Creates backend + frontend + quality teammates that coordinate through shared task list. Requires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1.
disable-model-invocation: true
argument-hint: <spec.md> [phases=N-M]
allowed-tools:
  - Read
  - Write
  - Edit
  - Grep
  - Glob
  - Bash
  - Task
  - mcp__supabase
  - mcp__context7

/team-build — Multi-Agent Team Coordination

Coordinates parallel builds using either Claude Code agent teams (experimental) or the Task tool for coordinated subagent dispatching.

Option 1: Agent Teams (Experimental)

Agent teams allow multiple Claude instances to work on the same codebase simultaneously with file-level ownership.

Setup

  1. Enable the experimental feature:

    bash
    export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
    
  2. Start Claude Code with team mode enabled

Recommended team composition

AgentFocus areaFile ownership
Backend leadDB, migrations, Server Actions, API routessupabase/, src/app/**/actions.ts, src/app/api/, src/lib/
Frontend leadPages, components, layouts, stylessrc/app/**/page.tsx, src/app/**/layout.tsx, src/components/
Quality leadTests, security review, type checkingsrc/__tests__/, tests/, *.test.ts

File ownership rules

To prevent conflicts, each agent owns specific file patterns:

  • Never overlap — only one agent should modify a given file
  • Shared types — generate types once (backend lead), others read only
  • Integration points — backend lead creates actions, frontend lead imports them
  • Communication through file conventions, not direct messaging

Option 2: Coordinated Subagents (Fallback)

When agent teams aren't available, use the Task tool to dispatch subagents in coordinated waves.

Wave-based execution

Wave 1: Explore

Dispatch in parallel:

  • explore-codebase — map project structure
  • explore-db — map database schema

Wait for both to complete before proceeding.

Wave 2: Foundation

Sequential:

  • Database migrations and RLS
  • Type generation

Wave 3: Backend + Frontend (parallel where safe)

Dispatch in parallel:

  • Backend task — Server Actions, API routes, webhooks
  • Frontend task — Layout, navigation, shared components (that don't depend on backend)

Then sequential:

  • Integration — Pages that consume Server Actions (depends on backend completion)

Wave 4: Quality (parallel)

Dispatch in parallel:

  • testing-specialist — write and run tests
  • security-reviewer — security audit
  • ui-ux-reviewer — UI/UX review

Dispatch template

When using the Task tool for subagent coordination:

code
Task: [specific deliverable]

Context:
- Project uses Next.js App Router + Supabase + Stripe
- See CLAUDE.md for project conventions
- See TASKS.md for overall build plan

Files to create/modify:
- [explicit paths]

Do NOT modify:
- [files owned by other agents/tasks]

Success criteria:
- [verifiable outcomes]

Choosing between options

FactorAgent TeamsCoordinated Subagents
SetupRequires env var + experimental flagWorks out of the box
ParallelismTrue parallel (multiple Claude instances)Sequential with parallel dispatches
Conflict riskLow (file ownership enforced)Medium (manual coordination)
Best forLarge projects, long buildsSmaller projects, specific phases

Rules

  • Always define clear file ownership boundaries
  • Never let two agents modify the same file
  • Backend before frontend for data-dependent features
  • Quality checks always run last
  • Update TASKS.md after each wave completes