← 返回 Skills 市场
kururu111

Feishu Send File 1.2.1

作者 kururu111 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
92
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install feishu-send-file-1-2-1
功能描述
通过飞书机器人稳定发送本地普通文件或本地图片。用于现有一等工具无法直接完成“发送本地文件附件”时,或本地图片经常规消息链路发送后在飞书里只显示路径文本而不显示图片本体时。普通文件走 `im/v1/files -> file_key -> msg_type=file`,图片走 `im/v1/images -> im...
使用说明 (SKILL.md)

飞书发送文件

使用这个 skill 发送本地普通文件,或补救“本地图片被错误发成路径文本”的场景。

优先使用平台已有的一等飞书工具。只有在以下情况出现时,再使用本 skill:

  • 需要以机器人身份发送本地普通文件附件
  • 现有工具只能把本地路径当作文本发出去
  • 本地图片走常规消息链路后,飞书里显示的是路径文本而不是图片本体

工作方式

普通文件

飞书普通文件消息需要两步:

  1. 上传文件到 im/v1/files
  2. 使用返回的 file_key 发送 msg_type=file

图片

飞书图片消息也需要两步:

  1. 上传图片到 im/v1/images
  2. 使用返回的 image_key 发送 msg_type=image

不要混用这两条链路。

何时切换到本 skill

如果本地图片通过常规消息路径发送后,用户在飞书里看到的是:

  • 本地绝对路径,例如 /path/to/demo.png
  • 带附件图标的路径文本
  • 任何不是图片本体的回显

就视为这次发送失败,不要继续重试同一种方式,直接改用 scripts/send_image.py

成功标准只有一个:用户在飞书里实际看到文件附件或图片本体。

脚本

发送普通文件

python3 scripts/send_file.py \x3Cfile_path> \x3Creceive_id_type> \x3Creceive_id> \x3Capp_id> \x3Capp_secret> [file_name] [domain]

参数:

  • file_path: 本地文件路径
  • receive_id_type: open_idchat_id
  • receive_id: 接收者 ID
  • app_id: 飞书或 Lark 应用 ID
  • app_secret: 飞书或 Lark 应用密钥
  • file_name: 可选,自定义显示文件名
  • domain: 可选,feishulark,默认 feishu

示例:

python3 scripts/send_file.py /path/to/report.html open_id ou_xxx cli_xxx secret_xxx
python3 scripts/send_file.py /path/to/archive.zip chat_id oc_xxx cli_xxx secret_xxx backup.zip
python3 scripts/send_file.py /path/to/report.pdf open_id ou_xxx cli_xxx secret_xxx report.pdf lark

稳定发送图片

python3 scripts/send_image.py \x3Cimage_path> \x3Creceive_id_type> \x3Creceive_id> \x3Capp_id> \x3Capp_secret> [domain]

参数:

  • image_path: 本地图片路径
  • receive_id_type: open_idchat_id
  • receive_id: 接收者 ID
  • app_id: 飞书或 Lark 应用 ID
  • app_secret: 飞书或 Lark 应用密钥
  • domain: 可选,feishulark,默认 feishu

示例:

python3 scripts/send_image.py /path/to/demo.png open_id ou_xxx cli_xxx secret_xxx
python3 scripts/send_image.py /path/to/demo.png chat_id oc_xxx cli_xxx secret_xxx lark

获取参数

  • app_id / app_secret 来自当前飞书或 Lark 应用配置
  • receive_id_type 取决于目标是私聊还是群聊
  • receive_id 需要从当前消息上下文、用户映射、会话元数据或上游系统明确取得
  • 如果上游上下文给的是 user:ou_xxx 之类的复合格式,先提取真正的 ID 再传给脚本

不要把某个环境里的固定路径、固定配置文件位置、固定 inbound 字段格式写死为通用规则。

手动 API 流程

普通文件

  1. 获取 tenant access token
  2. 调用 im/v1/files 上传文件
  3. 使用返回的 file_key 发送 msg_type=file

图片

  1. 获取 tenant access token
  2. 调用 im/v1/images 上传图片
  3. 使用返回的 image_key 发送 msg_type=image

注意事项

  • 普通文件和图片必须走各自独立的上传接口
  • 如果常规消息链路返回了 message_id,也不能直接判定成功,仍要看飞书客户端最终显示结果
  • 本 skill 面向“本地文件发送”这一缺口,不替代平台现有的一等飞书工具
  • 需要群发或群聊发送时,使用 chat_id
  • 需要国际版 Lark 时,将最后一个参数设为 lark
安全使用建议
This skill appears to do what it says: upload local files/images to Feishu/Lark using the official APIs. Before installing or running it, note these practical points: (1) The Python scripts call curl but the skill metadata does not declare curl as a required binary — ensure curl is available on the host. (2) The scripts expect app_id and app_secret as command-line arguments; supplying secrets on the CLI can expose them to other local users via process listings. Prefer running in a trusted environment or modifying the scripts to read secrets from a secured file or environment variable if you need tighter secrecy. (3) Confirm the app_id/app_secret you supply have only the permissions required for sending messages/files. (4) The scripts only contact official open.feishu.cn or open.larksuite.com endpoints and do not phone home elsewhere. If any of these points are unacceptable (e.g., you cannot expose secrets on the command line), request an updated version that avoids CLI-secret exposure and explicitly documents required binaries.
功能分析
Type: OpenClaw Skill Name: feishu-send-file-1-2-1 Version: 1.0.0 The skill provides utility scripts (send_file.py and send_image.py) to upload and send local files or images via the official Feishu/Lark APIs. The implementation uses safe subprocess execution (passing arguments as a list to prevent shell injection) and standard Python libraries to perform its stated functions. The logic aligns with the documentation in SKILL.md, and there is no evidence of malicious intent, unauthorized data exfiltration, or harmful prompt injection.
能力标签
requires-oauth-token
能力评估
Purpose & Capability
The name, description, SKILL.md, and the two Python scripts all consistently implement sending local files/images to Feishu/Lark via the official im/v1/files and im/v1/images flows. However, the skill declares no required binaries while both scripts invoke curl via subprocess; the scripts therefore implicitly require curl to be available.
Instruction Scope
SKILL.md stays on task: it documents when to use the scripts, required parameters, and the Feishu/Lark API steps. The scripts only read the local file paths you pass and make network calls to official Feishu/Lark endpoints; they do not reference unrelated system files or external endpoints.
Install Mechanism
This is an instruction-only skill with no install spec (no packages downloaded or archives extracted). That lowers installation risk. The only operational dependency is curl invoked by the scripts; no installer behavior was found.
Credentials
No environment variables or persistent credentials are requested, which is consistent with passing app_id/app_secret as script arguments. However, passing app_secret (and app_id) on the command line exposes them in process listings (ps) on multi-user systems. The scripts obtain tenant_access_token from the official auth endpoint and only send data to Feishu/Lark; they do not request unrelated credentials or external endpoints.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide settings. It has normal transient behavior (invoked scripts) and no elevated persistence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-send-file-1-2-1
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-send-file-1-2-1 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- 新增技能,允许通过飞书机器人稳定发送本地普通文件或图片,解决已有工具发送本地文件路径文本但未传文件本体的问题。 - 提供 send_file.py 与 send_image.py 脚本,支持分别上传并发送普通文件(msg_type=file)和图片(msg_type=image)。 - 明确推荐优先使用一等工具,仅在现有工具失败时补救本地文件/图片发送。 - 支持参数灵活调整(文件路径、接收方类型和 ID、应用凭据、可选显示名、国内/国际版)。 - 明确成功标准:用户需在飞书看到文件/图片本体,而非路径文本或附件图标。
元数据
Slug feishu-send-file-1-2-1
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Feishu Send File 1.2.1 是什么?

通过飞书机器人稳定发送本地普通文件或本地图片。用于现有一等工具无法直接完成“发送本地文件附件”时,或本地图片经常规消息链路发送后在飞书里只显示路径文本而不显示图片本体时。普通文件走 `im/v1/files -> file_key -> msg_type=file`,图片走 `im/v1/images -> im... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 92 次。

如何安装 Feishu Send File 1.2.1?

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

Feishu Send File 1.2.1 是免费的吗?

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

Feishu Send File 1.2.1 支持哪些平台?

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

谁开发了 Feishu Send File 1.2.1?

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

💬 留言讨论