Help us improve
Share bugs, ideas, or general feedback.
From claude-code-expert
Provides advanced patterns for Claude Code Agent Teams: topology designs (hub-and-spoke, mesh network, pipeline), cross-team communication, worktree coordination, failure handling, and cost management.
npx claudepluginhub markus41/claude --plugin claude-code-expertHow this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-expert:agent-teams-advancedThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Claude Code Agent Teams enable parallel multi-agent coordination within a shared task context. This skill covers production-grade patterns for designing, scaling, and debugging agent team topologies.
Orchestrates Claude Code agent teams for parallel multi-agent workflows on complex tasks using TeamCreate, SendMessage, TaskUpdate, and shared task lists. Enable with --enable-teams flag.
Coordinates multiple Claude Code instances as agent teams for workflows needing inter-agent communication. Covers TeamCreate, SendMessage types, task coordination, hooks, and orchestration patterns.
Use when a task benefits from multiple Claude instances collaborating with peer-to-peer messaging - parallel research, multi-module features, cross-layer changes, or competing hypothesis debugging. Not for simple independent tasks (use parallel-execution) or sequential tasks (use delegated-execution).
Share bugs, ideas, or general feedback.
Claude Code Agent Teams enable parallel multi-agent coordination within a shared task context. This skill covers production-grade patterns for designing, scaling, and debugging agent team topologies.
Enablement:
CLAUDE_ENABLE_TEAMS=true--enable-teams flag to Claude Code CLIHow teams differ from subagents:
One lead assigns work to teammates and collects results.
┌─────────┐
│ Lead │
└────┬────┘
┌────┴────┬─────────┬─────────┐
│ │ │ │ │ │ │
▼ ▼ ▼ ▼ ▼ ▼ ▼
Team1 Team2 Team3 Team4 Team5 Team6
All teammates can message each other directly. Useful for truly parallel, interdependent work.
┌──────────────────────────┐
│ │
▼ ▼
Team1 ◄──────────────────► Team2
│ │
│ ◄──────────────────► │
│ │
└──────────►Team3◄─────────┘
◄────────┐ │ ┌───────────►
│ │ │
Self-Claim Queue
Work moves through stages. Each stage completes before passing to the next.
Team leads manage sub-teams. Useful for large organizations.
All teammates can view, claim, and complete tasks from a shared queue.
Direct messages between teammates for synchronous coordination.
Teammate1 → "Finished schema, Team2 can now generate tests"
Teammate2 → "Tests running, Team3 estimate for performance review?"
Teammate3 → "Ready when schema is final—what's your ETA?"
Periodic updates visible to entire team (every 5-10 minutes).
When two teammates claim the same task:
Each teammate gets an isolated git worktree, preventing merge conflicts during work.
Worktree naming:
# Automatic naming by team ID and teammate index
.git/worktrees/team-{team_id}-{teammate_index}/
Merge strategy on completion:
Conflict handling:
Branch naming conventions:
feature/{team-id}/{teammate-role}
examples: feature/cce-001/frontend, feature/cce-001/backend
bugfix/{team-id}/{issue-number}
examples: bugfix/cce-002/123, bugfix/cce-002/456
| Size | Characteristics | Best For | Cost |
|---|---|---|---|
| 2 | Minimal coordination overhead. Ideal split: frontend + backend, or analyzer + implementer. | Feature branches, migrations | 2x single-agent cost |
| 3-4 | Sweet spot for most projects. Independent parallel tracks. Light coordination. | Full-stack features, multi-phase analysis | 3-4x single-agent cost |
| 5+ | Coordination overhead grows. Task switching between teammates. Diminishing returns. | Enterprise projects, research teams | 5x+ but not linearly valuable |
Cost scaling:
Cost-benefit formula:
TeamCost = (team_size × hourly_rate_per_agent)
Speedup = 100% / (1 + coordination_overhead)
ROI = (sequential_time - (team_time × speedup)) / TeamCost
→ ROI > 0 when team_time * speedup < sequential_time
When teammate A's failure blocks teammate B (dependency).
All teammates down or unresponsive.
# Check teammate status
claude-code teams status --team-id cce-001
# Output:
# ┌─────────────┬────────────┬──────┬─────────────┐
# │ Teammate │ Status │ Task │ Last Update │
# ├─────────────┼────────────┼──────┼─────────────┤
# │ Frontend │ RUNNING │ 5/12 │ 2m ago │
# │ Backend │ COMPLETED │ 8/8 │ 5m ago │
# │ Tests │ STALLED │ 2/6 │ 10m ago │
# └─────────────┴────────────┴──────┴─────────────┘
Define team compositions beyond built-in templates using a team configuration file.
Example: Custom 3-person migration team
version: 1
name: "Database Migration"
description: "Schema analyzer, data migrator, validator"
team:
- name: "analyzer"
role: "Database schema analysis"
model: "claude-sonnet-4-6"
skills:
- sql-analysis
- schema-design
timeout_seconds: 1800
- name: "migrator"
role: "Data migration execution"
model: "claude-sonnet-4-6"
skills:
- data-migration
- transformation-engine
timeout_seconds: 3600
- name: "validator"
role: "Post-migration verification"
model: "claude-haiku-4-5"
skills:
- data-validation
- integrity-checking
timeout_seconds: 900
communication: "mesh"
task_strategy: "shared_queue"
parallelization: "full"
→ Parallel development with synchronized handoffs
→ High confidence, rapid migrations
→ Fast incident turnaround
→ Cover more ground in parallel research
→ Parallel review perspectives
Base cost = (num_teammates × model_cost_per_hour) × estimated_duration_hours
Example: 3 Sonnet agents × $15/hour × 2 hours = $90
vs.
Sequential cost = 1 Sonnet × $15/hour × 6 hours = $90
Speedup: 3 agents complete in 2 hours vs. 6 sequential → 3x faster, same cost
YES, use teams if:
NO, use sequential if:
See also: teams-architect agent for interactive team design assistance.