Skill: sarahmirrand001-oss/agent-swarm-network (version 1.0.6)

--- name: Agent Swarm Network version: 1.0.6 description: > Agent communication protocol skill. Provides: inter-agent messaging, context snapshot/restore, event-driven collaboration, model dispatch notifications, sub-agent management, task routing, file transfer, and network diagnostics. Invoke this Skill when cross-session context persistence, multi-agent coordination, or context overflow handling is needed. Built on top of Pilot Protocol (https://github.com/TeoSlayer/pilotprotocol). --- # Agent Swarm Network — Agent Communication Skill > A unified communication backbone for every AI tool in the OpenClaw ecosystem > (OpenClaw / Antigravity / Codex). > > Analogy: This network = the Agent's nervous system. OpenClaw = the Agent's brain. ## Acknowledgments This Skill is built on top of [Pilot Protocol](https://github.com/TeoSlayer/pilotprotocol) by [@TeoSlayer](https://github.com/TeoSlayer). Pilot Protocol provides the core daemon, encrypted tunnels, NAT traversal, and peer-to-peer addressing that this Skill leverages. Huge thanks to the Pilot Protocol team for building the Internet of Agents. --- ## Permissions & Privacy **This Skill executes local CLI commands and writes files to the `~/.pilot/` directory.** Full transparency: | Permission | What | Why | |------------|------|-----| | **CLI Exec** | `~/.pilot/bin/pilotctl` | All agent operations go through this binary | | **File Write** | `~/.pilot/inbox/` | Context snapshots and incoming messages land here | | **File Write** | `~/.pilot/received/` | Received files from peer agents | | **File Read** | `~/.pilot/inbox/` | Reading snapshots for context restoration | | **File Read** | `~/.pilot/received/` | Reading transferred files | | **Network** | Local Unix socket | Daemon communication (localhost only) | | **Network** | UDP tunnels (encrypted) | Agent-to-agent communication (AES-256-GCM) | | **Script Exec** | `~/.pilot/context-snapshot.sh` | Context snapshot helper script | | **Script Exec** | `~/.pilot/pilot-publish.sh` | Event publishing helper script | | **Process** | Daemon lifecycle | Start/stop/status of the pilotctl daemon | > **Privacy Note:** All inter-agent traffic is encrypted end-to-end using X25519 key exchange + AES-256-GCM. Agents are private by default and require mutual trust handshake before communication. No data passes through relay servers. The rendezvous registry defaults to localhost (`127.0.0.1:9000`) — no peer-discovery metadata leaves the machine unless you explicitly change `registry_url` to a remote address. Snapshots are unencrypted JSON; you must secure the `~/.pilot/` directory (`chmod 700`). --- ## Prerequisites | Tool | Purpose | Required? | |------|---------|-----------| | **Pilot Protocol** | Core daemon + CLI (`pilotctl`) | ✅ Required | | **OpenClaw** | Skill host + Agent orchestration | ✅ Required | ## Configuration Edit `config.json` after installation: ```json { "pilotctl_path": "~/.pilot/bin/pilotctl", "daemon_start_script": "~/.pilot/start-local.sh", "snapshot_script": "~/.pilot/context-snapshot.sh", "publish_script": "~/.pilot/pilot-publish.sh", "inbox_path": "~/.pilot/inbox/", "received_path": "~/.pilot/received/", "agent_hostname": "keke-agent" } ``` | Field | Description | Default | |-------|-------------|---------| | `pilotctl_path` | Path to the pilotctl binary | `~/.pilot/bin/pilotctl` | | `daemon_start_script` | Script to start the daemon | `~/.pilot/start-local.sh` | | `snapshot_script` | Context snapshot helper script | `~/.pilot/context-snapshot.sh` | | `publish_script` | Event publish helper script | `~/.pilot/pilot-publish.sh` | | `inbox_path` | Directory for incoming messages/snapshots | `~/.pilot/inbox/` | | `received_path` | Directory for received files | `~/.pilot/received/` | | `agent_hostname` | This agent's hostname on the Pilot network | `keke-agent` | ### First-time Setup 1. **Install Pilot Protocol securely:** We strongly recommend **building from source** to eliminate supply-chain risk. Clone `https://github.com/TeoSlayer/pilotprotocol`, audit the source, compile via `go build`, and place the binary at `~/.pilot/bin/pilotctl`. 2. Secure your directories: `chmod 700 ~/.pilot` 3. Start the daemon: `~/.pilot/start-local.sh` 4. Verify: `~/.pilot/bin/pilotctl --json daemon status` --- ## Global Rules 1. All `pilotctl` commands use the full path: `~/.pilot/bin/pilotctl` 2. Always append the `--json` flag for structured output 3. Check the returned `status` field: `ok` = success, `error` = failure 4. On failure, read the `hint` field for remediation guidance --- ## ⚠️ Single-Node Mode (Current State) Currently running with only one node (`keke-agent`). **Cannot send network messages to self** (publish/send-message will return `connection_failed`). ### Single-Node Workarounds | Operation | Multi-node Command | Single-node Alternative | |-----------|-------------------|------------------------| | Publish event | `pilotctl publish keke-agent topic --data ...` | `~/.pilot/pilot-publish.sh topic '{"key":"val"}'` | | Send to inbox | `pilotctl send-message keke-agent --data ...` | Write file directly to `~/.pilot/inbox/` | | Context snapshot | `pilotctl send-message ...` | `~/.pilot/context-snapshot.sh` | | Read inbox | `pilotctl inbox` → read `~/.pilot/inbox/` | Same (read directory directly) | | Check status | `pilotctl info` | ✅ Works normally | | Set tags | `pilotctl set-tags ...` | ✅ Works normally | When a second node joins (e.g., VPS or another Mac), network commands will activate automatically. --- ## Capability 1: Context Snapshot & Restore (Highest Priority) ### 1.1 Save Context Snapshot When a session ends, compaction triggers, or manual request is made, save critical context: ```bash # Using the snapshot script (works in both single-node and multi-node) ~/.pilot/context-snapshot.sh SESSION_ID "Key summary of current context" # Or manually write to inbox echo '{"type":"context_snapshot","session_id":"ID","summary":"Summary"}' > ~/.pilot/inbox/snapshot_$(date +%Y%m%d_%H%M%S).json ``` ### 1.2 Restore Context When a new session starts, read the previous session's snapshot: ```bash ~/.pilot/bin/pilotctl --json inbox ``` Returns a `messages` array sorted by `received_at`. Read the most recent `context_snapshot` type message. ### 1.3 Context Overflow Protocol When context usage exceeds 80%: ``` Step 1: Extract critical information from current context Step 2: Serialize as JSON snapshot Step 3: pilotctl send-message keke-agent --data "{snapshot}" --type json Step 4: pilotctl publish keke-agent context.overflow --data "overflow at TOKEN_COUNT tokens" Step 5: Suggest user starts a new session Step 6: New session automatically restores from inbox ``` --- ## Capability 2: Event-Driven Collaboration ### 2.1 Publish Events When significant events occur, use `pilot-publish.sh` (automatically handles single-node/multi-node): ```bash # Model switch ~/.pilot/pilot-publish.sh model.switch '{"from":"flash-lite","to":"opus-4.6","reason":"strategic analysis"}' # Task completion ~/.pilot/pilot-publish.sh task.complete '{"task":"intelligence_ingestion","source":"twitter"}' # Context compaction ~/.pilot/pilot-publish.sh context.compaction '{"before_tokens":150000,"after_tokens":30000}' # Error alert ~/.pilot/pilot-publish.sh error.alert '{"type":"model_402","model":"gemini","action":"fallback"}' # Intelligence ingested ~/.pilot/pilot-publish.sh intel.ingested '{"source":"url","title":"Article Title","category":"infra"}' ``` ### 2.2 Subscribe to Events Listen for specific topics (used by sub-agents or external monitors): ```bash # Listen to all events ~/.pilot/bin/pilotctl --json subscribe keke-agent "*" --timeout 60s # Listen only to model switches ~/.pilot/bin/pilotctl --json subscribe keke-agent model.switch --count 1 # Listen for error alerts ~/.pilot/bin/pilotctl --json subscribe keke-agent error.* --timeout 300s ``` ### 2.3 Standard Event Topics | Topic | Trigger | Data Schema | |-------|---------|-------------| | `context.snapshot` | Session end / manual save | `{session_id, summary, key_decisions}` | | `context.overflow` | Token usage > 80% | `{token_count, threshold}` | | `context.compaction` | Compaction triggered | `{before_tokens, after_tokens}` | | `model.switch` | Model changed | `{from, to, reason}` | | `model.error` | Model failure | `{model, error, fallback}` | | `task.start` | Task initiated | `{task, type, model}` | | `task.complete` | Task finished | `{task, result_summary}` | | `task.error` | Task failed | `{task, error, retry}` | | `intel.ingested` | Information ingested | `{source, title, category, value}` | | `error.alert` | Error notification | `{type, details, action}` | | `agent.spawn` | Sub-agent created | `{hostname, purpose, model}` | | `agent.exit` | Sub-agent exited | `{hostname, reason, result}` | --- ## Capability 3: Sub-Agent Management ### 3.1 Naming Convention ``` Primary agent: keke-agent Sub-agents: keke-sub-{purpose} (e.g., keke-sub-code, keke-sub-writer) Nested sub: keke-sub-{purpose}-{n} ``` ### 3.2 Spawning Sub-Agents When OpenClaw needs to create a sub-agent for overflow tasks: ```bash # Publish agent spawn event ~/.pilot/bin/pilotctl --json publish keke-agent agent.spawn \ --data '{"hostname":"keke-sub-code","purpose":"code refactoring","model":"sonnet-4.6"}' ``` ### 3.3 Collecting Sub-Agent Results ```bash # Sub-agent sends results via Data Exchange ~/.pilot/bin/pilotctl --json send-message keke-agent \ --data '{"type":"sub_agent_result","from":"keke-sub-code","result":"refactoring complete","files_changed":3}' \ --type json # Primary agent checks results ~/.pilot/bin/pilotctl --json inbox ``` --- ## Capability 4: Task Routing ### 4.1 Route by Tags Assign capability tags to different agents: ```bash # Tag self ~/.pilot/bin/pilotctl --json set-tags orchestrator chinese fast ``` Tag conventions: | Tag | Meaning | Best Fit Agent | |-----|---------|---------------| | `orchestrator` | Scheduling & dispatch | OpenClaw primary agent | | `deep-reasoning` | Deep reasoning tasks | Antigravity (Opus) | | `code-gen` | Code generation | Codex (Sonnet) | | `local-inference` | Local model inference | LM Studio (Qwen) | | `fast` | Fast responses | Flash Lite instances | | `chinese` | Chinese language tasks | Qwen / Chinese-optimized models | ### 4.2 Find the Best Agent ```bash ~/.pilot/bin/pilotctl --json peers --search "code-gen" ``` --- ## Capability 5: Model Dispatch Notifications ### 5.1 Publish Model Switch Events Every model switch gets logged to the event stream: ```bash ~/.pilot/bin/pilotctl --json publish keke-agent model.switch \ --data '{"from":"CURRENT_MODEL","to":"NEW_MODEL","reason":"reason","timestamp":"ISO8601"}' ``` ### 5.2 Model Fallback Chain On model failure, automatically publish degradation events: ```bash ~/.pilot/bin/pilotctl --json publish keke-agent model.error \ --data '{"model":"gemini-3-flash","error":"402 quota exceeded","fallback":"minimax-m2.5"}' ``` --- ## Capability 6: File Transfer ### 6.1 Send File ```bash ~/.pilot/bin/pilotctl --json send-file keke-agent /path/to/file ``` Files are saved to `~/.pilot/received/`. ### 6.2 View Received Files ```bash ~/.pilot/bin/pilotctl --json received ``` ### 6.3 Use Cases - Transfer context snapshot files - Transfer code diffs - Transfer analysis reports - Share configuration across agents --- ## Capability 7: Network Diagnostics ### 7.1 Health Checks ```bash # Daemon status ~/.pilot/bin/pilotctl --json daemon status # Agent info ~/.pilot/bin/pilotctl --json info # Connection list ~/.pilot/bin/pilotctl --json connections # Peer list ~/.pilot/bin/pilotctl --json peers ``` ### 7.2 Performance Testing ```bash # Ping latency ~/.pilot/bin/pilotctl --json ping keke-agent --count 3 # Throughput benchmark ~/.pilot/bin/pilotctl --json bench keke-agent 1 ``` --- ## Capability 8: Gateway IP Bridging ### 8.1 Map Agent to Local IP ```bash # Gateway bridging on user-space ports (>1024) does NOT require root/sudo. ~/.pilot/bin/pilotctl gateway start --ports 1234,8080 0:0000.0000.0001 ``` Once mapped, standard HTTP tools can be used: ```bash curl http://10.4.0.1:1234/v1/chat/completions # Like calling LM Studio directly ``` ### 8.2 Use Cases - Expose LM Studio through Gateway as a Pilot address - Unify all model endpoints under one entry point - Access agent services with standard HTTP tools --- ## Capability 9: Webhook Real-time Monitoring ### 9.1 Set Up Webhook ```bash ~/.pilot/bin/pilotctl --json set-webhook http://localhost:8080/pilot-events ``` ### 9.2 Event Types All native daemon events are pushed to the webhook: - `node.registered` / `node.reregistered` - `conn.established` / `conn.fin` / `conn.rst` - `handshake.received` / `handshake.approved` - `message.received` / `file.received` - `pubsub.published` / `pubsub.subscribed` - `security.syn_rate_limited` / `security.nonce_replay` --- ## Standing Orders (Automation Rules) ### Rule 1: Snapshot Before Session End Automatically execute a context snapshot (Capability 1.1) before every session ends. ### Rule 2: Critical Events Must Be Published The following events must always be published to the Event Stream: - Model switches - Intelligence ingestion completions - Task completions/failures - Context compactions - Error alerts ### Rule 3: Auto-Restore on New Session On every new session start, check `pilotctl inbox` for the latest snapshot and restore context. ### Rule 4: Daemon Heartbeat Check daemon status every 30 minutes. Auto-restart on failure. --- ## Troubleshooting | Problem | Diagnostic Command | Solution | |---------|--------------------|----------| | Daemon not running | `pilotctl daemon status` | `~/.pilot/start-local.sh` | | Registry unreachable | `pilotctl info` (check peers) | Verify rendezvous server is running | | Messages not sending | `pilotctl connections` | Check trust state with target | | Inbox overflowing | `pilotctl inbox` | `pilotctl inbox --clear` |

path: README.md
content: # OpenClaw Skill: Agent Swarm Network

> The nervous system for your Agent fleet.
> If OpenClaw is the brain, Agent Swarm Network is the spine.

**Unified communication backbone** for all AI tools in the OpenClaw ecosystem — inter-agent messaging, context snapshot/restore, event-driven collaboration, sub-agent management, and network diagnostics. Built on top of [Pilot Protocol](https://github.com/TeoSlayer/pilotprotocol) by [@TeoSlayer](https://github.com/TeoSlayer).

## Why This Skill?

AI agents today are isolated. Each session starts from zero. Each agent talks through centralized APIs with no way to find, trust, or directly communicate with peers.

This Skill gives your Agent:
- **Cross-session memory** — Context snapshots survive session death. New sessions auto-restore.
- **Agent-to-agent messaging** — Encrypted, peer-to-peer, no middleman.
- **Event-driven coordination** — Model switches, task completions, error alerts flow through a unified event stream.
- **Self-healing context** — When tokens overflow, the Agent automatically snapshots and suggests a fresh session.

## Core Capabilities

```
1. Context Snapshot & Restore    — Survive session boundaries
2. Event-Driven Collaboration    — Pub/sub event stream for all agent activity
3. Sub-Agent Management          — Spawn, monitor, and collect results from child agents
4. Task Routing                  — Tag-based agent discovery and dispatch
5. Model Dispatch Notifications  — Track every model switch and fallback
6. File Transfer                 — Send files between agents
7. Network Diagnostics           — Health checks, ping, throughput benchmarks
8. Gateway IP Bridging           — Map agent addresses to local HTTP endpoints
9. Webhook Monitoring            — Real-time daemon event stream
```

## Prerequisites

| Tool | Purpose | Required? |
|------|---------|-----------|
| **Pilot Protocol** | Core daemon + CLI (`pilotctl`) | ✅ Required |
| **OpenClaw** | Skill host + Agent orchestration | ✅ Required |

## Quick Start

```bash
# 1) Safely install Pilot Protocol's daemon prerequisite
# DO NOT blindly run binaries. We strongly advise building from source:
git clone https://github.com/TeoSlayer/pilotprotocol.git
cd pilotprotocol
go build -o pilotctl
mkdir -p ~/.pilot/bin && mv pilotctl ~/.pilot/bin/pilotctl

# 2) Install this Skill
openclaw skills install github:sarahmirrand001-oss/openclaw-skill-pilot-protocol

# 3) Configure
cp config.example.json config.json
# Edit config.json — set your agent hostname

# 4) Start the daemon
~/.pilot/start-local.sh

# 5) Verify
~/.pilot/bin/pilotctl --json daemon status

# 6) Use it — just end a session and start a new one
# The Skill will auto-snapshot and auto-restore context
```

## What It Provides

| Capability | What Happens |
|-----------|-------------|
| 🧠 **Context Snapshot** | Session context is saved as structured JSON before session end |
| 🔄 **Auto-Restore** | New sessions automatically load the latest snapshot from inbox |
| 📡 **Event Stream** | Model switches, task completions, errors — all published to the event bus |
| 🤖 **Sub-Agent Ops** | Spawn child agents, collect results, manage lifecycle |
| 🏷️ **Tag Routing** | Find the best agent for a task via capability tags |
| 📁 **File Transfer** | Send files between agents over encrypted tunnels |
| 🌐 **Gateway** | Map agent addresses to `http://10.4.0.x` for standard HTTP access |
| 📊 **Diagnostics** | Ping, bench, connection status, peer discovery |

## File Structure

```
pilot-protocol/
├── SKILL.md                  # Skill behavior definition (9 capabilities)
├── README.md                 # This file
├── manifest.json             # MCP-compatible capability declaration
└── config.example.json       # Configuration template
```

## 🛡️ Security & Provenance Auditing

This Skill operates entirely within the local `~/.pilot/` directory and communicates over encrypted peer-to-peer tunnels. However, because it runs a persistent system-level daemon and manages cross-session snapshots, please review the following:

### Provenance
- **Skill Author:** This Skill is an OpenClaw integration layer built by `sarahmirrand001-oss`.
- **Upstream Author:** The underlying daemon and protocol are built by [@TeoSlayer](https://github.com/TeoSlayer/pilotprotocol). Always verify upstream install scripts before executing.

### Trust Boundaries

| Target | Path | When |
|--------|------|------|
| CLI binary | `~/.pilot/bin/pilotctl` | Every operation |
| Inbox | `~/.pilot/inbox/` | **Data-at-Rest Vulnerability:** Context snapshots land here as unencrypted JSON and WILL contain PII, API keys, and session secrets. You MUST secure this folder (`chmod 700 ~/.pilot/`) and regularly clear out old snapshots to minimize data exposure. |
| Received files | `~/.pilot/received/` | File transfers between agents |
| Helper scripts | `~/.pilot/*.sh` | Snapshot and publish shortcuts |
| Daemon process | `pilotctl daemon` | Start/stop/status checks |
| Rendezvous | `TCP :9000` | Peer discovery defaults to **localhost** (`127.0.0.1:9000`). No metadata leaves the machine unless you explicitly change `registry_url` to a remote address. |

### Security Model

- **Encrypt-by-default**: All inter-agent traffic uses X25519 + AES-256-GCM
- **Private-by-default**: Agents are invisible until mutual trust is established via signed handshake
- **No cloud relay**: Messages travel directly between peers (UDP hole-punching). Only the rendezvous registry is used for initial discovery.
- **Local-only daemon communication**: Agent ↔ Daemon talks over a Unix socket, never exposed to the network.

### Before You Install

1. **Install Pilot Protocol manually:** We strongly recommend building the binary from source (`go build`) rather than downloading pre-compiled releases.
2. The daemon must be running for any capability to work.
3. In single-node mode, network commands (publish/send-message) will fail — use the provided shell script workarounds instead.
4. Context snapshots are stored as plain JSON files in `~/.pilot/inbox/` — ensure this path is backed up if persistence matters.

## 🔌 MCP Compatibility

This Skill ships with `manifest.json` — a machine-readable capability declaration following the MCP standard.

- ✅ Any MCP-compatible Agent can **discover** this Skill
- ✅ Any MCP-compatible Agent can **understand** its inputs/outputs without reading SKILL.md
- ✅ Cross-ecosystem compatibility (not locked to OpenClaw)

## Single-Node vs Multi-Node

This Skill works in both modes:

| Mode | Status | Notes |
|------|--------|-------|
| **Single-node** | ✅ Fully functional | Uses shell script workarounds for self-messaging |
| **Multi-node** | ✅ Ready | Network commands activate automatically when peers join |

When a second node joins the network (VPS, another Mac, a cloud agent), all network commands (`publish`, `send-message`, `subscribe`) will work natively without any configuration change.

## Troubleshooting

| Problem | Solution |
|---------|----------|
| Daemon not running | `~/.pilot/start-local.sh` |
| `pilotctl` not found | Build the binary from source located at `github.com/TeoSlayer/pilotprotocol` |
| Publish fails with `connection_failed` | Single-node mode — use `~/.pilot/pilot-publish.sh` instead |
| Inbox empty after restart | Check `~/.pilot/inbox/` — snapshots are plain files |
| Peer not found | Run `pilotctl handshake <hostname>` to establish mutual trust first |

## Acknowledgments

This Skill is built on top of [**Pilot Protocol**](https://github.com/TeoSlayer/pilotprotocol) by [@TeoSlayer](https://github.com/TeoSlayer) and contributors. Pilot Protocol provides the core infrastructure — encrypted P2P tunnels, NAT traversal, virtual addressing, and the `pilotctl` CLI — that makes agent-to-agent communication possible.

---

*"Agent Swarm Network = the Agent's nervous system. OpenClaw = the Agent's brain."*

*Built for operators who build for agents.*


path: config.example.json
content: pilotctl_path: ~/.pilot/bin/pilotctl
daemon_start_script: ~/.pilot/start-local.sh
snapshot_script: ~/.pilot/context-snapshot.sh
publish_script: ~/.pilot/pilot-publish.sh
inbox_path: ~/.pilot/inbox/
received_path: ~/.pilot/received/
agent_hostname: keke-agent

path: manifest.json
content: {
    "$schema": "https://spec.modelcontextprotocol.io/2025-03/skill.json",
    "name": "agent-swarm-network",
    "version": "1.0.6",
    "description": "Agent Swarm Network skill for cross-session persistent context, event-driven collaboration, and sub-agent routing. Powered by the open-source Pilot Protocol by TeoSlayer.",
    "author": "sarahmirrand001-oss",
    "license": "MIT",
    "homepage": "https://agent-swarm-network.vercel.app",
    "source": "https://github.com/sarahmirrand001-oss/openclaw-skill-pilot-protocol",
    "repository": "https://github.com/sarahmirrand001-oss/openclaw-skill-pilot-protocol",
    "upstream": "https://github.com/TeoSlayer/pilotprotocol",
    "categories": [
        "communication",
        "agent-coordination",
        "context-management",
        "networking"
    ],
    "required_config": {
        "pilotctl_path": {
            "type": "path",
            "description": "Absolute path to the pilotctl binary.",
            "required": true,
            "default": "~/.pilot/bin/pilotctl"
        },
        "agent_hostname": {
            "type": "string",
            "description": "This agent's hostname on the Pilot network.",
            "required": true,
            "default": "keke-agent"
        },
        "inbox_path": {
            "type": "path",
            "description": "Directory where incoming messages and context snapshots are stored.",
            "required": false,
            "default": "~/.pilot/inbox/"
        },
        "received_path": {
            "type": "path",
            "description": "Directory where received files from peer agents are stored.",
            "required": false,
            "default": "~/.pilot/received/"
        }
    },
    "credentials": {},
    "file_permissions": {
        "read": [
            "~/.pilot/inbox/ — reads context snapshots and incoming messages",
            "~/.pilot/received/ — reads transferred files from peers"
        ],
        "write": [
            "~/.pilot/inbox/ — writes context snapshots as JSON files",
            "~/.pilot/received/ — incoming file transfers land here (managed by daemon)"
        ],
        "execute": [
            "~/.pilot/bin/pilotctl — all agent operations go through this CLI",
            "~/.pilot/start-local.sh — daemon startup script",
            "~/.pilot/context-snapshot.sh — context snapshot helper",
            "~/.pilot/pilot-publish.sh — event publishing helper"
        ],
        "system_privileges": [
            "NO root/sudo required. Gateway bridging over user ports (>1024) is strictly unprivileged."
        ]
    },
    "network_behavior": {
        "description": "This Skill communicates over the local Unix socket to the Pilot daemon. The daemon handles encrypted UDP tunnels to peers. No direct HTTP/HTTPS calls are made by the Skill itself.",
        "channels": [
            "Unix socket (localhost) — Agent to Daemon communication",
            "Encrypted UDP tunnels (X25519 + AES-256-GCM) — Daemon to Daemon, peer-to-peer",
            "TCP :9000 — Local registry connection for peer discovery (defaults to 127.0.0.1:9000; no data is sent to any external server unless the user explicitly reconfigures)"
        ],
        "note": "In single-node mode, network commands fall back to local file writes. No external network traffic in single-node mode."
    },
    "privacy_considerations": [
        "All inter-agent traffic is encrypted end-to-end (AES-256-GCM).",
        "Agents are private by default; mutual trust handshake required before communication.",
        "Context snapshots are stored as plain JSON files locally in ~/.pilot/inbox/. Users MUST secure this directory (chmod 700) as snapshots may contain sensitive PII or API keys.",
        "No data is sent to third-party cloud services by default. The rendezvous registry defaults to 127.0.0.1:9000 (localhost). No peer-discovery metadata leaves the machine unless the user explicitly changes registry_url to a remote address.",
        "The Skill does not access any browser sessions, cookies, or external credentials."
    ],
    "persistence_effects": [
        "Creates JSON snapshot files in ~/.pilot/inbox/ on session end.",
        "Received files from peers are stored in ~/.pilot/received/.",
        "Event stream publishes are ephemeral (pub/sub, not persisted by the Skill).",
        "Daemon process runs continuously in the background until explicitly stopped."
    ],
    "capabilities": {
        "input": [
            {
                "type": "command",
                "description": "CLI commands to pilotctl for agent operations (messaging, snapshots, diagnostics)"
            },
            {
                "type": "event",
                "description": "Agent lifecycle events (model switch, task complete, errors) to publish"
            }
        ],
        "output": [
            {
                "type": "context_snapshot",
                "format": "json",
                "path_pattern": "~/.pilot/inbox/snapshot_YYYYMMDD_HHMMSS.json",
                "description": "Serialized context state for cross-session persistence"
            },
            {
                "type": "event_publication",
                "format": "json",
                "description": "Published events on the Pilot event stream (pub/sub)"
            },
            {
                "type": "diagnostic_report",
                "format": "json",
                "description": "Daemon status, peer info, connection state, latency results"
            }
        ]
    },
    "dependencies": {
        "binaries": [
            "pilotctl",
            "go"
        ],
        "required": [
            "openclaw"
        ],
        "optional": []
    },
    "safety": {
        "auto_install": false,
        "always_on": false,
        "self_modification": false,
        "principle": "This Skill executes local CLI commands and writes files only within the ~/.pilot/ directory. It does not access browser state, external APIs, or credentials outside the Pilot Protocol ecosystem."
    },
    "triggers": {
        "auto": [
            "session start (auto-restore context from inbox)",
            "session end (auto-snapshot context)",
            "model switch event",
            "context overflow detected (>80% token usage)"
        ],
        "exclude": [
            "general conversation unrelated to agent coordination",
            "tasks that do not involve cross-session or cross-agent operations"
        ]
    }
}

Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: suspicious | SkillSpector: suspicious (HIGH)