← Back to Skills Marketplace
arvenwang

Feishu All In One

by ArvenWang · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
403
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install feishu-all-in-one
Description
飞书 All-in-One 技能包 - 开箱即用的飞书消息收发解决方案。 集成:文字消息、图片/文件发送、语音转文字、互动卡片、主动消息。 经过完整验证,所有功能均可直接使用。
README (SKILL.md)

飞书 All-in-One 技能包

📦 开箱即用 | 经过完整验证 | 2026-03-04

本技能包整合了飞书消息收发的所有核心能力,经过实际测试验证,确保能够正常工作。


功能一览

功能 状态 说明
文字消息收发 接收用户消息、主动推送文字
图片/文件发送 支持本地文件、网络图片
语音转文字 使用 faster-whisper
互动卡片 带按钮的交互卡片
卡片回调处理 点击按钮自动处理

第一部分:飞书开放平台配置

1.1 创建应用

  1. 打开 飞书开放平台
  2. 点击「创建应用」→「企业自建应用」
  3. 填写应用名称(如 OpenClaw Bot)
  4. 获取 App IDApp Secret

1.2 配置应用凭证

在应用详情页获取:

  • App ID: 如 cli_xxxxxxxx
  • App Secret: 如 xxxxxxxx

1.3 配置权限

进入「权限管理」,添加以下权限:

权限名称 权限码 说明
获取应用基本信息 app:app.base:readonly 读取应用基本信息
发送消息 im:message:send_as_bot 以机器人身份发送消息
接收消息 im:message:receive 接收用户消息
上传图片和文件 im:file:upload 上传图片/文件
下载图片和文件 im:file:download 下载图片/文件
获取用户信息 contact:user.base:readonly 读取用户基本信息

1.4 配置事件与回调(关键!)

  1. 进入「事件与回调」
  2. 订阅方式:选择「使用长连接接收事件/回调」
  3. 订阅事件
事件名称 事件码 说明
接收消息 im.message.receive_v1 接收用户发送的消息
卡片动作触发 im.card.action.trigger 互动卡片按钮点击
  1. 接收地址:使用长连接模式无需配置公网地址

1.5 发布应用

  1. 在「版本管理与发布」中创建版本
  2. 提交审核
  3. 发布后,用户即可与机器人对话

第二部分:OpenClaw 配置

2.1 配置 openclaw.json

编辑 ~/.openclaw/openclaw.json,添加飞书配置:

{
  "channels": {
    "feishu": {
      "enabled": true,
      "appId": "你的App_ID",
      "appSecret": "你的App_Secret",
      "domain": "feishu"
    }
  }
}

2.2 配置 accounts(互动卡片必需)

{
  "channels": {
    "feishu": {
      "enabled": true,
      "appId": "cli_xxxxxxxx",
      "appSecret": "xxxxxxxx",
      "domain": "feishu",
      "accounts": {
        "main": {
          "appId": "cli_xxxxxxxx",
          "appSecret": "xxxxxxxx"
        }
      }
    }
  }
}

2.3 环境变量

在运行回调服务器前需要设置:

export FEISHU_APP_ID="cli_xxxxxxxx"
export FEISHU_APP_SECRET="xxxxxxxx"

第三部分:技能使用

3.1 文字消息

使用 OpenClaw 内置的 message 工具:

// 发送文字消息
await message({
  action: "send",
  channel: "feishu",
  message: "你好,这是主动推送的消息",
  target: "ou_xxxxxxxx"  // 用户 open_id
});

3.2 发送图片/文件

// 发送本地图片
await message({
  action: "send",
  channel: "feishu",
  message: "这是一张图片",
  filePath: "/path/to/image.png",
  target: "ou_xxxxxxxx"
});

// 发送网络图片
await message({
  action: "send",
  channel: "feishu",
  message: "网络图片",
  media: "https://example.com/image.png",
  target: "ou_xxxxxxxx"
});

3.3 发送互动卡片

运行修改后的脚本:

# 进入脚本目录
cd /path/to/skills/feishu-all-in-one/scripts

# 发送确认卡片(发给个人用户)
node send-card.js confirmation "消息内容" \
  --chat-id ou_xxxxxxxx \
  --receive-id-type open_id

# 发送投票卡片
node send-card.js poll "你喜欢哪个?" \
  --options "A,B,C" \
  --chat-id ou_xxxxxxxx \
  --receive-id-type open_id

# 发送自定义卡片
node send-card.js custom \
  --template examples/custom-card.json \
  --chat-id ou_xxxxxxxx \
  --receive-id-type open_id

关键参数

  • --chat-id: 目标用户/群聊 ID
  • --receive-id-type:
    • open_id - 发给个人用户
    • chat_id - 发给群聊
    • user_id - 飞书用户 ID

