Swarm Orchestration

ruvnet/ruflo/.agents/skills/swarm-orchestration

作者 ruvnet6051f6702b61无许可证74K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

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.

AI 生成的概览

协调多智能体集群,拆分并执行复杂的多文件软件任务。

功能
该技能建立并管理一个由专用智能体组成的分层集群,用于跨多个文件或模块的复杂工作。它提供初始化集群、路由任务、生成智能体、编排任务和查看状态的命令。它还附带两个用于启动和监控集群的 shell 脚本。
适用场景
适用于涉及三个及以上文件的任务、新功能实现、跨模块重构、带测试的 API 变更、安全相关变更、全代码库性能优化或数据库架构变更。单文件编辑、一两行的简单缺陷修复、文档更新、配置修改和快速探索则不适用。
运行要求
需要 npx 命令和 @claude-flow/cli 包,并需要网络访问以下载该包。附带两个可执行 shell 脚本,用于启动和监控集群。

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)

bash
npx @claude-flow/cli swarm init --topology hierarchical --max-agents 8 --strategy specialized

Example:

bash
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

bash
npx @claude-flow/cli hooks route --task "[task description]"

Example:

bash
npx @claude-flow/cli hooks route --task "implement OAuth2 authentication flow"

Spawn 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

Monitor Status

Check the current swarm status

bash
npx @claude-flow/cli swarm status --verbose

Orchestrate Task

Orchestrate a task across multiple agents

bash
npx @claude-flow/cli task orchestrate --task "[task]" --strategy adaptive

Example:

bash
npx @claude-flow/cli task orchestrate --task "refactor auth module" --strategy parallel --max-agents 4

List Agents

List all active agents

bash
npx @claude-flow/cli agent list --filter active

Scripts

ScriptPathDescription
swarm-start.agents/scripts/swarm-start.shInitialize swarm with default settings
swarm-monitor.agents/scripts/swarm-monitor.shReal-time swarm monitoring dashboard

References

DocumentPathDescription
Agent Typesdocs/agents.mdComplete list of agent types and capabilities
Topology Guidedocs/topology.mdSwarm topology configuration guide

Best Practices

  1. Check memory for existing patterns before starting
  2. Use hierarchical topology for coordination
  3. Store successful patterns after completion
  4. Document any new learnings

来源与署名

来源:ruvnet/ruflo位于.agents/skills/swarm-orchestration提交6051f67

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架