ybbms777/compound-engineering/orchestrating-swarms
Claude Code and agent skill by ybbms777/compound-engineering
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
This skill should be used when orchestrating multi-agent swarms using Claude Code's TeammateTool and Task system. It applies when coordinating multiple agents, running parallel code reviews, creating pipeline workflows with dependencies, building self-organizing task queues, or any task benefiting from divide-and-conquer patterns.
Install
npx vskill@latest install ybbms777/compound-engineering/orchestrating-swarmsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as ybbms777/compound-engineering/orchestrating-swarms.
Claude Code Swarm Orchestration
Master multi-agent orchestration using Claude Code's TeammateTool and Task system.
Primitives
| Primitive | What It Is | File Location | |
|---|---|---|---|
| Agent | A Claude instance that can use tools. You are an agent. Subagents are agents you spawn. | N/A (process) | |
| Team | A named group of agents working together. One leader, multiple teammates. | ~/.openclaw/teams/{name}/config.json | |
| Teammate | An agent that joined a team. Has a name, color, inbox. Spawned via Task with team_name + name. | Listed in team config | |
| Leader | The agent that created the team. Receives teammate messages, approves plans/shutdowns. | First member in config | |
| Task | A work item with subject, description, status, owner, and dependencies. | ~/.openclaw/tasks/{team}/N.json | |
| Inbox | JSON file where an agent receives messages from teammates. | ~/.openclaw/teams/{name}/inboxes/{agent}.json | |
| Message | A JSON object sent between agents. Can be text or structured (shutdown_request, idle_notification, etc). | Stored in inbox files | |
| Backend | How teammates run. Auto-detected: in-process (same Node.js, invisible), tmux (separate panes, visible), iterm2 (split panes in iTerm2). See Spawn Backends. | Auto-detected based on environment |
How They Connect
Lifecycle
Message Flow
Table of Contents
- Core Architecture
- Two Ways to Spawn Agents
- Built-in Agent Types
- Plugin Agent Types
- TeammateTool Operations
- Task System Integration
- Message Formats
- Orchestration Patterns
- Environment Variables
- Spawn Backends
- Error Handling
- Complete Workflows
Core Architecture
How Swarms Work
A swarm consists of:
- Leader (you) - Creates team, spawns workers, coordinates work
- Teammates (spawned agents) - Execute tasks, report back
- Task List - Shared work queue with dependencies
- Inboxes - JSON files for inter-agent messaging
File Structure
Team Config Structure
Two Ways to Spawn Agents
Method 1: Task Tool (Subagents)
Use Task for short-lived, focused work that returns a result:
Characteristics:
- Runs synchronously (blocks until complete) or async with
run_in_background: true - Returns result directly to you
- No team membership required
- Best for: searches, analysis, focused research
Method 2: Task Tool + team_name + name (Teammates)
Use Task with team_name and name to spawn persistent teammates:
Characteristics:
- Joins team, appears in
config.json - Communicates via inbox messages
- Can claim tasks from shared task list
- Persists until shutdown
- Best for: parallel work, ongoing collaboration, pipeline stages
Key Difference
| Aspect | Task (subagent) | Task + team_name + name (teammate) | |
|---|---|---|---|
| Lifespan | Until task complete | Until shutdown requested | |
| Communication | Return value | Inbox messages | |
| Task access | None | Shared task list | |
| Team membership | No | Yes | |
| Coordination | One-off | Ongoing |
Built-in Agent Types
These are always available without plugins:
Bash
- Tools: Bash only
- Model: Inherits from parent
- Best for: Git operations, command execution, system tasks
Explore
- Tools: All read-only tools (no Edit, Write, NotebookEdit, Task)
- Model: Haiku (optimized for speed)
- Best for: Codebase exploration, file searches, code understanding
- Thoroughness levels: "quick", "medium", "very thorough"
Plan
- Tools: All read-only tools
- Model: Inherits from parent
- Best for: Architecture planning, implementation strategies
general-purpose
- Tools: All tools (*)
- Model: Inherits from parent
- Best for: Multi-step tasks, research + action combinations
claude-code-guide
- Tools: Read-only + WebFetch + WebSearch
- Best for: Questions about Claude Code, Agent SDK, Anthropic API
statusline-setup
- Tools: Read, Edit only
- Model: Sonnet
- Best for: Configuring Claude Code status line
Plugin Agent Types
From the compound-engineering plugin (examples):
Review Agents
All review agents from compound-engineering:
agent-native-reviewer- Ensures features work for agents tooarchitecture-strategist- Architectural compliancecode-simplicity-reviewer- YAGNI and minimalismdata-integrity-guardian- Database and data safetydata-migration-expert- Migration validationdeployment-verification-agent- Pre-deploy checklistsdhh-rails-reviewer- DHH/37signals Rails stylejulik-frontend-races-reviewer- JavaScript race conditionskieran-python-reviewer- Python best practiceskieran-rails-reviewer- Rails best practiceskieran-typescript-reviewer- TypeScript best practicespattern-recognition-specialist- Design patterns and anti-patternsperformance-oracle- Performance analysissecurity-sentinel- Security vulnerabilities
Research Agents
All research agents:
best-practices-researcher- External best practicesframework-docs-researcher- Framework documentationgit-history-analyzer- Code archaeologylearnings-researcher- Search docs/solutions/repo-research-analyst- Repository patterns
Design Agents
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/orchestrating-swarms/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ybbms777/compound-engineering/orchestrating-swarms)