← 返回 Skills 市场
icesumer-lgtm

飞书图片发送技能

作者 icesumer-lgtm · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
103
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install feishu-axiang-send-image
功能描述
使用自有飞书应用配置,上传并发送本地图片到指定飞书用户或群聊,支持PNG/JPG/GIF/WEBP格式。
使用说明 (SKILL.md)

feishu-axiang-send-image - 飞书图片发送技能

技能说明

飞书图片发送技能,使用自有飞书应用配置发送图片到飞书聊天(个人或群聊)。

特点:

  • 🦞 专属配置 - 使用自有的飞书应用配置
  • ⚡ 开箱即用 - 无需配置环境变量
  • 🎯 简化调用 - 只需提供图片路径和目标用户

核心配置

飞书应用信息(硬编码在脚本中):

{
  "appId": "cli_XXX",
  "appSecret": "XXX",
  "accountId": "XXX"
}

允许发送的用户:

  • feishu-axiang-allowFrom.json 中配置允许的用户列表

触发词

  • 发送图片到飞书
  • 发图给我
  • axiang send image

核心原理

两步法:

  1. 调用 im/v1/images API 上传图片到飞书 → 获取 image_key
  2. 调用 im/v1/messages API 发送图片消息 → 获取 message_id

使用方法

方法 1:命令行调用

# 发送图片到个人(默认)
python scripts/send.py --file-path "C:\path	o\image.png"

# 发送到指定用户
python scripts/send.py --file-path "C:\path	o\image.png" --target "ou_xxxxx"

# 发送到群聊
python scripts/send.py --file-path "C:\path	o\image.png" --target "oc_xxxxx" --target-type chat_id

方法 2:Python API 调用

from scripts.send import send_image_to_feishu

# 发送到默认用户
result = send_image_to_feishu("image.png")

# 发送到指定用户
result = send_image_to_feishu("image.png", target="ou_xxxxx", target_type="open_id")

参数说明

参数 必需 默认值 说明
--file-path - 本地图片文件路径
--target 配置中的默认值 目标用户 open_id 或群聊 chat_id
--target-type open_id 目标类型(open_id/chat_id)

输出示例

Image Sender
   File: C:\Users\your_username\.openclaw\workspace\image.png
   Target: ou_xxxxx (open_id)
   App: cli_XXX (accountId)

Step 1: Get tenant_access_token
   OK Token obtained

Step 2: Upload image to Feishu
   OK Upload success, image_key: img_v3_xxx

Step 3: Send image message
   OK Send success, message_id: om_xxx

Image sent successfully!

支持格式

格式 支持 说明
PNG 推荐格式
JPG/JPEG 支持
GIF 支持(会自动转换)
WEBP 支持

限制

  • 单张图片最大 20MB
  • 仅支持配置允许的用户
  • 需要网络连接

故障排查

错误:open_id cross app

原因: 目标用户不在允许列表中

解决:

  1. 检查目标 open_id 是否正确
  2. feishu-axiang-allowFrom.json 中添加用户

错误:file not found

原因: 图片路径不存在

解决: 检查文件路径是否正确,使用绝对路径

错误:tenant_access_token 获取失败

原因: AppID 或 AppSecret 错误

解决: 检查脚本中的配置是否正确

相关文件

  • scripts/send.py - 主发送脚本
  • feishu-axiang-allowFrom.json - 允许发送的用户列表(需自行配置)

版本历史

  • v1.0 - 初始版本,专属配置

安装后配置

  1. 编辑 scripts/send.py,填入你自己的飞书应用配置:

    • app_id: 你的飞书应用 AppID
    • app_secret: 你的飞书应用 AppSecret
    • default_target: 默认发送目标用户
  2. 创建 feishu-axiang-allowFrom.json 文件,配置允许发送的用户列表

注意事项

⚠️ 安全提示:

  • 不要将包含真实 AppID/AppSecret 的脚本上传到公开仓库
  • 生产环境建议使用环境变量或配置文件管理敏感信息
  • 定期检查允许发送的用户列表
安全使用建议
This skill appears to be what it says: a simple Feishu image sender. Before installing or running it, do the following: (1) Replace the placeholder APP_CONFIG.app_id and app_secret with credentials you control, but avoid embedding secrets in code — prefer environment variables or a protected config file. (2) Note the README mentions an allow-list file, but the script does not enforce it — if you need recipient restrictions, add enforcement or verify targets yourself. (3) Don’t commit the script with real AppID/AppSecret to public repos. (4) Run the script in a trusted environment and grant the Feishu app only the minimum API scopes required. If you want a stricter review, request that the author remove hardcoded credentials and implement the documented allow-list check (or explain why it was omitted).
功能分析
Type: OpenClaw Skill Name: feishu-axiang-send-image Version: 1.0.2 The skill is classified as suspicious due to a significant discrepancy between the documentation and the implementation: SKILL.md claims that only users listed in feishu-axiang-allowFrom.json are permitted, but scripts/send.py contains no logic to enforce this whitelist. Furthermore, the instructions and code encourage the insecure practice of hardcoding sensitive Feishu API credentials (app_id, app_secret) directly into the script, which is a high-risk behavior for credential leakage. While the core functionality of sending images to the Feishu API appears legitimate, these security flaws and misleading documentation pose a risk to the user.
能力评估
Purpose & Capability
The name/description match the code: the script implements the two-step Feishu flow (tenant token → upload image → send message) against open.feishu.cn. No unrelated services, binaries, or credentials are requested by the registry metadata.
Instruction Scope
SKILL.md and README instruct users to edit credentials in scripts/send.py and reference an allow-list file (feishu-axiang-allowFrom.json). The included script performs the token/upload/send flow but does not read or enforce the referenced allowFrom file — documentation and implementation are inconsistent. The instructions also recommend putting credentials into the script (not ideal) rather than environment variables.
Install Mechanism
No install spec; this is instruction-only plus a Python script. No downloads or archive extraction. Risk from install mechanism is low.
Credentials
The registry metadata lists no required env vars, but the script requires Feishu AppID/AppSecret to function (currently present as placeholders in APP_CONFIG). Credentials are expected to be placed directly in the script per README/SKILL.md rather than declared environment variables — this is a security hygiene concern but not an incoherence with the stated purpose.
Persistence & Privilege
The skill does not request always:true, does not modify other skills, and has no system persistence; it runs only when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-axiang-send-image
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-axiang-send-image 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
修复 v1.0.2 - 输出示例中的 Xiabi 改为用户名,axiang 改为 accountId,避免泄露具体用户信息
v1.0.1
修复 v1.0.1 - 将 accountId 字段也打码为 XXX,增强隐私保护
v1.0.0
初始版本 - 飞书图片发送技能,支持个人和群聊图片发送
元数据
Slug feishu-axiang-send-image
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

飞书图片发送技能 是什么?

使用自有飞书应用配置,上传并发送本地图片到指定飞书用户或群聊,支持PNG/JPG/GIF/WEBP格式。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 103 次。

如何安装 飞书图片发送技能?

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

飞书图片发送技能 是免费的吗?

是的,飞书图片发送技能 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

飞书图片发送技能 支持哪些平台?

飞书图片发送技能 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 飞书图片发送技能?

由 icesumer-lgtm(@icesumer-lgtm)开发并维护,当前版本 v1.0.2。

💬 留言讨论