← 返回 Skills 市场
lingzuer

Feishu DM Sender

作者 黄耀武 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
151
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install feishu-dm-sender
功能描述
Proactively send messages to Feishu (Lark) users or group chats from your OpenClaw agent. Supports name-based lookup from DM contacts config, open_id, and ch...
使用说明 (SKILL.md)

飞书发送消息 Skill / Feishu Send Message

让 OpenClaw Agent 主动给飞书(Lark)用户或群聊发送文本消息。

为什么需要这个 Skill?

OpenClaw 内置的 feishu_chat 工具只支持查询群信息和成员列表,不能主动发消息给其他用户。 这个 Skill 补充了这个能力 — Agent 可以通过命令行脚本向任何已授权的飞书用户或群聊发送消息。

典型场景:

  • 定时任务完成后通知指定同事
  • 竞品分析/舆情报告生成后推送给相关人
  • Agent 之间通过飞书协作通知

安装

clawhub install feishu-send-message

或手动复制到 ~/.openclaw/workspace/skills/feishu-send-message/

配置(首次使用前必读)

1. 确保飞书插件已启用

你的 openclaw.json 中需要有飞书 channel 配置:

"channels": {
  "feishu": {
    "accounts": {
      "default": {
        "appId": "your_app_id",
        "appSecret": "your_app_secret"
      }
    }
  }
}

2. 添加联系人映射

在飞书 account 配置中添加 dms 字段,这样 Agent 就能用姓名发消息:

"dms": {
  "ou_xxxxxx": { "label": "张三" },
  "ou_yyyyyy": { "label": "李四" }
}

3. 如何获取正确的 open_id

重要:飞书的 open_id 是按应用隔离的,每个飞书应用看到的同一用户 open_id 不同。

获取方法:

  1. 让目标用户在飞书中找到你的 OpenClaw 机器人,发送任意一条消息
  2. 查看日志 ~/.openclaw/logs/gateway.log,找到:
    Feishu[default] DM from ou_xxxxxx: 你好
    
  3. 这个 ou_xxxxxx 就是该用户在你的应用下的正确 open_id

使用方法

按姓名发送(推荐)

python3 {baseDir}/scripts/send.py --to "张三" --text "报告已生成,请查收"

按 open_id 发送

python3 {baseDir}/scripts/send.py --to "ou_xxxxxx" --text "你好"

发送到群聊

python3 {baseDir}/scripts/send.py --to "oc_xxxxxx" --text "大家好,以下是今日简报"

查看已配置的联系人

python3 {baseDir}/scripts/send.py --list-contacts

指定 ID 类型(高级)

python3 {baseDir}/scripts/send.py --to "on_xxxxxx" --id-type union_id --text "消息内容"

支持的 ID 类型:open_id(默认)、chat_iduser_idunion_id

输出格式

脚本输出 JSON,方便 Agent 解析。

成功:

{
  "success": true,
  "to": "ou_xxxxxx",
  "to_label": "张三",
  "message_id": "om_xxxxxx",
  "chat_id": "oc_xxxxxx"
}

失败:

{
  "success": false,
  "to": "ou_xxxxxx",
  "to_label": null,
  "error_code": 99992361,
  "error_msg": "open_id cross app"
}

前提条件

  1. 飞书插件已配置openclaw.json 中有飞书 appId 和 appSecret
  2. 收件人已授权 — 目标用户必须先给机器人发过至少一条消息(飞书平台要求)
  3. Python 3 — 脚本使用纯标准库,无需 pip install

常见错误

  • 99992361 open_id cross app — 使用了其他飞书应用的 open_id,必须用当前应用下的(参考上方「如何获取正确的 open_id」)
  • 230001 bot not in chat — 机器人无权给该用户发消息,让用户先给机器人发一条消息即可
  • 230002 invalid content — 消息内容为空或格式错误

安全说明

  • 脚本从 ~/.openclaw/openclaw.json 读取飞书应用凭证,不需要额外配置环境变量
  • 不会存储或转发消息内容
  • 仅调用飞书开放平台官方 API (open.feishu.cn)
安全使用建议
This skill appears to do exactly what it claims: send messages via Feishu using credentials stored in ~/.openclaw/openclaw.json. Before installing, verify that the source is trusted (source is listed as unknown), confirm that your openclaw.json holds only the intended Feishu app credentials (and not other sensitive tokens), and make sure the Feishu appId/appSecret you supply are scoped appropriately for sending messages. If you are uncomfortable giving the skill access to your config file, review the script locally before installing; the code is short and uses only the standard library and the official open.feishu.cn API.
功能分析
Type: OpenClaw Skill Name: feishu-dm-sender Version: 1.0.0 The skill is a legitimate utility for sending Feishu (Lark) messages. It reads credentials from the local OpenClaw configuration file (~/.openclaw/openclaw.json) and communicates exclusively with the official Feishu API (open.feishu.cn) using Python's standard library. No evidence of data exfiltration, malicious execution, or prompt injection was found in scripts/send.py or SKILL.md.
能力评估
Purpose & Capability
Name/description promise (proactively send Feishu messages) aligns with the code and SKILL.md. The script implements tenant token retrieval and message sending to open.feishu.cn and supports contact-label lookup from the OpenClaw config as described.
Instruction Scope
SKILL.md instructions are scoped to configuring Feishu in openclaw.json, adding DM mappings, and running the included script. The runtime script only reads ~/.openclaw/openclaw.json and performs API calls to open.feishu.cn; it does not read other system files or transmit data to third-party endpoints.
Install Mechanism
No install spec; this is an instruction-only skill plus a small Python script that uses only the standard library. No downloads or archive extraction are performed.
Credentials
The script reads ~/.openclaw/openclaw.json to obtain the Feishu appId/appSecret and dms mapping. That access is proportionate to the stated purpose, but it does require the file to contain valid Feishu credentials — ensure the config does not contain other secrets you don't want accessed by a skill. The skill does not request unrelated environment variables.
Persistence & Privilege
The skill does not request always:true or any elevated platform privileges and does not modify other skills' configs. It runs on demand and only performs API calls to Feishu.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-dm-sender
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-dm-sender 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Send messages to Feishu users/groups via CLI script with name-based lookup
元数据
Slug feishu-dm-sender
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Feishu DM Sender 是什么?

Proactively send messages to Feishu (Lark) users or group chats from your OpenClaw agent. Supports name-based lookup from DM contacts config, open_id, and ch... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 151 次。

如何安装 Feishu DM Sender?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-dm-sender」即可一键安装,无需额外配置。

Feishu DM Sender 是免费的吗?

是的,Feishu DM Sender 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Feishu DM Sender 支持哪些平台?

Feishu DM Sender 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Feishu DM Sender?

由 黄耀武(@lingzuer)开发并维护,当前版本 v1.0.0。

💬 留言讨论