swarm-orchestration
它能做什么
这项技能引导智能体把大型工作拆分成若干部分,并以层级结构分配给专业智能体。适合一次改动涉及多个文件或模块的开发者。
适用场景
- ✓当一项改动需要更新三个或更多文件的时候。
- ✓当一项功能涉及多个模块、必须协调进行的时候。
- ✓当一项改动需要同时更新代码和测试的时候。
技能链接
https://github.com/ruvnet/ruflo/blob/main/.agents/skills/swarm-orchestration/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请使用专业智能体,协调对认证模块、其测试和数据库结构的同一项改动。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会启动一个层级式智能体群,把任务分派给合适的专家,跟踪其进度,并合并它们的结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Swarm Orchestration 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.
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
When to Skip
- single file edits
- simple bug fixes (1-2 lines)
- documentation updates
- configuration changes
- quick exploration
Commands
Initialize Swarm
Start a new swarm with hierarchical topology (anti-drift)
npx @claude-flow/cli swarm init --topology hierarchical --max-agents 8 --strategy specialized
Example:
npx @claude-flow/cli swarm init --topology hierarchical --max-agents 6 --strategy specialized
Route Task
Route a task to the appropriate agents based on task type
npx @claude-flow/cli hooks route --task "[task description]"
Example:
npx @claude-flow/cli hooks route --task "implement OAuth2 authentication flow"
Spawn Agent
Spawn a specific agent type
npx @claude-flow/cli agent spawn --type [type] --name [name]
Example:
npx @claude-flow/cli agent spawn --type coder --name impl-auth
Monitor Status
Check the current swarm status
npx @claude-flow/cli swarm status --verbose
Orchestrate Task
Orchestrate a task across multiple agents
npx @claude-flow/cli task orchestrate --task "[task]" --strategy adaptive
Example:
npx @claude-flow/cli task orchestrate --task "refactor auth module" --strategy parallel --max-agents 4
List Agents
List all active agents
npx @claude-flow/cli agent list --filter active
Scripts
| Script | Path | Description |
|---|---|---|
swarm-start |
.agents/scripts/swarm-start.sh |
Initialize swarm with default settings |
swarm-monitor |
.agents/scripts/swarm-monitor.sh |
Real-time swarm monitoring dashboard |
References
| Document | Path | Description |
|---|---|---|
Agent Types |
docs/agents.md |
Complete list of agent types and capabilities |
Topology Guide |
docs/topology.md |
Swarm topology configuration guide |
Best Practices
- Check memory for existing patterns before starting
- Use hierarchical topology for coordination
- Store successful patterns after completion
- Document any new learnings
常见问题
什么时候应该跳过它?
这项技能说明,对于单文件编辑、小型错误修复和文档更新,应跳过它。
它使用什么拓扑?
它使用带有专业智能体的层级式拓扑,这项技能说明这有助于防止偏离。
我能选择运行多少个智能体吗?
能。这项技能会在智能体群启动时设置智能体数量上限。
详情
作者的原始描述
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. Use when: 3+ files need changes, new feature implementation, cross-module refactoring, API changes with tests, security-related changes, performance optimization across codebase, database schema changes. Skip when: single file edits, simple bug fixes (1-2 lines), documentation updates, configuration changes, quick exploration.
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1539
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。