skills/openclaw-inter-instance/SKILL.md
OpenClaw 实例间通信。当需要在多个 OpenClaw 实例之间传递消息、同步数据、远程执行命令时使用此技能。覆盖 agent-to-agent 消息、nodes.run 远程执行、文件级通信等多种方式。
npx skillsauth add aaaaqwq/agi-super-team openclaw-inter-instanceInstall 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.
按可靠性和实时性排序,依次尝试:
直接 agent-to-agent 消息,实时双向。
前提: 双方配置中开启:
// ~/.openclaw/openclaw.json
"tools": { "agentToAgent": { "enabled": true } }
用法:
sessions_send(sessionKey="agent:<target-agent>:main", message="...")
优点: 实时、双向、最简洁 缺点: 默认禁用,需要两端都开启
通过已配对的 node 在远程机器上执行命令。
前提: 目标机器已配对为 node 且在线(nodes status 检查)
用法:
nodes(action="run", node="<node-name>", command=["bash", "-c", "<command>"], commandTimeoutMs=30000)
注意事项:
env -u HTTP_PROXY -u HTTPS_PROXY 绕过不通的代理commandTimeoutMs典型场景:
# 检查文件是否存在
nodes run: ["bash", "-c", "ls ~/target-dir 2>/dev/null && echo EXISTS || echo NOT_FOUND"]
# clone 仓库(注意代理问题)
nodes run: ["bash", "-c", "env -u HTTP_PROXY -u HTTPS_PROXY git clone https://github.com/user/repo.git ~/repo 2>&1"]
# 创建软链接
nodes run: ["bash", "-c", "ln -sfn /source/path /target/path && readlink /target/path"]
在远程 node 上通过 CLI 向目标实例注入消息。
用法:
openclaw agent --session-id <session-id> -m '<message>' --json
注意: 需要等 gateway 处理 agent turn,容易超时(60-120s)。适合非紧急通知。
直接写入目标实例的 memory 文件,等待 heartbeat 读取。
用法:
# 通过 nodes.run 写入远程 memory 文件
cat >> <workspace>/memory/YYYY-MM-DD.md << 'EOF'
## 来自小a的通知 (HH:MM)
<消息内容>
EOF
优点: 一定能送达,不依赖实时连接 缺点: 非实时,需要等 heartbeat 或新 session 才能读到
通过 message 工具发送。
限制: Telegram bot 之间不能互发消息(403 Forbidden)。仅适用于 bot → 人类 的场景。
| 方式 | 原因 | |------|------| | Telegram bot → bot | Telegram API 禁止 | | curl 调远程 gateway REST API | gateway 不暴露 REST 消息接口 | | sessions_send 未开启 agentToAgent | 返回 forbidden |
nodes status — 目标 node 是否在线?小a (Linux VPS) 小m (Mac-Mini)
├── OpenClaw gateway ├── OpenClaw gateway
├── ~/AGI-Super-Skills (git repo) ├── ~/AGI-Super-Skills (git clone)
├── ~/clawd/skills/ (workspace) ├── ~/.openclaw/workspace/skills → ~/AGI-Super-Skills/skills
│ │
├── nodes.run ──────────────────── ├── paired node (connected)
└── sessions_send ─────────────── └── agent-to-agent (需开启)
你是高管,不是传话筒。
sessions_send 不带 timeoutSeconds(或设为 1-5s),发完指令立刻做下一件事❌ 错误模式(秘书):
派活 → 等回复 → 转发回复 → 再派下一个
✅ 正确模式(高管):
批量派活(不等) → 做其他事 → 看群里汇报 → 审核质量
sessions_send(
sessionKey="agent:<agentId>:telegram:group:-1003890797239",
message="【小a工作指令】<具体任务>。直接在群里发结果,不要回复我。",
timeoutSeconds=5 // 最多等5秒,超时也没关系,后台会继续
)
| 方式 | 作用 | 正确用途 |
|------|------|----------|
| message(accountId=xxx, target=群ID) | 以该 bot 身份发消息 | 公告、通知、以员工名义发固定文本 |
| sessions_send(sessionKey=..., message=...) | 给 agent 发指令,agent 自行处理并回复 | 分配任务、触发 agent 行为 |
agent:<agentId>:telegram:group:<chatId>
sessions_send 默认 delivery: "announce" 会把 agent 回复回显到调用者的会话,导致主 bot 在群里重复发 agent 的回复。agent 自己已经通过 message tool 发了消息,所以回显是多余的。
解决: agent 本身发消息到群,主 bot 不需要再转发。看到 agent 的 status=ok/timeout 就够了。
| 员工 | agentId | accountId | 模型 | |------|---------|-----------|------| | 小ops | ops | xiaoops | xsc-opus46 | | 小code | code | xiaocode | xsc-opus46 | | 小quant | quant | xiaoq | xsc-opus46 | | 小content | content | xiaocontent | glm5 | | 小data | data | xiaodata | glm5 | | 小finance | finance | xiaofinance | glm5 | | 小research | research | xiaoresearch | glm5 | | 小market | market | xiaomarket | glm5 | | 小pm | pm | xiaopm | glm5 |
注意:quant 的 accountId 是 xiaoq(不是 xiaoquant)。
GLM-5 有内置 "Kiro" 人设,会覆盖 SOUL.md 身份。解决方案:在 AGENTS.md 顶部加 CRITICAL IDENTITY 强制声明。
for agent_id in ["ops", "code", "quant", "content", "data", "finance", "research", "market", "pm"]:
sessions_send(
sessionKey=f"agent:{agent_id}:telegram:group:-1003890797239",
message="你的任务指令"
)
development
Technology-agnostic prompt generator that creates customizable AI prompts for scanning codebases and identifying high-quality code exemplars. Supports multiple programming languages (.NET, Java, JavaScript, TypeScript, React, Angular, Python) with configurable analysis depth, categorization methods, and documentation formats to establish coding standards and maintain consistency across development teams.
tools
Expert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analyzing network traffic, and profiling performance.
data-ai
Prompt for creating detailed feature implementation plans, following Epoch monorepo structure.
tools
Interactive prompt refinement workflow: interrogates scope, deliverables, constraints; copies final markdown to clipboard; never writes code. Requires the Joyride extension.