Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Orchestrate multi-agent swarms with agentic-flow for parallel task execution, dynamic topology, and intelligent coordination. Use when scaling beyond single agents, implementing complex workflows, or building distributed AI systems.
.claude/skills/spencermarx-swarm-orchestration/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -30% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -22% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 5% | 0% |
Orchestrates multi-agent swarms using agentic-flow's advanced coordination system. Supports mesh, hierarchical, and adaptive topologies with automatic task distribution, load balancing, and fault tolerance.
bash# Initialize swarm npx agentic-flow hooks swarm-init --topology mesh --max-agents 5 # Spawn agents npx agentic-flow hooks agent-spawn --type coder npx agentic-flow hooks agent-spawn --type tester npx agentic-flow hooks agent-spawn --type reviewer # Orchestrate task npx agentic-flow hooks task-orchestrate \ --task "Build REST API with tests" \ --mode parallel
typescript// Equal peers, distributed decision-making await swarm.init({ topology: 'mesh', agents: ['coder', 'tester', 'reviewer'], communication: 'broadcast' });
typescript// Centralized coordination, specialized workers await swarm.init({ topology: 'hierarchical', queen: 'architect', workers: ['backend-dev', 'frontend-dev', 'db-designer'] });
typescript// Automatically switches topology based on task await swarm.init({ topology: 'adaptive', optimization: 'task-complexity' });
typescript// Execute tasks concurrently const results = await swarm.execute({ tasks: [ { agent: 'coder', task: 'Implement API endpoints' }, { agent: 'frontend', task: 'Build UI components' }, { agent: 'tester', task: 'Write test suite' } ], mode: 'parallel', timeout: 300000 // 5 minutes });
typescript// Sequential pipeline with dependencies await swarm.pipeline([ { stage: 'design', agent: 'architect' }, { stage: 'implement', agent: 'coder', after: 'design' }, { stage: 'test', agent: 'tester', after: 'implement' }, { stage: 'review', agent: 'reviewer', after: 'test' } ]);
typescript// Let swarm decide execution strategy await swarm.autoOrchestrate({ goal: 'Build production-ready API', constraints: { maxTime: 3600, maxAgents: 8, quality: 'high' } });
typescript// Share state across swarm await swarm.memory.store('api-schema', { endpoints: [...], models: [...] }); // Agents read shared memory const schema = await swarm.memory.retrieve('api-schema');
typescript// Automatic work distribution await swarm.enableLoadBalancing({ strategy: 'dynamic', metrics: ['cpu', 'memory', 'task-queue'] });
typescript// Handle agent failures await swarm.setResiliency({ retry: { maxAttempts: 3, backoff: 'exponential' }, fallback: 'reassign-task' });
typescript// Track swarm metrics const metrics = await swarm.getMetrics(); // { throughput, latency, success_rate, agent_utilization }
bash# Pre-task coordination npx agentic-flow hooks pre-task --description "Build API" # Post-task synchronization npx agentic-flow hooks post-task --task-id "task-123" # Session restore npx agentic-flow hooks session-restore --session-id "swarm-001"
Solution: Verify memory access and enable hooks
Solution: Check topology (use adaptive) and enable load balancing
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-05 | fail→pass | 19,231 | 9,296 | -52% | 1 | 1 | 0% | 3,638 | 3,090 | -15% | 0 | 0 | — |
case-06 | fail→pass | 39,987 | 7,972 | -80% | 1 | 1 | 0% | 3,874 | 2,696 | -30% | 0 | 0 | — |
case-21 | pass→pass | 15,470 | 12,938 | -16% | 1 | 1 | 0% | 2,397 | 3,559 | +48% | 0 | 0 | — |
case-07 | fail→pass | 11,797 | 3,671 | -69% | 1 | 1 | 0% | 2,290 | 1,779 | -22% | 0 | 0 | — |
case-20 | pass→pass | 12,181 | 8,203 | -33% | 1 | 1 | 0% | 2,318 | 2,773 | +20% | 0 | 0 | — |
case-01 | fail→pass | 7,761 | 4,856 | -37% | 1 | 1 | 0% | 1,583 | 2,082 | +32% | 0 | 0 | — |
case-02 | fail→pass | 12,681 | 8,309 | -34% | 1 | 1 | 0% | 2,573 | 2,690 | +5% | 0 | 0 | — |
case-03 | fail→pass | 20,964 | 8,931 | -57% | 1 | 1 | 0% | 4,580 | 2,925 | -36% | 0 | 0 | — |
case-04 | fail→pass | 19,301 | 3,009 | -84% | 1 | 1 | 0% | 3,717 | 1,584 | -57% | 0 | 0 | — |
case-08 | fail→pass | 16,135 | 4,673 | -71% | 1 | 1 | 0% | 3,049 | 2,003 | -34% | 0 | 0 | — |
case-09 | fail→pass | 8,069 | 2,184 | -73% | 1 | 1 | 0% | 1,322 | 1,457 | +10% | 0 | 0 | — |
case-10 | fail→pass | 14,515 | 3,753 | -74% | 1 | 1 | 0% | 2,660 | 1,761 | -34% | 0 | 0 | — |
case-11 | fail→pass | 12,235 | 6,897 | -44% | 1 | 1 | 0% | 1,967 | 2,268 | +15% | 0 | 0 | — |
case-12 | pass→pass | 13,883 | 11,177 | -19% | 1 | 1 | 0% | 2,223 | 3,277 | +47% | 0 | 0 | — |
case-13 | pass→pass | 11,238 | 3,671 | -67% | 1 | 1 | 0% | 1,685 | 1,785 | +6% | 0 | 0 | — |
case-14 | fail→pass | 12,572 | 2,158 | -83% | 1 | 1 | 0% | 2,146 | 1,386 | -35% | 0 | 0 | — |
case-15 | fail→pass | 3,548 | 1,738 | -51% | 1 | 1 | 0% | 636 | 1,349 | +112% | 0 | 0 | — |
case-16 | fail→pass | 11,983 | 2,603 | -78% | 1 | 1 | 0% | 2,243 | 1,534 | -32% | 0 | 0 | — |
case-17 | fail→pass | 15,877 | 7,608 | -52% | 1 | 1 | 0% | 3,058 | 2,570 | -16% | 0 | 0 | — |
case-18 | pass→pass | 12,042 | 5,520 | -54% | 1 | 1 | 0% | 2,145 | 2,103 | -2% | 0 | 0 | — |
case-19 | fail→pass | 12,300 | 6,074 | -51% | 1 | 1 | 0% | 2,040 | 2,327 | +14% | 0 | 0 | — |
case-22 | pass→pass | 9,448 | 5,600 | -41% | 1 | 1 | 0% | 1,990 | 2,131 | +7% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +73 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.