
swarm-coordination
Multi-agent swarm coordination patterns. Orchestrates parallel agent execution, manages agent communication, handles task distribution, and coordinates results aggregation.
- Installs
- 88
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/oimiragieo/agent-studio --skill swarm-coordination- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads swarm-coordination automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Swarm Coordination Skill
<identity> Swarm Coordination Skill - Orchestrates parallel agent execution, manages inter-agent communication, handles task distribution, and coordinates results aggregation for complex multi-agent workflows. </identity> <capabilities> - Parallel agent spawning - Task distribution strategies - Results aggregation - Inter-agent communication - Failure handling and recovery </capabilities> <instructions> <execution_process>Step 1: Analyze Task for Parallelization
Identify parallelizable work:
| Pattern | Example | Strategy |
|---|---|---|
| Independent tasks | Review multiple files | Spawn in parallel |
| Dependent tasks | Design → Implement | Sequential spawn |
| Fan-out/Fan-in | Multiple reviews → Consolidate | Parallel + Aggregation |
| Pipeline | Parse → Transform → Validate | Sequential handoff |
Step 2: Spawn Agents in Parallel
Use the Task tool to spawn multiple agents in a single message:
// Spawn multiple agents in ONE message for parallel execution
Task({
task_id: 'task-1',
subagent_type: 'general-purpose',
description: 'Architect reviewing design',
prompt: 'Review architecture...',
});
Task({
task_id: 'task-2',
subagent_type: 'general-purpose',
description: 'Security reviewing design',
prompt: 'Review security...',
});
Key: Both Task calls must be in the SAME message for true parallelism.
Step 3: Define Handoff Format
Use structured formats for agent communication:
## Agent Handoff: [Source] → [Target]
### Context
- Task: [What was done]
- Files: [Files touched]
### Findings
- [Key finding 1]
- [Key finding 2]
### Recommendations
- [Action item 1]
- [Action item 2]
### Artifacts
- [Path to artifact 1]
- [Path to artifact 2]
Step 4: Aggregate Results
Combine outputs from parallel agents:
## Swarm Results Aggregation
### Participating Agents
- Architect: Completed ✅
- Security: Completed ✅
- DevOps: Completed ✅
### Consensus Points
- [Point all agents agree on]
### Conflicts
- [Point agents disagree on]
- Resolution: [How to resolve]
### Combined Recommendations
1. [Prioritized recommendation]
2. [Prioritized recommendation]
Step 5: Handle Failures
Strategies for partial failures:
| Scenario | Strategy |
|---|---|
| Agent timeout | Retry with simpler prompt |
| Agent error | Continue with available results |
| Conflicting results | Use consensus-voting skill |
| Missing critical result | Block and retry |
</execution_process>
<best_practices>
- Parallelize Aggressively: Independent work should run in parallel
- Structured Handoffs: Use consistent formats for communication
- Graceful Degradation: Continue with partial results when safe
- Clear Aggregation: Combine results systematically
- Track Provenance: Know which agent produced each result
</best_practices> </instructions>
<examples> <usage_example> **Parallel Review Request**:Get architecture, security, and performance reviews for the new API design
Swarm Coordination:
// Spawn 3 reviewers in parallel (single message)
Task({ task_id: 'task-3', description: 'Architect reviewing API', prompt: '...' });
Task({ task_id: 'task-4', description: 'Security reviewing API', prompt: '...' });
Task({ task_id: 'task-5', description: 'Performance reviewing API', prompt: '...' });
Aggregated Results:
## API Design Review (3 agents)
### Consensus
- RESTful design is appropriate
- Need authentication on all endpoints
### Recommendations by Priority
1. [HIGH] Add rate limiting (Security)
2. [HIGH] Use connection pooling (Performance)
3. [MED] Add versioning to URLs (Architect)
</usage_example> </examples>
Rules
- Always spawn independent agents in parallel
- Use structured handoff formats
- Handle partial failures gracefully
Related Workflow
This skill has a corresponding workflow for complex multi-agent scenarios:
- Workflow:
.claude/workflows/enterprise/swarm-coordination-skill-workflow.md - When to use workflow: For massively parallel task execution with Queen/Worker topology, fault tolerance, and distributed coordination (large-scale refactoring, parallel code review, multi-file implementation)
- When to use skill directly: For simple parallel agent spawning or when integrating swarm patterns into other workflows
Workflow Integration
This skill powers multi-agent orchestration patterns across the framework:
Router Decision: .claude/workflows/core/router-decision.md
- Router uses swarm patterns for parallel agent spawning
- Planning Orchestration Matrix defines when to use swarm coordination
Artifact Lifecycle: .claude/workflows/core/skill-lifecycle.md
- Swarm patterns apply to artifact creation at scale
- Parallel validation of multiple artifacts
Related Workflows:
consensus-votingskill for resolving conflicting agent outputscontext-compressorskill for aggregating parallel results- Enterprise workflows in
.claude/workflows/enterprise/use swarm patterns
Iron Laws
- NEVER spawn workers sequentially — all independent agents must be dispatched in a single message
- ALWAYS implement failure detection; never let a hung worker block the swarm indefinitely
- NEVER allow cross-worker communication — all coordination must flow through the Queen
- ALWAYS use structured handoff format for worker reports to enable programmatic aggregation
- NEVER spawn more than 7 workers in a single fan-out — coordination overhead dominates beyond that
Anti-Patterns
| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Sequential spawning | No parallelism; swarm executes like a queue | Spawn all independent workers in a single message |
| Cross-worker communication | O(N²) coordination chaos | All worker-to-worker communication flows through the Queen |
| No failure handling | One worker crash stalls the swarm | Detect hung/failed workers and re-spawn with fresh state |
| Unbounded parallelism | Coordination overhead exceeds speedup beyond 7 workers | Limit to 5-7 workers per fan-out for optimal throughput |
| Free-form worker reports | Cannot aggregate results programmatically | Require all workers to use the structured handoff template |
Memory Protocol (MANDATORY)
Before starting:
cat .claude/context/memory/learnings.md
After completing:
- New pattern ->
.claude/context/memory/learnings.md - Issue found ->
.claude/context/memory/issues.md - Decision made ->
.claude/context/memory/decisions.md
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
FAQ
What does the swarm-coordination skill do?
Multi-agent swarm coordination patterns. Orchestrates parallel agent execution, manages agent communication, handles task distribution, and coordinates results aggregation.
How do I install swarm-coordination?
Run npx skills add https://github.com/oimiragieo/agent-studio --skill swarm-coordination in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/swarm-coordination/ (personal) or .claude/skills/swarm-coordination/ (project).
Which AI agents can use swarm-coordination?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is swarm-coordination safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains swarm-coordination?
It is published by oimiragieo in oimiragieo/agent-studio. It has 88 recorded installs.
More from oimiragieo/agent-studio
pyqt6-ui-development-rules
oimiragieo/agent-studio
PyQt6 desktop GUI development rules -- signal/slot architecture, QSS theming, QThread concurrency, layout management, and cross-platform rendering. Enforces MVC separation and responsive UI patterns.
filesystem
oimiragieo/agent-studio
File system operations guidance - read, write, search, and manage files using Claude Code's built-in tools.
chrome-browser
oimiragieo/agent-studio
Open the skill to read its SKILL.md instructions.
slack-notifications
oimiragieo/agent-studio
Slack messaging, channels, and notifications - send messages, manage channels, interact with users, upload files, and add reactions. Use for team communication, incident notifications, and workflow alerts.
context-compressor
oimiragieo/agent-studio
Compress large context before reasoning to reduce token usage while preserving evidence. Use this whenever the user mentions huge files, long prompts, RAG payloads, prompt caching, expensive sessions, codebase context, chat history compaction, or wants the same answer quality with fewer tokens.
nodejs-expert
oimiragieo/agent-studio
Node.js backend expert including Express, NestJS, and async patterns
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available