Skip to main content
skill CX Codex

swarm-init — Claude Code skill: setup and use

Initializes a coordinated agent swarm for complex changes across multiple files. Use it when agents need parallel tasks, named roles and direct messaging.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ruvnet/ruflo --skill swarm-init -a claude-code
Open on GitHub

What swarm-init does

This skill initializes a hierarchical agent swarm for coordinated work across multiple files. It uses a specialized strategy and an anti-drift configuration to keep agents focused on the shared task.

After initialization, agents are created in one Task message with names and background execution. SendMessage handles communication between named agents, while EnterWorktree gives each agent a separate Git worktree for parallel changes.

Available topologies include hierarchical, mesh, hierarchical-mesh, ring, star and adaptive. For a single-file edit, this setup adds unnecessary overhead because the skill is built for coordinated agent work.

What it helps with

  • initialize agents for a multi-file change
  • assign specialized work to separate agents
  • run parallel changes in separate Git worktrees
  • coordinate named agents with direct messages

Example prompts for the agent

  • Run swarm-init for a refactor across several modules.
  • Initialize swarm-init with the hierarchical-mesh topology.
  • Create an agent swarm with swarm-init and give each agent its own worktree.

How to install swarm-init

1Skills CLI (Vercel)

npx skills add ruvnet/ruflo --skill swarm-init -a claude-code

2Manually: put the files in place

~/.claude/skills/swarm-init/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/swarm-init/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about swarm-init

How do I install swarm-init in Claude Code?

Run npx skills add ruvnet/ruflo --skill swarm-init -a claude-code, then run npx skills add ruvnet/ruflo --skill swarm-init -a claude-code again. The skill file is at ~/.claude/skills/swarm-init/SKILL.md.

What does swarm-init do?

It initializes a hierarchical swarm for coordinated agent work. Agents can be named and launched through Task, communicate with SendMessage, and work in separate worktrees.

Which swarm topologies does swarm-init support?

It supports hierarchical, mesh, hierarchical-mesh, ring, star and adaptive. The description suggests hierarchical-mesh for a larger team.

Source text

SKILL.md · MIT
---
name: swarm-init
description: 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.
argument-hint: "[--topology hierarchical|mesh|hierarchical-mesh|ring|star|adaptive]"
allowed-tools: Bash(npx *) mcp__plugin_ruflo-core_ruflo__swarm_init mcp__plugin_ruflo-core_ruflo__swarm_status Task SendMessage
---
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:
```bash
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:
```bash
npx @claude-flow/cli@latest swarm init --topology hierarchical-mesh --max-agents 15 --strategy specialized
```

© ruvnet · MIT · ruvnet/ruflo

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set146

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor