home / skills / ruvnet / ruflo / hive-mind
This skill coordinates multi-agent systems with Byzantine fault tolerance to enable robust consensus and adaptive swarm management.
npx playbooks add skill ruvnet/ruflo --skill hive-mindReview the files below or copy the command above to add this skill to your agents.
---
name: hive-mind
description: >
Byzantine fault-tolerant consensus and distributed coordination. Queen-led hierarchical swarm management with multiple consensus strategies.
Use when: distributed coordination, fault-tolerant operations, multi-agent consensus, collective decision making.
Skip when: single-agent tasks, simple operations, local-only work.
---
# 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 |
|----------|-------------|----------|
| `hierarchical` | Queen controls workers | Default, anti-drift |
| `mesh` | Fully connected peers | Research, exploration |
| `hierarchical-mesh` | Hybrid | Recommended for complex |
| `adaptive` | Dynamic based on load | Auto-scaling |
## Consensus Strategies
| Strategy | Tolerance | Use Case |
|----------|-----------|----------|
| `byzantine` | f < n/3 faulty | Untrusted environment |
| `raft` | f < n/2 faulty | Leader-based, consistent |
| `gossip` | Eventual | Large scale, availability |
| `crdt` | Conflict-free | Concurrent updates |
| `quorum` | Configurable | Tunable consistency |
## Commands
### Initialize Hive-Mind
```bash
npx claude-flow hive-mind init --topology hierarchical-mesh --consensus raft
```
### Spawn Queen
```bash
npx claude-flow hive-mind spawn --role queen --name coordinator
```
### Check Consensus Status
```bash
npx claude-flow hive-mind consensus --status
```
### View Sessions
```bash
npx claude-flow hive-mind sessions --active
```
## Best Practices
1. Use hierarchical for coding tasks (anti-drift)
2. Use raft consensus for consistency
3. Keep agent count under 8 for coordination
4. Run frequent checkpoints
This skill provides Byzantine fault-tolerant consensus and distributed swarm coordination for multi-agent systems. It uses a queen-led hierarchical approach with optional mesh and adaptive topologies to manage large swarms. The design supports multiple consensus strategies so you can tune safety, availability, and performance for real-world distributed workflows.
The skill inspects swarm topology, agent roles, and runtime health to select and run a consensus strategy suited to the current environment. A queen node can lead workers in a hierarchical layout, while mesh and hybrid modes enable peer-to-peer or mixed coordination. It exposes commands to initialize swarms, spawn leaders, check consensus status, and list active sessions so you can operate and monitor the swarm from CLI or automation scripts.
Which consensus strategy should I pick for safety vs. availability?
Pick raft for strong consistency and leader-based safety. Choose byzantine tolerance in adversarial settings. Use gossip or CRDT when availability and scalability are priorities over immediate consistency.
When should I use the hierarchical topology?
Use hierarchical when you need a clear leader to coordinate tasks, reduce drift, and simplify task assignment—common in coding, orchestration, and tightly-coupled workflows.