Pilot Leader Election
Elect a coordinator with automatic failover using heartbeat-based leader election. Use this skill when: 1. A swarm needs a single coordinator for decision making 2. You need automatic failover when the current leader fails 3. You want to avoid split-brain with deterministic tie-breaking Do NOT use this skill when: - All agents need equal voting power (use pilot-consensus) - You need decentralized decision making (use pilot-gossip)
Install
npx skills add TeoSlayer/pilot-skills --skill pilot-leader-electiongit clone --depth 1 https://github.com/TeoSlayer/pilot-skills.git /tmp/pilot-skills
mkdir -p ~/.claude/skills
cp -r /tmp/pilot-skills/skills/pilot-leader-election ~/.claude/skills/pilot-leader-electionPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# pilot-leader-election
Implement leader election protocols with automatic failover detection.
## Commands
### Announce candidacy
```bash
pilotctl --json publish "registry-hostname" "election:$ELECTION_GROUP" \
--data "{\"type\":\"election\",\"candidate\":\"$AGENT_ID\",\"priority\":$PRIORITY,\"term\":$TERM}"
```
### Declare victory as leader
```bash
pilotctl --json publish "registry-hostname" "election:$ELECTION_GROUP" \
--data "{\"type\":\"leader\",\"leader\":\"$AGENT_ID\",\"term\":$TERM,\"elected_at\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}"
```
### Send leader heartbeat
```bash
pilotctl --json publish "registry-hostname" "election:$ELECTION_GROUP" \
--data "{\"type\":\"heartbeat\",\"leader\":\"$AGENT_ID\",\"term\":$TERM,\"timestamp\":\"$(date -u +%s)\"}"
```
### Detect leader failure
```bash
LAST_HEARTBEAT=$(pilotctl --json inbox \
| jq -r '[.messages[] | select(.topic == "election:'$ELECTION_GROUP'" and .payload.type == "heartbeat")] | sort_by(.payload.timestamp) | last | .payload.timestamp')
ELAPSED=$(( $(date -u +%s) - LAST_HEARTBEAT ))
if [ "$ELAPSED" -gt 10 ]; then
echo "Leader timeout, starting election"
fi
```
## Workflow Example
Bully algorithm with priority-based election:Details
- Skill name
pilot-leader-election- Repository
- TeoSlayer/pilot-skills
- Path
skills/pilot-leader-election/SKILL.md- License
- AGPL-3.0
- Repo updated
- 9 November 2026
FAQ
What does the Pilot Leader Election skill do?
Elect a coordinator with automatic failover using heartbeat-based leader election. Use this skill when: 1. A swarm needs a single coordinator for decision making 2. You need automatic failover when the current leader fails 3. You want to avoid split-brain with deterministic tie-breaking Do NOT use this skill when: - All agents need equal voting power (use pilot-consensus) - You need decentralized decision making (use pilot-gossip)
How do I install the Pilot Leader Election skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add TeoSlayer/pilot-skills --skill pilot-leader-election. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Pilot Leader Election popular?
It lives in TeoSlayer/pilot-skills, which has 9 GitHub stars and 3 forks.
Related skills
Pilot A2a Bridge
9TeoSlayer/pilot-skills
Bridge A2A (Agent-to-Agent) protocol messages over Pilot tunnels. Use this skill when: 1. You need to connect A2A agents across different networks 2. You want to route A2A messages through Pilot's overlay network 3. You're building multi-agent systems that need reliable messaging Do NOT use this skill when: - Agents are on the same local network (use direct A2A instead) - You need raw TCP/UDP access (use pilot-protocol directly) - The daemon is not running
Pilot Ad Campaign Manager Setup
9TeoSlayer/pilot-skills
Deploy an ad campaign management system with 4 agents that automate campaign strategy, creative production, real-time bidding, and performance analytics. Use this skill when: 1. User wants to set up an automated ad campaign management pipeline 2. User is configuring an agent as part of an advertising or media buying workflow 3. User asks about automating campaign strategy, creative testing, or bid optimization across agents Do NOT use this skill when: - User wants to track a single metric (use pilot-metrics instead) - User wants a one-off data stream (use pilot-stream-data instead)
Pilot Agent Marketplace Setup
9TeoSlayer/pilot-skills
Deploy a decentralized agent marketplace with 4 agents. Use this skill when: 1. User wants to set up an agent capability marketplace 2. User is configuring a directory, matchmaker, escrow, or gateway agent 3. User asks about capability discovery, auctions, or escrow settlement Do NOT use this skill when: - User wants to discover a single agent (use pilot-discover instead) - User wants to run a single auction (use pilot-auction instead)
Pilot Matchmaker
9TeoSlayer/pilot-skills
Match agents with complementary capabilities. Use this skill when: 1. Finding the best agent to fulfill a specific capability requirement 2. Matching agents for collaborative workflows or resource pooling 3. Building agent teams with complementary skills Do NOT use this skill when: - You already know the agent to connect to (use pilot-connect instead) - You need simple tag search (use pilot-discover instead) - You need to visualize all options (use pilot-network-map instead)
Pilot Keychain
9TeoSlayer/pilot-skills
Secure credential exchange with auto-expiry for Pilot Protocol agents. Use this skill when: 1. You need to share API keys, tokens, or credentials securely between agents 2. You want automatic expiration and rotation of shared secrets 3. You need end-to-end encrypted credential distribution Do NOT use this skill when: - You need persistent credential storage (use secure vault instead) - You're sharing large files (use pilot-send for file transfer) - You need multi-recipient broadcast (use separate sends per recipient)
Pilot MCP Bridge
9TeoSlayer/pilot-skills
MCP server wrapping the Pilot daemon for OpenClaw/Claude Code integration. Use this skill when: 1. You need to expose Pilot Protocol operations as MCP tools 2. You want to integrate Pilot into Claude Code or OpenClaw workflows 3. You're building an AI agent that needs to communicate over Pilot Do NOT use this skill when: - You need direct pilotctl access (use pilot-protocol skill instead) - The daemon is not running - You're working in a non-MCP environment
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.