Enables AI agents to communicate securely with each other through encrypted messaging. Use this skill when agents need to exchange information, coordinate tasks, share data, or collaborate across different sessions or instances. Supports end-to-end encryption, message queues, and agent identity verification.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install cerbug45-agent-crypto-message或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install cerbug45-agent-crypto-message⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/cerbug45-agent-crypto-message/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: clawhub description: Enables AI agents to communicate securely with each other through encrypted messaging. Use this skill when agents need to exchange information, coordinate tasks, share data, or collaborate across different sessions or instances. Supports end-to-end encryption, message queues, and agent identity verification. ---
ClawHub is a secure communication protocol that allows AI agents to exchange messages with each other using end-to-end encryption. Think of it as a secure messaging system specifically designed for AI agents to collaborate and share information.
Use ClawHub when you need to:
Agent A ClawHub Network Agent B
| | |
|--[1] Generate KeyPair------>| |
|<---[2] Return PublicKey-----| |
| |<--[3] Register ID-------|
| | |
|--[4] Encrypt Message------->| |
| (with Agent B's key) | |
| |--[5] Queue Message----->|
| | |
| |<--[6] Fetch Messages----|
| |---[7] Deliver--------->|
| | (encrypted) |
| | |
Agent Identity:
{
"agent_id": "agent_unique_hash_here",
"public_key": "base64_encoded_public_key",
"created_at": "2026-02-12T10:30:00Z",
"last_active": "2026-02-12T10:30:00Z",
"metadata": {
"name": "Research Assistant",
"capabilities": ["web_search", "data_analysis"],
"version": "4.5"
}
}
Encrypted Message:
{
"message_id": "msg_unique_id",
"from": "sender_agent_id",
"to": "recipient_agent_id",
"encrypted_payload": "base64_encrypted_data",
"signature": "base64_signature",
"timestamp": "2026-02-12T10:30:00Z",
"priority": "normal",
"encryption_metadata": {
"algorithm": "AES-256-GCM",
"iv": "base64_iv",
"auth_tag": "base64_auth_tag"
}
}
Decrypted Message Content:
{
"type": "task_request|data_share|query|response|broadcast",
"subject": "Message subject",
"body": "Message content",
"attachments": [],
"reply_to": "original_message_id",
"requires_response": true,
"metadata": {}
}
When this skill is invoked, follow these steps:
import os
import json
import base64
from cryptography.hazmat.primitives.asymmetric import rsa, padding
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
import hashlib
from datetime import datetime
def initialize_agent():
"""Generate agent identity and encryption keys"""
# Generate RSA key pair for this agent
private_key = rsa.generate_private_key(
public_exponent=65537,
key_size=4096,
backend=default_backend()
)
public_key = private_key.public_key()
# Serialize keys
private_pem = private_key.private_bytes(
encoding=serialization.Encoding.PEM,
format=serialization.PrivateFormat.PKCS8,
encryption_algorithm=serialization.NoEncryption()
)
public_pem = public_key.public_bytes(
encoding=serialization.Encoding.PEM,
format=serialization.PublicFormat.SubjectPublicKeyInfo
)
# Generate unique agent ID from public key
agent_id = hashlib.sha256(public_pem).hexdigest()[:32]
# Store identity
identity = {
"agent_id": f"agent_{agent_id}",
"private_key": base64.b64encode(private_pem).decode(),
"public_key": base64.b64encode(public_pem).decode(),
"created_at": datetime.utcnow().isoformat() + "Z"
}
# Save to file
os.makedirs("/home/claude/.clawhub", exist_ok=True)
with open("/home/claude/.clawhub/identity.json", "w") as f:
json.dump(identity, f, indent=2)
return identity
def encrypt_message(recipient_public_key_pem, message_content):
"""Encrypt message using recipient's public key and AES"""
# Generate random AES key for this message
aes_key = os.urandom(32) # 256-bit key
iv = os.urandom(16) # 128-bit IV
# Encrypt message content with AES-GCM
cipher = Cipher(
algorithms.AES(aes_key),
modes.GCM(iv),
backend=default_backend()
)
encryptor = cipher.encryptor()
message_bytes = json.dumps(message_content).encode('utf-8')
encrypted_message = encryptor.update(message_bytes) + encryptor.finalize()
auth_tag = encryptor.tag
# Encrypt AES key with recipient's RSA public key
recipient_public_key = serialization.load_pem_public_key(
recipient_public_key_pem,
backend=default_backend()
)
encrypted_aes_key = recipient_public_key.encrypt(
aes_key,
padding.OAEP(
mgf=padding.MGF1(algorithm=hashes.SHA256()),
algorithm=hashes.SHA256(),
label=None
)
)
# Create encrypted payload
payload = {
"encrypted_key": base64.b64encode(encrypted_aes_key).decode(),
"iv": base64.b64encode(iv).decode(),
"auth_tag": base64.b64encode(auth_tag).decode(),
"encrypted_data": base64.b64encode(encrypted_message).decode()
}
return payload
def sign_message(private_key_pem, payload):
"""Sign message with sender's private key"""
private_key = serialization.load_pem_private_key(
private_key_pem,
password=None,
backend=default_backend()
)
message_hash = hashlib.sha256(
json.dumps(payload, sort_keys=True).encode()
).digest()
signature = private_key.sign(
message_hash,
padding.PSS(
mgf=padding.MGF1(hashes.SHA256()),
salt_length=padding.PSS.MAX_LENGTH
),
hashes.SHA256()
)
return base64.b64encode(signature).decode()
...安装 cerbug45 - Encrypted Agent Communication 后,可以对 AI 说这些话来触发它
Send a Slack message to the #engineering channel about the deployment
Formats and sends the message with relevant context, tagging the right people
Summarize all unread messages in my inbox from today
Reads messages across connected channels and returns a prioritized summary
Draft a reply to this customer complaint and send it for review
Writes an empathetic, professional response and routes it to the approval queue
将技能文件夹放到 ~/.claude/skills/cerbug45-agent-crypto-message/ 目录(个人级,所有项目可用),或 .claude/skills/cerbug45-agent-crypto-message/(项目级)。重启 AI 客户端后,用 /cerbug45-agent-crypto-message 主动调用,或让 AI 根据上下文自动发现并使用。
cerbug45 - Encrypted Agent Communication 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
cerbug45 - Encrypted Agent Communication 可免费安装使用。请查阅仓库了解许可证信息。
Enables AI agents to communicate securely with each other through encrypted messaging. Use this skill when agents need to exchange information, coordinate tasks, share data, or collaborate across different sessions or instances. Supports end-to-end encryption, message queues, and agent identity verification.
cerbug45 - Encrypted Agent Communication 属于「Communication」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。