3.4 启动卡片回调服务器

cd /path/to/feishu-all-in-one/scripts

# 安装依赖(只需一次)
npm install

# 设置环境变量
export FEISHU_APP_ID="cli_xxxxxxxx"
export FEISHU_APP_SECRET="xxxxxxxx"

# 启动回调服务器
node card-callback-server.js &

回调服务器会:

  1. 长连接方式监听卡片点击事件
  2. 自动处理按钮回调
  3. 可选:向 Gateway 发送回调通知

3.5 语音转文字

安装 faster-whisper:

python3.11 -m pip install faster-whisper

转写音频:

from faster_whisper import WhisperModel

model = WhisperModel('base', device='cpu', compute_type='int8')
segments, info = model.transcribe('/path/to/audio.ogg')

print(f"语言: {info.language}")
for segment in segments:
    print(segment.text)

第四部分:脚本说明

4.1 send-card.js(已修复)

修复内容

  • 支持 --receive-id-type open_id 参数
  • 可以发给个人用户而不仅是群聊

完整用法

# 确认卡片
node send-card.js confirmation "确认删除吗?" \
  --chat-id ou_xxxxxxxx \
  --receive-id-type open_id

# 待办卡片
node send-card.js todo \
  --chat-id ou_xxxxxxxx \
  --receive-id-type open_id

# 投票卡片
node send-card.js poll "周末活动" \
  --options "爬山,吃饭,看电影" \
  --chat-id ou_xxxxxxxx \
  --receive-id-type open_id

# 自定义卡片
node send-card.js custom \
  --template /path/to/card.json \
  --chat-id ou_xxxxxxxx \
  --receive-id-type open_id

4.2 feishu_file_sender.py

发送本地文件到飞书:

python3 scripts/feishu_file_sender.py \
  --file /path/to/file.png \
  --receive-id ou_xxxxxxxx \
  --receive-id-type open_id

4.3 feishu_proactive_messenger.py

主动发送文字消息:

python3 scripts/feishu_proactive_messenger.py \
  --agent main \
  --text "这是主动推送的消息" \
  --receive-id ou_xxxxxxxx \
  --receive-id-type open_id

第五部分:常见问题

Q1: 互动卡片发不出去,报错 "invalid receive_id"

原因:使用了 chat_id 类型发给个人用户
解决:添加 --receive-id-type open_id 参数

Q2: 点击卡片按钮没有反应

原因:回调服务器未启动
解决

export FEISHU_APP_ID="cli_xxx"
export FEISHU_APP_SECRET="xxx"
node card-callback-server.js &

Q3: 主动消息发送失败

原因:用户未与机器人对话过(24小时限制)
解决:让用户先在飞书中给机器人发一条消息

Q4: 文件上传失败

原因:未配置应用凭证
解决:确保 openclaw.json 中配置了完整的 accounts.main


第六部分:验证清单

完成配置后,按以下步骤验证:

  • 飞书应用已发布
  • OpenClaw 配置已更新
  • 用户已与机器人对话
  • 能收到用户消息
  • 能发送文字消息
  • 能发送图片
  • 能发送互动卡片
  • 点击卡片按钮有回调
  • 语音消息能收到

文件结构

feishu-all-in-one/
├── SKILL.md                 # 本文档
├── README.md                # 快速开始
├── _meta.json               # 元数据
├── scripts/
│   ├── send-card.js         # 互动卡片发送(支持 open_id)
│   ├── card-callback-server.js  # 回调服务器(含 confirm 处理)
│   ├── card-templates.js    # 卡片模板
│   ├── feishu_file_sender.py    # 文件发送
│   ├── feishu_proactive_messenger.py  # 主动消息
│   └── package.json         # Node 依赖(axios, @larksuiteoapi/node-sdk)
└── references/
    ├── confirmation-card.json   # 确认卡片模板
    ├── todo-card.json             # 待办卡片模板
    ├── poll-card.json             # 投票卡片模板
    └── custom-card.json          # 自定义卡片模板

更新日志

v1.0.2 (2026-03-04)

  • 修复 feishu_file_sender.py agent_id 解析失败问题
  • 兼容 agents.defaults 配置格式
  • 支持从 channels.feishu.accounts 直接读取凭证(无需 bindings)

v1.0.1 (2026-03-04)

  • 回调服务器添加 confirm 按钮处理
  • 添加 @larksuiteoapi/node-sdk 依赖说明
  • 更新安装步骤(npm install)

v1.0.0 (2026-03-04)

  • 初始版本
  • 整合 4 个核心能力
  • 修复互动卡片 open_id 发送问题
  • 添加完整的飞书平台配置指南
