← 返回 Skills 市场
leileitian

Feishu File Sender 1.0.9

作者 leileitian · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
514
总下载
0
收藏
5
当前安装
1
版本数
在 OpenClaw 中安装
/install feishu-file-sender-1-0-9
功能描述
飞书文件发送器 — 补齐飞书渠道缺失的文件投递能力,通过飞书 OpenAPI 上传并发送 agent 生成的本地文件。| Feishu File Sender — Upload & send files via Feishu OpenAPI, filling the channel's missing file...
使用说明 (SKILL.md)

Feishu File Sender | 飞书文件发送器

OpenClaw agent 在本地生成文件,但飞书渠道插件只支持文本消息,没有文件投递能力。本 skill 通过直接调用飞书 OpenAPI(上传+发送)补齐这一底层能力,使生成的文件能回传到聊天中。

OpenClaw agents generate files locally, but the Feishu channel integration only supports text messages and does not provide native file delivery. This skill fills that architectural gap by calling Feishu OpenAPI directly (upload + send), enabling files to be delivered back to chat.

将本地文件上传到飞书并作为文件消息发送。

Upload a local file to Feishu and send it as a file message.

快速开始 | Quick Start

python3 scripts/feishu_file_sender.py \
  --file /absolute/path/to/report.xlsx \
  --receive-id oc_xxx

使用方法 | Usage

python3 scripts/feishu_file_sender.py \
  --file /absolute/path/to/file \
  --receive-id \x3Cchat_id|open_id> \
  --receive-id-type \x3Cchat_id|open_id|user_id>

参数说明 | Arguments

  • --file(必填):本地文件绝对路径。

  • --receive-id(可选):目标 chat_id 或 open_id。若省略,脚本会读取 OPENCLAW_CHAT_ID(或 OPENCLAW_RECEIVE_ID / FEISHU_CHAT_ID)。

  • --receive-id-type(可选):若省略,将根据前缀自动识别:

    • oc_ → chat_id
    • ou_ → open_id
    • on_ → user_id
  • --file-type(可选):飞书上传的文件类型,默认 stream

  • --file (required): Absolute path to the local file.

  • --receive-id (optional): Target chat_id or open_id. If omitted, the script reads OPENCLAW_CHAT_ID (or OPENCLAW_RECEIVE_ID / FEISHU_CHAT_ID).

  • --receive-id-type (optional): If omitted, auto-detect by prefix:

    • oc_ → chat_id
    • ou_ → open_id
    • on_ → user_id
  • --file-type (optional): Feishu file upload type, default stream.

工作原理 | How It Works

  1. 通过 cwd 匹配 OpenClaw 工作区,解析当前 agent id。

  2. 根据 agent id 从 ~/.openclaw/openclaw.json 读取 appId/appSecret。

  3. 调用飞书 上传文件 API 获取 file_key

  4. 调用飞书 发送消息 API 发送文件。

  5. Resolve the current agent id by matching cwd to OpenClaw workspace path.

  6. Read appId/appSecret from ~/.openclaw/openclaw.json based on the agent id.

  7. Call Feishu Upload File API to get file_key.

  8. Call Feishu Send Message API to deliver the file.

错误处理 | Error Handling

  • 缺少凭证 → 确保 channels.feishu.accounts 存在于 ~/.openclaw/openclaw.json,且 bindings 映射 agentId → accountId。

  • 机器人不在群内(230002) → 将机器人加入目标群或换一个群。

  • 缺少 receive_id → 传入 --receive-id 或设置 OPENCLAW_CHAT_ID

  • HTTP 错误 → 查看飞书错误返回中的 log_id 进行排查。

  • Missing credentials → Ensure channels.feishu.accounts exists in ~/.openclaw/openclaw.json and bindings map agentId → accountId.

  • Bot not in chat (code 230002) → Add the bot to the target chat or use a chat where the bot is present.

  • Missing receive_id → Pass --receive-id or set OPENCLAW_CHAT_ID.

  • HTTP errors → Check the returned log_id in Feishu error payload.

安全说明 | Security

本技能会从本机 OpenClaw 配置中读取飞书凭证(~/.openclaw/openclaw.json):

  • channels.feishu.accounts.*.appId
  • channels.feishu.accounts.*.appSecret

这些凭证仅用于获取 tenant access token 并发送文件。技能不会存储或向其他地方传输凭证。

This skill reads Feishu credentials from the local OpenClaw config (~/.openclaw/openclaw.json) on the machine where it runs:

  • channels.feishu.accounts.*.appId
  • channels.feishu.accounts.*.appSecret

These values are used only to obtain a tenant access token and send the file. The skill does not store or transmit credentials anywhere else.

