← 返回 Skills 市场
jameseball

Clawdio

作者 JamesEBall · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
970
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install jameseball-clawdio
功能描述
Secure P2P communication for AI agents. Noise XX handshake, XChaCha20-Poly1305 encryption, connection consent, human verification. Zero central servers.
使用说明 (SKILL.md)

Clawdio

Minimal secure peer-to-peer communication for AI agents. Two agents exchange a connection string, perform a Noise XX handshake, then communicate over encrypted channels. No central server required.

When to Use

  • Agent-to-agent communication across machines or networks
  • Secure task delegation between sub-agents on different hosts
  • Any scenario requiring encrypted, authenticated P2P messaging

Setup

The Clawdio project lives at projects/clawdio/. Install dependencies and build:

cd projects/clawdio && npm install && npx tsc

Quick Start

const { Clawdio } = require('./projects/clawdio/dist/index.js');

// Create two nodes
const alice = await Clawdio.create({ port: 9090, autoAccept: true });
const bob = await Clawdio.create({ port: 9091, autoAccept: true });

// Connect (Noise XX handshake)
const aliceId = await bob.exchangeKeys(alice.getConnectionString());

// Send messages
await bob.send(aliceId, { task: "What's the weather?" });
alice.onMessage((msg, from) => console.log(msg.task));

Connection Consent (Recommended)

By default, unknown inbound peers require explicit consent:

const node = await Clawdio.create({ port: 9090 }); // autoAccept defaults to false

node.on('connectionRequest', (req) => {
  console.log(`Connection from ${req.id}`);
  console.log(`Fingerprint: ${req.fingerprint}`);
  // Accept or reject
  node.acceptPeer(req.id);  // or node.rejectPeer(req.id)
});

Outbound connections (you calling exchangeKeys) are auto-accepted. Already-trusted peers auto-reconnect.

Human Verification

For high-trust scenarios, verify peers in person:

node.setOwner('Alice');
const code = node.getVerificationCode(peerId); // "torch lemon onyx prism jade index"
// Both humans compare codes in person, then:
node.verifyPeer(peerId); // trust: 'accepted' → 'human-verified'
node.getPeerTrust(peerId); // 'human-verified'

Trust Levels

  • pending — connection request received, not yet accepted
  • accepted — peer accepted, encrypted communication active
  • human-verified — verified via in-person code exchange

Persistent Identity

Pass identityPath to persist keys and trusted peers across restarts:

const node = await Clawdio.create({
  port: 9090,
  identityPath: '.clawdio-identity.json'
});

Sub-Agent Pattern

Spawn a sub-agent to handle Clawdio communication:

1. Main agent spawns sub-agent with task
2. Sub-agent creates Clawdio node, connects to remote peer
3. Sub-agent exchanges messages, collects results
4. Sub-agent reports back to main agent

Security Properties

  • Forward secrecy (ephemeral X25519 keys)
  • Mutual authentication (Noise XX)
  • Replay protection (monotonic counters)
  • XChaCha20-Poly1305 AEAD encryption
  • Connection consent for inbound peers

API Reference

Method Description
Clawdio.create(opts) Create and start a node
node.exchangeKeys(connStr) Connect to peer
node.send(peerId, msg) Send encrypted message
node.onMessage(handler) Listen for messages
node.acceptPeer(id) Accept pending connection
node.rejectPeer(id) Reject pending connection
node.setOwner(name) Set human owner name
node.getVerificationCode(id) Get 6-word verification code
node.verifyPeer(id) Mark peer as human-verified
node.getPeerTrust(id) Get trust level
node.getFingerprint(id) Emoji fingerprint
node.getPeerStatus(id) alive/stale/down
node.stop() Shutdown
安全使用建议
This skill appears to implement P2P encrypted messaging, but review before installing: 1) Confirm file layout and build steps (SKILL.md references 'projects/clawdio/' but code is at repo root). 2) Inspect package.json dependencies to ensure no malicious npm packages will be pulled. 3) Run the code in a sandbox or isolated environment first, since it opens network ports, writes identity files, and may spawn subprocesses. 4) Avoid enabling 'autoAccept' in production; require human consent and verification. 5) If you do not want the model to start network listeners autonomously, set disableModelInvocation:true or restrict the skill to user-invocation only. If possible, request the author to fix the path mismatch and provide an explicit install spec and a security review of the crypto usage.
功能分析
Type: OpenClaw Skill Name: jameseball-clawdio Version: 1.0.0 The skill implements a secure P2P communication protocol using strong cryptography (Noise XX handshake, XChaCha20-Poly1305). It utilizes network access (WebSockets) and file system access (`fs.readFileSync`, `fs.writeFileSync`) for its core functionality, specifically for persistent identity management (storing its own public/secret keys and trusted peers in a `.clawdio-identity.json` file). All high-risk capabilities are directly aligned with the stated purpose of a P2P communication agent with persistent identity. The `SKILL.md` documentation is purely instructional and descriptive, showing no signs of prompt injection attempts or instructions for malicious actions. Dependencies listed in `package.json` are standard and appropriate for the functionality.
能力评估
Purpose & Capability
The code files (crypto, transport, protocol, CLI, index) align with the described P2P encrypted messaging purpose. However SKILL.md instructs building from 'projects/clawdio/' which does not match the manifest (source files are at repository root), an incoherence that could break install/run instructions or be a sign of sloppy packaging.
Instruction Scope
Runtime instructions tell operators/agents to run 'npm install' and 'npx tsc', start listeners on arbitrary ports, persist identities to disk (identityPath), and use a 'sub-agent' pattern (spawn processes). The doc also exposes an 'autoAccept' mode which accepts inbound peers automatically — this expands attack surface. These behaviors go beyond simple API calls and allow network listeners, disk writes, and process spawning, so they need explicit user consent and sandboxing.
Install Mechanism
There is no formal install spec, but SKILL.md instructs running 'npm install' which will fetch runtime dependencies from the public registry. The package.json is present in the bundle but its dependency list wasn't provided in the metadata. Running npm install at runtime can pull arbitrary packages; the mismatch in the expected path ('projects/clawdio/') vs actual layout increases risk of accidental execution of unexpected code.
Credentials
The skill requests no environment variables or credentials, which is coherent for a P2P library. However it implicitly requires network access (opening ports), filesystem access to persist identity/peer data, and the ability to spawn processes for the sub-agent pattern. These capabilities are not declared in requires.* fields and should be considered sensitive in many environments.
Persistence & Privilege
The skill is not configured with always:true, but disableModelInvocation is not set, so the model may be allowed to invoke the skill autonomously. Given the skill can start listeners and persist keys, allowing autonomous invocation without explicit user controls increases risk; consider requiring explicit user invocation or disabling model invocation for network-listening skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install jameseball-clawdio
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /jameseball-clawdio 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Noise XX handshake, P2P encrypted agent comms, connection consent, human verification, heartbeat liveness
元数据
Slug jameseball-clawdio
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Clawdio 是什么?

Secure P2P communication for AI agents. Noise XX handshake, XChaCha20-Poly1305 encryption, connection consent, human verification. Zero central servers. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 970 次。

如何安装 Clawdio?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install jameseball-clawdio」即可一键安装,无需额外配置。

Clawdio 是免费的吗?

是的,Clawdio 完全免费(开源免费),可自由下载、安装和使用。

Clawdio 支持哪些平台?

Clawdio 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Clawdio?

由 JamesEBall(@jameseball)开发并维护,当前版本 v1.0.0。

💬 留言讨论