Claude-code-flow hive-mind
install
source · Clone the upstream repo
git clone https://github.com/ruvnet/ruflo
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ruvnet/ruflo "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.agents/skills/hive-mind" ~/.claude/skills/ruvnet-claude-code-flow-hive-mind && rm -rf "$T"
manifest:
.agents/skills/hive-mind/SKILL.mdsource content
Hive-Mind Skill
Purpose
Byzantine fault-tolerant consensus and distributed swarm coordination.
When to Trigger
- Multi-agent distributed tasks
- Fault-tolerant operations needed
- Collective decision making
- Complex coordination patterns
Topologies
| Topology | Description | Use Case |
|---|---|---|
| Queen controls workers | Default, anti-drift |
| Fully connected peers | Research, exploration |
| Hybrid | Recommended for complex |
| Dynamic based on load | Auto-scaling |
Consensus Strategies
| Strategy | Tolerance | Use Case |
|---|---|---|
| f < n/3 faulty | Untrusted environment |
| f < n/2 faulty | Leader-based, consistent |
| Eventual | Large scale, availability |
| Conflict-free | Concurrent updates |
| Configurable | Tunable consistency |
Commands
Initialize Hive-Mind
npx claude-flow hive-mind init --topology hierarchical-mesh --consensus raft
Spawn Queen
npx claude-flow hive-mind spawn --role queen --name coordinator
Check Consensus Status
npx claude-flow hive-mind consensus --status
View Sessions
npx claude-flow hive-mind sessions --active
Best Practices
- Use hierarchical for coding tasks (anti-drift)
- Use raft consensus for consistency
- Keep agent count under 8 for coordination
- Run frequent checkpoints