|
| 1 | +# Claude-Flow Swarm Examples |
| 2 | + |
| 3 | +## Quick Start Commands |
| 4 | + |
| 5 | +### Research Tasks |
| 6 | +```bash |
| 7 | +claude-flow swarm "Research modern web frameworks" --strategy research --mode distributed |
| 8 | +claude-flow swarm "Analyze market trends in AI" --strategy research --parallel --max-agents 6 |
| 9 | +``` |
| 10 | + |
| 11 | +### Development Tasks |
| 12 | +```bash |
| 13 | +claude-flow swarm "Build a microservice API" --strategy development --mode hierarchical |
| 14 | +claude-flow swarm "Create React dashboard" --strategy development --parallel --max-agents 8 |
| 15 | +``` |
| 16 | + |
| 17 | +### Analysis Tasks |
| 18 | +```bash |
| 19 | +claude-flow swarm "Analyze user behavior data" --strategy analysis --mode mesh |
| 20 | +claude-flow swarm "Performance analysis of application" --strategy analysis --monitor |
| 21 | +``` |
| 22 | + |
| 23 | +### Testing Tasks |
| 24 | +```bash |
| 25 | +claude-flow swarm "Comprehensive testing suite" --strategy testing --parallel |
| 26 | +claude-flow swarm "Security testing analysis" --strategy testing --mode distributed |
| 27 | +``` |
| 28 | + |
| 29 | +### Optimization Tasks |
| 30 | +```bash |
| 31 | +claude-flow swarm "Optimize database queries" --strategy optimization --mode hybrid |
| 32 | +claude-flow swarm "Frontend performance optimization" --strategy optimization --monitor |
| 33 | +``` |
| 34 | + |
| 35 | +### Maintenance Tasks |
| 36 | +```bash |
| 37 | +claude-flow swarm "Update dependencies safely" --strategy maintenance --mode centralized |
| 38 | +claude-flow swarm "System health check" --strategy maintenance --monitor |
| 39 | +``` |
| 40 | + |
| 41 | +## Advanced Usage |
| 42 | + |
| 43 | +### Custom Output and Monitoring |
| 44 | +```bash |
| 45 | +# Save results in different formats |
| 46 | +claude-flow swarm "Research task" --output sqlite --output-dir ./results |
| 47 | + |
| 48 | +# Enable real-time monitoring |
| 49 | +claude-flow swarm "Long task" --monitor --timeout 120 |
| 50 | + |
| 51 | +# Dry run to see configuration |
| 52 | +claude-flow swarm "Any task" --dry-run |
| 53 | +``` |
| 54 | + |
| 55 | +### Coordination Modes |
| 56 | + |
| 57 | +- **centralized**: Single coordinator (best for simple tasks) |
| 58 | +- **distributed**: Multiple coordinators (best for complex, parallelizable tasks) |
| 59 | +- **hierarchical**: Tree structure (best for organized, structured work) |
| 60 | +- **mesh**: Peer-to-peer (best for dynamic, adaptive tasks) |
| 61 | +- **hybrid**: Mixed patterns (best for complex workflows) |
| 62 | + |
| 63 | +See .claude/commands/swarm/ for detailed documentation on each strategy. |
0 commit comments