Usage Guidance
This skill appears to implement the Feishu features it claims, but check these before installing: - Metadata mismatch: SKILL.md requires FEISHU_APP_ID and FEISHU_APP_SECRET (and shows exporting them), but the registry metadata did not list required env vars — treat SKILL.md as the authoritative runtime requirement. - The scripts read your ~/.openclaw/openclaw.json and current working directory to resolve agent/account bindings. Review that file for any secrets or tokens you don't want the skill to access. - The callback server can POST card callback events to an OpenClaw Gateway URL (OPENCLAW_GATEWAY_URL / OPENCLAW_GATEWAY_TOKEN or config.gateway.*). If you set a gateway token/URL, callback data (card actions) will be forwarded there — only configure this to a gateway you control/trust. - The skill uses network calls to Feishu APIs and (optionally) to the configured Gateway. If you need to audit behavior, run the scripts in an isolated environment and inspect package.json / package-lock.json to verify dependencies. - Faster-whisper installation and transcription can download model artifacts and use significant resources; install that component only if you need voice-to-text. If you accept these behaviors and trust your OpenClaw gateway/config, the skill is coherent with its purpose. If you are unsure about exposing contents of ~/.openclaw/openclaw.json or forwarding callbacks to a remote gateway, do not enable the callback/Gateway integration until you verify the configuration.
Capability Analysis
Type: OpenClaw Skill Name: feishu-all-in-one Version: 1.0.0 The feishu-all-in-one skill bundle is a legitimate integration for the Feishu (Lark) messaging platform. It provides tools for sending text, files, and interactive cards, along with a long-connection callback server for handling user interactions. The code demonstrates security awareness, specifically in 'send-card.js', which implements path normalization and directory allow-listing to prevent path traversal attacks when loading custom templates. All network communication is restricted to official Feishu API endpoints (open.feishu.cn) and the local OpenClaw gateway, with no evidence of data exfiltration, malicious execution, or prompt injection.
Capability Assessment
Purpose & Capability
The code and scripts implement Feishu messaging, file upload, interactive cards, callback handling and voice-to-text as documented — required binaries (python3, node) and the use of Feishu App ID/Secret are appropriate. However the registry metadata omitted the FEISHU_APP_ID/FEISHU_APP_SECRET declarations present in SKILL.md (incoherence between metadata and runtime instructions).
Instruction Scope
SKILL.md and scripts instruct the agent to read ~/.openclaw/openclaw.json, resolve agent/account bindings, call Feishu APIs, and start a callback server that can optionally POST card callback data to an OpenClaw Gateway URL. This behavior is documented in SKILL.md (the Gateway callbacks are optional) but the skill will access local OpenClaw config and current working directory context — confirm you are comfortable with that and that the Gateway you configure is trusted.
Install Mechanism
This is an instruction-only skill with included scripts; installation uses typical npm and pip installs (npm install and pip install faster-whisper). No downloads from untrusted one-off URLs or extract operations were observed in the manifest.
Credentials
SKILL.md requires FEISHU_APP_ID and FEISHU_APP_SECRET, but the registry metadata listed no required env vars — mismatch. The scripts also read OPENCLAW_GATEWAY_URL and OPENCLAW_GATEWAY_TOKEN (and fall back to config.gateway.* in ~/.openclaw/openclaw.json) but those gateway env vars are not declared in SKILL.md. The skill reads ~/.openclaw/openclaw.json (which may contain other workspace bindings and account info); ensure that file does not contain unrelated secrets you don't want the skill to read or forward.
Persistence & Privilege
The skill does not request always:true and does not write to other skills' configs. It only reads the user OpenClaw config and runs user-started servers/scripts; no elevated persistent privileges were requested.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install feishu-all-in-one
  3. After installation, invoke the skill by name or use /feishu-all-in-one
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
feishu-all-in-one v1.0.0 - Initial release of the Feishu All-in-One skill pack. - Integrates four core capabilities: message sending/receiving, image/file upload, voice-to-text, interactive cards. - Includes full setup and configuration guide for the Feishu Open Platform and OpenClaw. - Provides scripts for sending messages, cards, and files, plus a callback server for interactive card handling. - Fully tested and ready for out-of-the-box use.
Metadata
Slug feishu-all-in-one
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Feishu All In One?

飞书 All-in-One 技能包 - 开箱即用的飞书消息收发解决方案。 集成:文字消息、图片/文件发送、语音转文字、互动卡片、主动消息。 经过完整验证,所有功能均可直接使用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 403 downloads so far.

How do I install Feishu All In One?

Run "/install feishu-all-in-one" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Feishu All In One free?

Yes, Feishu All In One is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Feishu All In One support?

Feishu All In One is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Feishu All In One?

It is built and maintained by ArvenWang (@arvenwang); the current version is v1.0.0.

💬 Comments