/claude-flow-swarm
Coordinate multi-agent swarms for complex tasks
> /plugin marketplace add ruvnet/rufloHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/claude-flow-swarm
Context preview
What this command does when you run it.
Coordinate multi-agent swarms for complex tasks
Command definition
claude-flow-swarm.mdname: claude-flow-swarm
description: Coordinate multi-agent swarms for complex tasks
๐ Claude-Flow Swarm Coordination
Advanced multi-agent coordination system with timeout-free execution, distributed memory sharing, and intelligent load balancing.
Basic Usage
./claude-flow swarm "your complex task" --strategy <type> [options]
๐ฏ Swarm Strategies
- **auto** - Automatic strategy selection based on task analysis
- **development** - Code implementation with review and testing
- **research** - Information gathering and synthesis
- **analysis** - Data processing and pattern identification
- **testing** - Comprehensive quality assurance
- **optimization** - Performance tuning and refactoring
- **maintenance** - System updates and bug fixes
๐ค Agent Types
- **coordinator** - Plans and delegates tasks to other agents
- **developer** - Writes code and implements solutions
- **researcher** - Gathers and analyzes information
- **analyzer** - Identifies patterns and generates insights
- **tester** - Creates and runs tests for quality assurance
- **reviewer** - Performs code and design reviews
- **documenter** - Creates documentation and guides
- **monitor** - Tracks performance and system health
- **specialist** - Domain-specific expert agents
๐ Coordination Modes
- **centralized** - Single coordinator manages all agents (default)
- **distributed** - Multiple coordinators share management
- **hierarchical** - Tree structure with nested coordination
- **mesh** - Peer-to-peer agent collaboration
- **hybrid** - Mixed coordination strategies
โ๏ธ Common Options
- `--strategy <type>` - Execution strategy
- `--mode <type>` - Coordination mode
- `--max-agents <n>` - Maximum concurrent agents (default: 5)
- `--timeout <minutes>` - Timeout in minutes (default: 60)
- `--background` - Run in background for tasks > 30 minutes
- `--monitor` - Enable real-time monitoring
- `--ui` - Launch terminal UI interface
- `--parallel` - Enable parallel execution
- `--distributed` - Enable distributed coordination
- `--review` - Enable peer review process
- `--testing` - Include automated testing
- `--encryption` - Enable data encryption
- `--verbose` - Detailed logging output
- `--dry-run` - Show configuration without executing
๐ Examples
Development Swarm with Review
./claude-flow swarm "Build e-commerce REST API" \
--strategy development \
--monitor \
--review \
--testing
Long-Running Research Swarm
./claude-flow swarm "Analyze AI market trends 2024-2025" \
--strategy research \
--background \
--distributed \
--max-agents 8
Performance Optimization Swarm
./claude-flow swarm "Optimize database queries and API performance" \
--strategy optimization \
--testing \
--parallel \
--monitor
Enterprise Development Swarm
./claude-flow swarm "Implement secure payment processing system" \
--strategy development \
--mode distributed \
--max-agents 10 \
--parallel \
--monitor \
--review \
--testing \
--encryption \
--verbose
Testing and QA Swarm
./claude-flow swarm "Comprehensive security audit and testing" \
--strategy testing \
--review \
--verbose \
--max-agents 6
๐ Monitoring and Control
Real-time monitoring:
# Monitor swarm activity
./claude-flow monitor
# Monitor specific component
./claude-flow monitor --focus swarm
Check swarm status:
# Overall system status
./claude-flow status
# Detailed swarm status
./claude-flow status --verbose
View agent activity:
# List all agents
./claude-flow agent list
# Agent details
./claude-flow agent info <agent-id>
๐พ Memory Integration
Swarms automatically use distributed memory for collaboration:
# Store swarm objectives
./claude-flow memory store "swarm_objective" "Build scalable API" --namespace swarm
# Query swarm progress
./claude-flow memory query "swarm_progress" --namespace swarm
# Export swarm memory
./claude-flow memory export swarm-results.json --namespace swarm
๐ฏ Key Features
Timeout-Free Execution
- Background mode for long-running tasks
- State persistence across sessions
- Automatic checkpoint recovery
Work Stealing & Load Balancing
- Dynamic task redistribution
- Automatic agent scaling
- Resource-aware scheduling
Circuit Breakers & Fault Tolerance
- Automatic retry with exponential backoff
- Graceful degradation
- Health monitoring and recovery
Real-Time Collaboration
- Cross-agent communication
- Shared memory access
- Event-driven coordination
Enterprise Security
- Role-based access control
- Audit logging
- Data encryption
- Input validation
๐ง Advanced Configuration
Dry run to preview:
./claude-flow swarm "Test task" --dry-run --strategy development
Custom quality thresholds:
./claude-flow swarm "High quality API" \
--strategy development \
--quality-threshold 0.95
Scheduling algorithms:
- FIFO (First In, First Out)
- Priority-based
- Deadline-driven
- Shortest Job First
- Critical Path
- Resource-aware
- Adaptive
For detailed documentation, see: https://github.com/ruvnet/claude-code-flow/docs/swarm-system.md
Read more
name: claude-flow-swarm description: Coordinate multi-agent swarms for complex tasks
๐ Claude-Flow Swarm Coordination
Advanced multi-agent coordination system with timeout-free execution, distributed memory sharing, and intelligent load balancing.
Basic Usage
./claude-flow swarm "your complex task" --strategy <type> [options]
๐ฏ Swarm Strategies
- **auto** - Automatic strategy selection based on task analysis
- **development** - Code implementation with review and testing
- **research** - Information gathering and synthesis
- **analysis** - Data processing and pattern identification
- **testing** - Comprehensive quality assurance
- **optimization** - Performance tuning and refactoring
- **maintenance** - System updates and bug fixes
๐ค Agent Types
- **coordinator** - Plans and delegates tasks to other agents
- **developer** - Writes code and implements solutions
- **researcher** - Gathers and analyzes information
- **analyzer** - Identifies patterns and generates insights
- **tester** - Creates and runs tests for quality assurance
- **reviewer** - Performs code and design reviews
- **documenter** - Creates documentation and guides
- **monitor** - Tracks performance and system health
- **specialist** - Domain-specific expert agents
๐ Coordination Modes
- **centralized** - Single coordinator manages all agents (default)
- **distributed** - Multiple coordinators share management
- **hierarchical** - Tree structure with nested coordination
- **mesh** - Peer-to-peer agent collaboration
- **hybrid** - Mixed coordination strategies
โ๏ธ Common Options
- `--strategy <type>` - Execution strategy
- `--mode <type>` - Coordination mode
- `--max-agents <n>` - Maximum concurrent agents (default: 5)
- `--timeout <minutes>` - Timeout in minutes (default: 60)
- `--background` - Run in background for tasks > 30 minutes
- `--monitor` - Enable real-time monitoring
- `--ui` - Launch terminal UI interface
- `--parallel` - Enable parallel execution
- `--distributed` - Enable distributed coordination
- `--review` - Enable peer review process
- `--testing` - Include automated testing
- `--encryption` - Enable data encryption
- `--verbose` - Detailed logging output
- `--dry-run` - Show configuration without executing
๐ Examples
Development Swarm with Review
./claude-flow swarm "Build e-commerce REST API" \ --strategy development \ --monitor \ --review \ --testing
Long-Running Research Swarm
./claude-flow swarm "Analyze AI market trends 2024-2025" \ --strategy research \ --background \ --distributed \ --max-agents 8
Performance Optimization Swarm
./claude-flow swarm "Optimize database queries and API performance" \ --strategy optimization \ --testing \ --parallel \ --monitor
Enterprise Development Swarm
./claude-flow swarm "Implement secure payment processing system" \ --strategy development \ --mode distributed \ --max-agents 10 \ --parallel \ --monitor \ --review \ --testing \ --encryption \ --verbose
Testing and QA Swarm
./claude-flow swarm "Comprehensive security audit and testing" \ --strategy testing \ --review \ --verbose \ --max-agents 6
๐ Monitoring and Control
Real-time monitoring:
# Monitor swarm activity ./claude-flow monitor # Monitor specific component ./claude-flow monitor --focus swarm
Check swarm status:
# Overall system status ./claude-flow status # Detailed swarm status ./claude-flow status --verbose
View agent activity:
# List all agents ./claude-flow agent list # Agent details ./claude-flow agent info <agent-id>
๐พ Memory Integration
Swarms automatically use distributed memory for collaboration:
# Store swarm objectives ./claude-flow memory store "swarm_objective" "Build scalable API" --namespace swarm # Query swarm progress ./claude-flow memory query "swarm_progress" --namespace swarm # Export swarm memory ./claude-flow memory export swarm-results.json --namespace swarm
๐ฏ Key Features
Timeout-Free Execution
- Background mode for long-running tasks
- State persistence across sessions
- Automatic checkpoint recovery
Work Stealing & Load Balancing
- Dynamic task redistribution
- Automatic agent scaling
- Resource-aware scheduling
Circuit Breakers & Fault Tolerance
- Automatic retry with exponential backoff
- Graceful degradation
- Health monitoring and recovery
Real-Time Collaboration
- Cross-agent communication
- Shared memory access
- Event-driven coordination
Enterprise Security
- Role-based access control
- Audit logging
- Data encryption
- Input validation
๐ง Advanced Configuration
Dry run to preview:
./claude-flow swarm "Test task" --dry-run --strategy development
Custom quality thresholds:
./claude-flow swarm "High quality API" \ --strategy development \ --quality-threshold 0.95
Scheduling algorithms:
- FIFO (First In, First Out)
- Priority-based
- Deadline-driven
- Shortest Job First
- Critical Path
- Resource-aware
- Adaptive
For detailed documentation, see: https://github.com/ruvnet/claude-code-flow/docs/swarm-system.md
An agent meta-harness for Claude Code and Codex. Agent = Model + Harness. The model writes; the harness gives it tools, memory, loops, sandboxes, and controls so it can actually work.
Repo: ruvnet/ruflo
Other commands on claude-flow.
- /agent-capabilities
Matrix of agent capabilities and their specializations.
Open command - /agent-coordination
Coordination patterns for multi-agent collaboration.
Open command - /agent-spawning
Guide to spawning agents with Claude Code's Task tool.
Open command - /agent-types
Complete guide to all 54 available agent types in Claude Flow.
Open command - /COMMAND_COMPLIANCE_REPORT
Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools (preferred) - `npx claude-flow` commands (as fallback) - No direct implementation calls
Open command - /bottleneck-detect
Analyze performance bottlenecks in swarm operations and suggest optimizations.
Open command

