返回顶部
o

openclaw-agent-feishu-onboarding飞书代理创建

Create OpenClaw agents and onboard Feishu routing with explicit multi-step confirmations. Use when the user needs to (1) define a new agent role and workspace, (2) collect and confirm Feishu route fields including peer.id, (3) apply account/peer bindings, and (4) validate routing and rollback safely.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
118
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

openclaw-agent-feishu-onboarding

OpenClaw Agent Feishu 入职流程

标准化创建新的 OpenClaw Agent 及飞书路由绑定。
使用此技能进行需严格确认的操作执行。

运行时前置条件

  • - 必需二进制文件:
- openclaw(CLI 工具,需在 PATH 中) - python(3.x 版本,用于 scripts/validatefeishubindings.py 脚本)
  • - 预检检查:
- openclaw --version - python --version
  • - 数据访问行为:
- 读取本地 OpenClaw 配置(openclaw.json / OPENCLAWCONFIGPATH) - 可能写入本地 Agent 和路由状态(agents.list[]、bindings[]) - 禁止在未授权访问本地配置的机器上运行

核心范围

  • - 创建新 Agent(agents.list + 工作空间 + 身份标识)。
  • 在写入前确认飞书路由目标字段。
  • 使用带 channel/accountId/peer 的 bindings.match 绑定路由。
  • 验证最终路由并提供回滚步骤。

必需输入

  • - Agent 意图:
- Agent 用途和职责边界。 - 明确说明超出范围的事项。
  • - Agent 规格:
- agentId(小写字母、数字、连字符)。 - workspace 路径。 - model ID。 - agents.list[] 中的身份对象: - 使用 identity 对象(例如 identity.name、identity.emoji、identity.theme) - 不要仅依赖顶层 name 字段
  • - 飞书路由规格:
- match.channel:feishu - match.accountId:例如 main - match.peer.kind:group(或需要时使用 dm) - match.peer.id:飞书会话 ID(群组 ID 如 oc_xxx 或私聊 ID)

硬性验证门禁(必须通过)

  • - 新 Agent 的 agents.list[] 条目必须包含 identity 对象。
  • 必须设置 identity.name 以便人工可读的路由/调试检查。
  • match.accountId 必须是 channels.feishu.accounts 的键之一(例如 main)。
  • 切勿将飞书群组/会话 ID(ocxxx)填入 match.accountId。
  • 群组路由必须包含 match.peer = { kind: group, id: ocxxx }。
  • 如果路由针对特定群组但缺少 match.peer,则中止并在继续前修正配置。
  • 写入前,打印最终绑定对象并要求明确确认。

多步确认协议

不要跳过确认步骤。按以下顺序依次询问并确认。
  1. 1. 确认 A:Agent 目标
- 确认此 Agent 应执行的任务。 - 确认此 Agent 禁止执行的任务。
  1. 2. 确认 B:Agent 配置
- 确认 agentId、workspace、模型、身份字段。 - 确认命名规范和冲突检查(agentId 唯一性)。
  1. 3. 确认 C:飞书路由目标
- 确认 accountId。 - 确认 peer.kind。 - 确认 peer.id(明确说明这是飞书会话 ID)。 - 确认这是精确对等绑定还是账户级别回退。
  1. 4. 确认 D:执行批准
- 在一个紧凑块中汇总所有字段。 - 在写入配置前询问最终执行/不执行决定。

执行工作流

  1. 1. 发现当前状态:
- openclaw agents list - openclaw config get agents.list --json - openclaw config get channels.feishu.accounts --json - openclaw directory groups list --channel feishu --account --query --json - openclaw config get bindings --json
  1. 2. 创建 Agent:
- openclaw agents add ... - 可选:openclaw agents set-identity ...
  1. 3. 应用路由:
- 需要时使用 openclaw agents bind 进行账户范围绑定。 - 确保在顶层 bindings[] 中存在带 match.peer 的对等精确规则。
  1. 4. 验证:
- python -X utf8 ./scripts/validatefeishubindings.py --config - openclaw config validate --json - 确保目标 agents.list[] 条目包含 identity.name - 检查 bindings[] 条目内容和顺序。 - 确保每个针对群组的规则都有 match.peer.kind = group 和 match.peer.id = oc_xxx。
  1. 5. 根据部署策略需要重新加载/重启网关。

路由规则

  • - peer 规则是特定飞书会话的精确路由键。
  • 使用 match.peer.id 绑定特定会话(群组 ocxxx)。
  • 如果同时存在对等级别和账户级别绑定,将对等规则放在前面。
  • 在确认对等特定路由之前,避免使用宽泛的回退规则。
  • 错误示例(禁止):match.accountId: ocxxx 缺少 match.peer。

Agent 列表条目应遵循以下格式:

json
{
id: data-analyst,
workspace: C:\\Users\\Administrator\\.openclaw\\workspace-dataAnalysis,
agentDir: C:\\Users\\Administrator\\.openclaw\\agents\\data-analyst\\agent,
identity: {
name: data-analyst
}
}

规范的对等绑定对象:

json
{
agentId: ,
match: {
channel: feishu,
accountId: main,
peer: {
kind: group,
id: oc_xxx
}
}
}

安全与回滚

  • - 除非明确要求,否则切勿删除 Agent。
  • 在更改 bindings 之前,捕获当前 bindings 快照。
  • 如果应用了错误的路由,恢复到之前的绑定集并重新验证。
  • 优先使用可逆、明确的更改,并在更改后进行验证。

为何仍路由到 main

  • - 绑定未匹配实际传入的 peer.id(最常见原因)。
  • bindings[] 已写入但网关运行时未重新加载最新配置。
  • match.accountId 与当前飞书账户键不匹配。
  • 目标 Agent 存在但 agents.list[] 条目格式错误(缺少必需字段,如按约定应包含的 identity 对象)。
  • 消息到达的会话与配置的群组不同。

参考资料

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 openclaw-agent-feishu-onboarding-1776112269 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 openclaw-agent-feishu-onboarding-1776112269 技能

通过命令行安装

skillhub install openclaw-agent-feishu-onboarding-1776112269

下载

⬇ 下载 openclaw-agent-feishu-onboarding v1.0.1(免费)

文件大小: 9.33 KB | 发布时间: 2026-4-14 13:22

v1.0.1 最新 2026-4-14 13:22
- Added runtime prerequisites, including required binaries and preflight checks.
- Updated agent spec and validation requirements: `agents.list[]` must include an `identity` object with `identity.name` set.
- Expanded the execution workflow with additional discovery steps and explicit validation for agent configuration.
- Clarified routing rules and included a correct `agents.list[]` agent entry example.
- Added guidance on troubleshooting routing issues and reasons for fallback to the `main` route.
- Documentation improved for operational clarity and safer onboarding flow.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部