swarm-init
它能做什么
这项技能为跨越多个文件或模块的工作启动一组协调的 AI 智能体。适用于任务太大、单个智能体无法完成的人。
适用场景
- ✓当任务涉及三个或更多文件,需要多个智能体的时候。
- ✓当你希望并行构建功能、跨模块重构或运行安全审计的时候。
- ✓当只需要小改动或快速提问时,不要使用这项技能。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-swarm/skills/swarm-init/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请组建一个智能体团队,并行重构账单模块,并保持它们之间的协调。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能会以所选的布局和最大智能体数量启动一个集群。智能体在后台启动,每个智能体都有自己的 git 工作树。它们通过发送消息来协调。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Initialize a hierarchical swarm for coordinated multi-agent work.
Via MCP: mcp__plugin_ruflo-core_ruflo__swarm_init({ topology: "hierarchical", maxAgents: 8, strategy: "specialized" })
Or via CLI:
npx @claude-flow/cli@latest swarm init --topology hierarchical --max-agents 8 --strategy specialized
Then spawn named agents in ONE message via Claude Code's Task tool with name: (for SendMessage addressability) and run_in_background: true (for parallel execution). Use EnterWorktree per agent for git-safe parallel work, and SendMessage for inter-agent coordination.
For larger teams (10+), use hierarchical-mesh topology:
npx @claude-flow/cli@latest swarm init --topology hierarchical-mesh --max-agents 15 --strategy specialized
常见问题
它能运行多少个智能体?
示例设置最多为八个,对于十个或以上的团队,建议使用更大的布局。
智能体共享同一批文件吗?
这项技能为每个智能体使用单独的 git 工作树,因此并行工作互不干扰。
什么时候不值得使用?
对于单文件编辑或快速提问,来源建议跳过它。
详情
作者的原始描述
Initialize a multi-agent swarm with anti-drift configuration. Use when starting a complex multi-file task that needs 3+ coordinated agents (feature implementation, refactor across modules, security audit). Skip for single-file edits or quick questions.
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1699
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。