agent-teams
Guide for coordinating multiple Claude Code instances as a team using Agent Teams. Covers TeammateTool operations, spawn backends, communication, task…
от majesticlabs-dev★ 50 звёзд на GitHub
Установить agent-teams в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Agent Teams
Coordinate multiple Claude Code instances as a team with shared task lists, inter-agent messaging, and independent context windows. Fundamentally different from subagents (Task tool): teammates communicate directly with each other, not just back to the caller.
When to Use Agent Teams vs Subagents
Does the work require inter-agent communication?
├── No → Use subagents (Task tool)
│ ├── Focused tasks where only the result matters
│ ├── Research/verification that reports back
│ └── Lower token cost (results summarized to main context)
└── Yes → Use Agent Teams
├── Teammates need to share findings mid-task
├── Adversarial debate / competing hypotheses
├── Self-organizing work from shared task list
└── Complex coordination across 3+ parallel workers
How many parallel workers?
├── 1-3 independent tasks → Subagents (less overhead)
├── 3-5 coordinating workers → Agent Teams
└── 5+ workers → Agent Teams with delegate mode
Best use cases:
- Research + review from multiple perspectives simultaneously
- Multi-module features where teammates own different files
- Debugging with competing hypotheses (adversarial investigation)
- Cross-layer coordination (frontend, backend, tests)
Avoid when:
- Sequential tasks with many dependencies
- Same-file edits (causes overwrites)
- Simple focused work (coordination overhead not worth it)
- Routine tasks (single session more cost-effective)
Environment Setup
Enable Agent Teams (experimental, disabled by default):
// settings.json (user or project level)
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}
Or set in shell: export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
Tool Architecture
Agent Teams use four distinct tools (not a single "TeammateTool"):
| Tool | Purpose |
|---|---|
| TeamCreate | Creates team config + task directory. Caller becomes lead |
| SendMessage | All inter-agent communication (5 message types below) |
| TeamDelete | Removes team resources after shutdown (cleanup) |
| Task (extended) | Spawns teammates when name + team_name params present |
SendMessage Types
| Type | Parameters | Description |
|---|---|---|
message |
recipient, content, summary |
Direct message to one teammate |
broadcast |
content, summary |
Message to all teammates (expensive — N deliveries) |
shutdown_request |
recipient, content |
Request teammate termination (lead only) |
shutdown_response |
request_id, approve, content |
Accept/reject shutdown (teammate only) |
plan_approval_response |
request_id, approve, recipient, content |
Approve/reject plan (lead only) |
Critical: Plain text output is NOT visible to teammates. Agents MUST use SendMessage for all inter-agent communication.
Usage notes:
- Prefer
messageoverbroadcast— broadcast creates N messages for N teammates - Messages delivered automatically to recipient inboxes (no polling)
- Idle notifications sent automatically when teammates finish
- Only the lead should run TeamDelete — teammate context may not resolve correctly
Spawning Teammates
Method 1: Natural language — Tell Claude to create a team and describe structure:
Create an agent team to review this PR. Spawn three reviewers:
- One focused on security
- One checking performance
- One validating test coverage
Method 2: Task tool with team parameters:
Task({
team_name: "my-team",
name: "worker-1",
subagent_type: "general-purpose",
prompt: "Review src/auth/ for security vulnerabilities...",
model: "sonnet",
run_in_background: true
})
Teammate receives on spawn:
- Same project context as regular session (CLAUDE.md, MCP servers, skills)
- The spawn prompt from the lead
- Does NOT inherit lead's conversation history
Built-in agent types for teammates:
| Type | Capabilities |
|---|---|
general-purpose |
All tools (Edit, Write, Bash, Task, etc.) |
Explore |
Read-only — codebase search and analysis |
Plan |
Read-only — architectural design |
Bash |
System commands only |
Model selection: Use Sonnet for most teammates (cost-effective). Reserve Opus for leads or complex reasoning tasks. Specify via model parameter or natural language ("Use Sonnet for each teammate").
Spawn Backends
Controls how teammates display. Set via teammateMode in settings.json or --teammate-mode CLI flag.
| Mode | Setting | Requirements | Behavior |
|---|---|---|---|
| Auto (default) | "auto" |
None | Split panes if in tmux, else in-process |
| In-process | "in-process" |
None | All in main terminal. Shift+Up/Down to select |
| Split panes | "tmux" |
tmux or iTerm2 | Each teammate gets own pane |
// settings.json
{ "teammateMode": "in-process" }
# CLI override for single session
claude --teammate-mode in-process
Auto-detection logic: 1.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- assets/hook-examples.yml
- assets/message-formats.yml
- assets/team-config-schema.yml
- references/orchestration-patterns.md
FAQ
Что делает скилл agent-teams?
Guide for coordinating multiple Claude Code instances as a team using Agent Teams. Covers TeammateTool operations, spawn backends, communication, task coordination, hooks, and orchestration patterns. Use when building multi-agent workflows requiring inter-agent communication.
Как установить скилл agent-teams?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-teams запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…