swarm-orchestration
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSwarm Orchestration Skill
Swarm 集群编排 Skill
Purpose
用途
Multi-agent swarm coordination for complex tasks. Uses hierarchical topology with specialized agents to break down and execute complex work across multiple files and modules.
面向复杂任务的多Agent集群协调。采用带有专用Agent的分层拓扑结构,可跨多个文件和模块分解并执行复杂工作。
When to Trigger
触发场景
- 3+ files need changes
- new feature implementation
- cross-module refactoring
- API changes with tests
- security-related changes
- performance optimization across codebase
- database schema changes
- 需要修改3个及以上文件
- 新功能实现
- 跨模块重构
- 带测试的API变更
- 安全相关变更
- 全代码库性能优化
- 数据库 schema 变更
When to Skip
不适用场景
- single file edits
- simple bug fixes (1-2 lines)
- documentation updates
- configuration changes
- quick exploration
- 单文件编辑
- 简单bug修复(1-2行代码)
- 文档更新
- 配置变更
- 快速探索
Commands
命令
Initialize Swarm
初始化集群
Start a new swarm with hierarchical topology (anti-drift)
bash
npx @claude-flow/cli swarm init --topology hierarchical --max-agents 8 --strategy specializedExample:
bash
npx @claude-flow/cli swarm init --topology hierarchical --max-agents 6 --strategy specialized启动采用分层拓扑结构的新集群(防止偏离目标)
bash
npx @claude-flow/cli swarm init --topology hierarchical --max-agents 8 --strategy specialized示例:
bash
npx @claude-flow/cli swarm init --topology hierarchical --max-agents 6 --strategy specializedRoute Task
任务路由
Route a task to the appropriate agents based on task type
bash
npx @claude-flow/cli hooks route --task "[task description]"Example:
bash
npx @claude-flow/cli hooks route --task "implement OAuth2 authentication flow"根据任务类型将任务分配给对应的Agent
bash
npx @claude-flow/cli hooks route --task "[任务描述]"示例:
bash
npx @claude-flow/cli hooks route --task "implement OAuth2 authentication flow"Spawn Agent
生成Agent
Spawn a specific agent type
bash
npx @claude-flow/cli agent spawn --type [type] --name [name]Example:
bash
npx @claude-flow/cli agent spawn --type coder --name impl-auth生成特定类型的Agent
bash
npx @claude-flow/cli agent spawn --type [type] --name [name]示例:
bash
npx @claude-flow/cli agent spawn --type coder --name impl-authMonitor Status
监控状态
Check the current swarm status
bash
npx @claude-flow/cli swarm status --verbose查看当前集群状态
bash
npx @claude-flow/cli swarm status --verboseOrchestrate Task
任务编排
Orchestrate a task across multiple agents
bash
npx @claude-flow/cli task orchestrate --task "[task]" --strategy adaptiveExample:
bash
npx @claude-flow/cli task orchestrate --task "refactor auth module" --strategy parallel --max-agents 4跨多个Agent编排任务
bash
npx @claude-flow/cli task orchestrate --task "[任务]" --strategy adaptive示例:
bash
npx @claude-flow/cli task orchestrate --task "refactor auth module" --strategy parallel --max-agents 4List Agents
列出Agent
List all active agents
bash
npx @claude-flow/cli agent list --filter active列出所有活跃的Agent
bash
npx @claude-flow/cli agent list --filter activeScripts
脚本
| Script | Path | Description |
|---|---|---|
| | Initialize swarm with default settings |
| | Real-time swarm monitoring dashboard |
| 脚本 | 路径 | 描述 |
|---|---|---|
| | 使用默认设置初始化集群 |
| | 实时集群监控仪表盘 |
References
参考文档
| Document | Path | Description |
|---|---|---|
| | Complete list of agent types and capabilities |
| | Swarm topology configuration guide |
| 文档 | 路径 | 描述 |
|---|---|---|
| | Agent类型及能力的完整列表 |
| | 集群拓扑结构配置指南 |
Best Practices
最佳实践
- Check memory for existing patterns before starting
- Use hierarchical topology for coordination
- Store successful patterns after completion
- Document any new learnings
- 启动前检查现有模式的记忆
- 使用分层拓扑结构进行协调
- 完成后保存成功的模式
- 记录所有新的经验总结