skill/SKILL.md
Interactive lab (TP interactif) demonstrating a minimal DIDComm-inspired protocol for decentralized agent-to-agent trust using did:key (Ed25519) and W3C Verifiable Credentials. The executing agent participates as Agent B (Analyzer) in a mutual trust handshake with a simulated Agent A (DataFetcher), then collaboratively produces a signed scientific artifact. Supports mock (offline), live (arXiv API), and attack (impersonation detection) modes.
npx skillsauth add airkyzzz/claw4s-2026 decentralized-agent-trust-protocolInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill implements and demonstrates a minimal protocol for two previously unknown AI agents to establish mutual cryptographic trust without any central authority or pre-shared secrets. It uses:
The executing agent doesn't just observe — it participates as Agent B (Analyzer) in the trust establishment, verifies Agent A's credentials, processes signed data, and produces its own signed output. This is an interactive lab, not a passive demo.
All current multi-agent frameworks (AutoGen, CrewAI, LangGraph) rely on a central orchestrator that trusts agents implicitly. This creates:
This protocol demonstrates that 2 round trips and <5ms of crypto overhead are sufficient to establish verifiable mutual trust between unknown agents.
Use this skill when:
Single dependency: the cryptography Python package (widely available, provides Ed25519).
pip3 install cryptography
No external services, no API keys, no network access required for mock mode.
Install the required dependency and verify the protocol script is available.
pip3 install cryptography
python3 -c "from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey; print('Ed25519 available: OK')"
This is the primary execution mode. It uses fixture data (5 curated arXiv paper records) and requires zero network access. This mode demonstrates the full protocol:
python3 skill/trust_protocol.py --mode mock
Expected output: Trust established, 2 round trips, <5ms overhead, all audit checks passing.
To get structured JSON output for programmatic analysis:
python3 skill/trust_protocol.py --mode mock --json
This mode runs the full protocol first, then simulates an impersonation attack: a fake agent claims Agent A's DID but signs with different keys. The protocol must detect and reject this.
python3 skill/trust_protocol.py --mode attack
Expected output: Same successful protocol run as mock, PLUS attack detection — the fake agent's signature fails verification against the claimed DID because the keys don't match. attack_detected: True.
This demonstrates that the did:key binding (DID ↔ public key) is cryptographically enforced — you cannot claim someone else's identity without their private key.
This mode replaces fixture data with real papers from the arXiv API. It requires network access.
python3 skill/trust_protocol.py --mode live
Expected output: Same protocol flow, but with real arXiv papers. The trust handshake and signing are identical — only the data source changes.
Run in quiet JSON mode and inspect the metrics:
python3 skill/trust_protocol.py --mode mock --quiet
Key metrics to verify:
| Metric | Expected Value | What It Proves |
|--------|---------------|----------------|
| trust_established | true | Mutual authentication succeeded |
| round_trips | 2 | Minimal protocol — one credential exchange each way |
| overhead_ms | < 5.0 | Negligible crypto cost (Ed25519 is fast) |
| audit_chain_valid | true | Every VC in the pipeline has a valid signature chain |
| pipeline_completed | true | Full scientific task completed end-to-end |
For attack mode, additionally:
| Metric | Expected Value | What It Proves |
|--------|---------------|----------------|
| attack_detected | true | Impersonation is cryptographically impossible |
The protocol produces 4 VCs in the audit chain:
Each VC contains:
@context: W3C Credentials contextissuer: The agent's did:keycredentialSubject: The payload (capabilities, data, analysis)proof: Ed25519 signature with verification method pointing to the issuer's DIDTo inspect individual VCs, run with --json and parse the output.
Round Trip 1: Agent A → Agent B
Message: AgentCapabilityCredential (signed VC)
Fields: agentName, agentType, capabilities, nonce
Signature: Ed25519 via did:key
Round Trip 2: Agent B → Agent A
Message: AgentCapabilityCredential (signed VC)
Fields: agentName, agentType, capabilities, nonce
Signature: Ed25519 via did:key
Data Exchange: Agent A → Agent B
Message: ArXivDatasetCredential (signed VC)
Fields: papers[], contentHash
Verification: signature + issuer DID match
Analysis: Agent B → Audit
Message: AnalysisReportCredential (signed VC)
Fields: analysis results, contentHash
Verification: signature + issuer DID match
| Property | How Achieved | |----------|-------------| | Authentication | Each agent proves identity by signing with its did:key private key | | Integrity | VC signatures cover the full credential payload (canonical JSON) | | Non-repudiation | Signed VCs provide cryptographic proof of who produced what | | Impersonation resistance | did:key binds DID to public key — forging requires the private key | | Replay resistance | Each VC contains a unique nonce and timestamp | | No central authority | did:key is self-resolving — no registry, no CA, no orchestrator |
| Attack | Detected? | How | |--------|-----------|-----| | Impersonation (wrong keys, claimed DID) | Yes | Signature verification fails against DID's public key | | Tampering (modify VC payload) | Yes | Signature becomes invalid | | Replay (reuse old VC) | Partially | Nonce + timestamp enable detection; full replay protection requires state | | Compromised agent (valid keys, bad data) | No | Out of scope — this protocol authenticates identity, not intent |
This protocol is not specific to arXiv or literature synthesis. The trust handshake works for any multi-agent pipeline:
The only requirements are: (1) each agent can generate an Ed25519 keypair, and (2) agents can exchange JSON messages.
skill/
├── SKILL.md # This file — executable skill instructions
├── trust_protocol.py # Complete protocol implementation (single file)
└── fixtures/
└── arxiv_papers.json # Mock data for offline execution
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.