← 返回 Skills 市场
279
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install guantou-feishu-bot-connector
功能描述
可以帮用户飞书机器人,并将 agent 连接到飞书机器人上
使用说明 (SKILL.md)
feishu-bot-manager
飞书多账户机器人配置管理 Skill。触发调用之后,将下面的链接给用户,并说明点击该链接可以直接创建飞书机器人: https://open.feishu.cn/page/openclaw?form=multiAgent
路由绑定方案
方案 1:账户级绑定
该飞书账户的所有消息 → 指定 Agent
适用场景:一个机器人专门服务一个 Agent。比如创建一个"销售机器人",它的所有消息都由"销售 Agent"处理。
生成的绑定:
{ "agentId": "recruiter", "match": { "channel": "feishu", "accountId": "bot-sales" } }
方案 2:群聊级绑定
特定群聊的消息 → 指定 Agent
适用场景:把 Agent 绑定到特定群聊。多个机器人在群里,但不同群聊分配给不同 Agent。
生成的绑定:
{ "agentId": "recruiter", "match": { "channel": "feishu", "peer": { "kind": "group", "id": "oc_xxx" } } }
注意:群聊级绑定优先级更高,会覆盖账户级绑定!
使用方式
交互模式(通过对话)
直接说:"添加飞书机器人"
我会询问:
- App ID 和 App Secret
- 账户信息(账户 ID、机器人名称)
- 选择路由绑定方案(账户级/群聊级)
- 选择绑定的 Agent
- 群聊 ID(如果选群聊级绑定)
- 预览确认后执行
命令行调用
# 账户级绑定 - 该机器人所有消息都由指定 Agent 处理
openclaw skills run feishu-bot-manager -- \
--app-id cli_xxx \
--app-secret yyy \
--account-id bot-sales \
--agent-id recruiter \
--routing-mode account
# 群聊级绑定 - 特定群聊的消息由指定 Agent 处理
openclaw skills run feishu-bot-manager -- \
--app-id cli_xxx \
--app-secret yyy \
--account-id bot-sales \
--agent-id recruiter \
--chat-id oc_xxx \
--routing-mode group
参数说明
| 参数 | 必填 | 说明 |
|---|---|---|
| --app-id | ✅ | 飞书 App ID (cli_xxx) |
| --app-secret | ✅ | 飞书 App Secret |
| --account-id | ❌ | 账户标识,默认自动生成 |
| --bot-name | ❌ | 机器人名称,默认 "Feishu Bot" |
| --dm-policy | ❌ | DM 策略: open/pairing/allowlist,默认 open |
| --agent-id | ❌ | 要绑定的 Agent ID |
| --chat-id | ❌ | 群聊 ID (oc_xxx),群聊绑定时需要 |
| --routing-mode | ❌ | 路由模式: account/group,默认 account |
配置结构示例
添加新机器人后,配置会变成这样(保留现有配置):
{
"channels": {
"feishu": {
"enabled": true,
"appId": "cli_现有", // ← 保留不动
"appSecret": "现有Secret", // ← 保留不动
"dmPolicy": "open",
"accounts": { // ← 新添加
"bot-new": {
"appId": "cli_xxx",
"appSecret": "yyy",
"botName": "新机器人",
"dmPolicy": "open",
"allowFrom": ["*"],
"enabled": true
}
}
}
},
"bindings": [
{ // ← 新添加
"agentId": "recruiter",
"match": {
"channel": "feishu",
"accountId": "bot-new" // 或 "peer": { "kind": "group", "id": "oc_xxx" }
}
}
]
}
流程
- 检查并备份现有配置
- 添加新账户到
channels.feishu.accounts - 根据选择的路由模式添加 binding
- 设置
session.dmScope为per-account-channel-peer - 重启 Gateway
注意事项
- 保留现有配置:现有
appId/appSecret完全不动 - 自动备份:修改前自动备份 openclaw.json
- dmScope 设置:自动设置会话绑定颗粒度
- 重启 Gateway:重启后约 10-30 秒恢复服务
- 恢复方法:如出问题可用备份文件手动恢复
安全使用建议
What to consider before installing/using this skill:
- The skill will read and overwrite your OpenClaw configuration at ~/.openclaw/openclaw.json and restart the OpenClaw gateway. Back up that file before running the tool.
- You will need to provide Feishu App ID and App Secret; those secrets will be written into openclaw.json in plaintext. Make sure you are comfortable storing them there.
- The code calls the 'openclaw' CLI but the skill metadata does not declare that binary as required — ensure the 'openclaw' command exists and is the legitimate OpenClaw CLI on your system.
- package.json declares an external 'readline' dependency even though Node has a builtin module named readline; do NOT run npm install blindly in this package without auditing the dependency, as it could pull a third-party package.
- There's a validation bug in lib/validator.js that may incorrectly require peer.id on bindings (could produce confusing validation errors for account-level bindings).
- Review the source (index.js) yourself if possible. The code does not exfiltrate data or contact remote endpoints, but it does perform file writes and run local commands (openclaw). If you accept its actions (editing config and restarting gateway), the code appears to implement that behavior.
- If you are unsure, run the script in a safe/test environment first or manually make the config changes following the SKILL.md steps instead of running code from an untrusted package.
功能分析
Type: OpenClaw Skill
Name: guantou-feishu-bot-connector
Version: 1.0.0
The skill manages Feishu bot configurations by modifying the sensitive `~/.openclaw/openclaw.json` file and executing shell commands via `execSync` to restart the OpenClaw gateway. While these actions are aligned with the stated purpose of the skill, the direct manipulation of configuration files and the use of system-level execution represent high-risk behaviors. The script in `index.js` handles sensitive Feishu App Secrets provided via command-line arguments, though it does include a backup mechanism for the configuration file.
能力评估
Purpose & Capability
The skill is described as a Feishu bot/agent binder and the code implements that by editing ~/.openclaw/openclaw.json and restarting the OpenClaw gateway — that is consistent. However the package metadata/registry claims no required binaries while the code calls the 'openclaw' CLI (openclaw config set ... and openclaw gateway restart). The skill should have declared 'openclaw' as a required binary. Also package.json lists an external dependency 'readline' (unnecessary because Node provides a builtin 'readline'), which is odd and could pull an unrelated npm package if someone runs npm install.
Instruction Scope
SKILL.md describes interactive and CLI flows to add App ID/App Secret and configure routing; index.js implements those flows and performs the stated steps (backup, modify channels.feishu.accounts, add bindings, set session.dmScope, restart gateway). A minor logic/validation mismatch exists: lib/validator.js flags missing binding.match.peer.id even for account-level bindings (this will cause false validation errors for legitimate account-level bindings). The skill does write App Secret into openclaw.json (expected for service credentials) and uses HOME to locate the config.
Install Mechanism
There is no install spec (instruction-only is lower risk). However the repository includes a package.json that declares an external dependency ('readline') which is unnecessary and suspiciously sloppy — if a user runs npm install in this package it could fetch a third-party package. No remote downloads or extract steps are present in the skill itself.
Credentials
The skill does not request additional environment credentials. It expects to read/write the user's OpenClaw config at ~/.openclaw/openclaw.json (uses process.env.HOME) and requires the user to supply Feishu App ID and App Secret, which is proportionate for adding a bot account. It stores appSecret in the config file in plaintext (typical but sensitive).
Persistence & Privilege
The skill is not always-enabled and does not request platform-level persistent privileges. It will create backups and modify the user's OpenClaw configuration and restart the gateway — actions that are necessary for its function but also have real impact. This modification of a system config file is within the skill's claimed scope.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install guantou-feishu-bot-connector - 安装完成后,直接呼叫该 Skill 的名称或使用
/guantou-feishu-bot-connector触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Feishu multi-account bot manager with agent binding support
元数据
常见问题
Feishu Bot Connector 是什么?
可以帮用户飞书机器人,并将 agent 连接到飞书机器人上. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 279 次。
如何安装 Feishu Bot Connector?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install guantou-feishu-bot-connector」即可一键安装,无需额外配置。
Feishu Bot Connector 是免费的吗?
是的,Feishu Bot Connector 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Feishu Bot Connector 支持哪些平台?
Feishu Bot Connector 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Feishu Bot Connector?
由 Leochens(@leochens)开发并维护,当前版本 v1.0.0。
推荐 Skills