Install
openclaw skills install config-new-agent为 OpenClaw 新增的 agent 配置 bindings 并安装必要的 skills。当用户说"添加新 agent"、"配置新 agent binding"、或需要为 agent 分配群组时触发。工作流程:(1) 从 openclaw.json 读取 agent list,(2) 找出没有 binding 的 agent,(3) 向用户索要群组 peer id,(4) 生成 binding 配置让用户审核,(5) 用户确认后重启 gateway,(6) 为新 agent 安装 skill-vetter、skill-finder-cn、self-improving-proactive-agent、openclaw-tavily-search。
openclaw skills install config-new-agent每个 agent 必须只使用自己 workspace 中的 self-improving-proactive-agent,禁止访问其他 agent 的数据。
当新 agent 安装 self-improving-proactive-agent 时,必须同时在 SKILL.md 顶部添加以下引用块:
> **IMPORTANT - Workspace Isolation Rule**:
> Each agent must use the `self-improving-proactive-agent` skill in its **own workspace only**.
> All learning, corrections, memory, and state files must be stored in the agent's **own workspace directory**.
> **Never reference, read from, or write to another agent's self-improving-proactive-agent skill or data files.**
所有 skills 必须安装到新 agent 自己的 workspace,禁止安装到 /root/.openclaw/workspace。
安装命令使用 --workdir 指定目标 workspace:
clawhub install <slug> --workdir /root/.openclaw/workspace-<agentname>
读取 /root/.openclaw/openclaw.json,获取 agents.list 和 bindings 列表。
比较 agents.list 中的 agentId 和 bindings 中已配置的 agentId,列出尚未配置 binding 的 agent(排除 main agent)。
向用户报告:
以下 agent 尚未配置 binding:
- agentId1
- agentId2
询问用户需要为哪个 agent 配置 binding,并索要对应的飞书群 ID(格式:oc_xxx)。
根据用户提供的 agentId 和群组 ID,生成 binding 配置片段:
{
"agentId": "<agentId>",
"match": {
"channel": "feishu",
"peer": {
"kind": "group",
"id": "<群组ID>"
}
}
}
将配置加入 bindings 数组,展示完整修改内容让用户审核。
用户确认后,执行 openclaw gateway restart 重启 gateway 使配置生效。
Gateway 重启成功后,为新 agent 安装以下 skills。所有 skills 必须安装到新 agent 自己的 workspace 目录。
根据 agentId 确定 workspace 路径:/root/.openclaw/workspace-<agentId>/
重要规则:以后安装任何 skill 之前,都必须先使用 skill-vetter 审核,未经审核不得安装。
使用 clawhub 安装到新 agent 的 workspace:
clawhub install skill-vetter --workdir /root/.openclaw/workspace-<agentname>
使用 clawhub 安装到新 agent 的 workspace:
clawhub install skill-finder-cn --workdir /root/.openclaw/workspace-<agentname>
使用 clawhub 安装到新 agent 的 workspace:
clawhub install self-improving-proactive-agent --workdir /root/.openclaw/workspace-<agentname>
安装完成后,必须编辑新 agent workspace 中的 SKILL.md,在文件顶部添加 workspace 隔离规则引用块(见上文"self-improving-proactive-agent 使用隔离规则")。
同时配置该 skill 保持一直运行。
使用 clawhub 安装到新 agent 的 workspace:
clawhub install openclaw-tavily-search --workdir /root/.openclaw/workspace-<agentname>
Skill 执行结束后,向用户发送通知:"已配置好新的 agent"。