备注 | Notes

  • 本技能面向 所有 agent 设计,会自动读取当前工作区来选择正确的 飞书应用凭证。

  • 建议通过入站 chat_id 发送到 当前聊天

  • This skill is designed for all agents; it reads the active workspace to choose the correct Feishu app credentials automatically.

  • Prefer sending to the current chat by passing the inbound chat_id.

随附脚本 | Bundled Script

  • scripts/feishu_file_sender.py
安全使用建议
This skill will read your OpenClaw config file (~/.openclaw/openclaw.json) to obtain Feishu appId/appSecret and then upload local files to Feishu using those credentials. Before installing, ensure: (1) the OpenClaw config contains the correct Feishu account bindings you expect, (2) you trust the skill to transmit the specified local files to Feishu (it will upload any file path you provide), and (3) no sensitive data will be uploaded unintentionally. Note: the script may also read optional env vars (OPENCLAW_CHAT_ID / OPENCLAW_RECEIVE_ID / FEISHU_CHAT_ID) for convenience even though they aren't declared in the registry metadata. Reviewing the bundled script (scripts/feishu_file_sender.py) yourself is recommended; it only calls official Feishu endpoints and does not persist or exfiltrate credentials to other endpoints.
功能分析
Type: OpenClaw Skill Name: feishu-file-sender-1-0-9 Version: 1.0.0 The skill is a utility designed to upload and send local files to Feishu chats via the official Feishu OpenAPI. It functions by reading the user's Feishu credentials (appId and appSecret) from the local OpenClaw configuration file (~/.openclaw/openclaw.json) and communicating exclusively with official Feishu endpoints (open.feishu.cn). The implementation in scripts/feishu_file_sender.py is transparent, well-documented, and lacks any signs of obfuscation, data exfiltration to third parties, or malicious intent.
能力评估
Purpose & Capability
Name/description describe uploading files to Feishu. The package only requires python3 and the OpenClaw config (~/.openclaw/openclaw.json) containing Feishu appId/appSecret, which is exactly what the script needs to obtain a tenant token and call Feishu upload/send APIs.
Instruction Scope
SKILL.md and the bundled script instruct the agent to read ~/.openclaw/openclaw.json, resolve agent id from cwd, optionally read non-secret env vars (OPENCLAW_CHAT_ID / OPENCLAW_RECEIVE_ID / FEISHU_CHAT_ID) for receive_id, then call Feishu endpoints. This stays within the stated purpose, but the SKILL.md/script rely on optional environment variables that are not declared in the registry metadata — worth noting so users know these env vars may be read at runtime.
Install Mechanism
No install spec is provided (instruction-only). The README suggests installing the 'requests' library via pip; no remote downloads or archive extraction occur. Risk from installation is low.
Credentials
The skill requests access to the local OpenClaw config file (declared) to read Feishu appId/appSecret — proportional to obtaining a tenant access token. It does not request unrelated credentials or broad environment access. The optional receive_id env vars used are non-sensitive and reasonable for convenience, though they weren't listed in metadata.
Persistence & Privilege
The skill is user-invocable, not 'always' enabled, and does not modify other skills or system settings. It runs at runtime and performs network calls to Feishu APIs as expected for its function.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-file-sender-1-0-9
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-file-sender-1-0-9 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial public release: Enables local file upload and delivery via Feishu OpenAPI for OpenClaw agents. - Uploads local files and delivers them as messages to Feishu chats or users. - Auto-detects recipient ID type based on prefix, with fallback to environment/config values. - Reads Feishu app credentials from `~/.openclaw/openclaw.json` per agent workspace. - Provides detailed error handling and clear usage instructions. - Includes a command-line script (`scripts/feishu_file_sender.py`) for direct invocation.
元数据
Slug feishu-file-sender-1-0-9
版本 1.0.0
许可证
累计安装 6
当前安装数 5
历史版本数 1
常见问题

Feishu File Sender 1.0.9 是什么?

飞书文件发送器 — 补齐飞书渠道缺失的文件投递能力,通过飞书 OpenAPI 上传并发送 agent 生成的本地文件。| Feishu File Sender — Upload & send files via Feishu OpenAPI, filling the channel's missing file... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 514 次。

如何安装 Feishu File Sender 1.0.9?

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

Feishu File Sender 1.0.9 是免费的吗?

是的,Feishu File Sender 1.0.9 完全免费(开源免费),可自由下载、安装和使用。

Feishu File Sender 1.0.9 支持哪些平台?

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

谁开发了 Feishu File Sender 1.0.9?

由 leileitian(@leileitian)开发并维护,当前版本 v1.0.0。

💬 留言讨论