← 返回 Skills 市场
leo-jiqimao

Leo Feishu Send Image

作者 leo-jiqimao · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
132
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install leo-feishu-send-image
功能描述
Send images via Feishu (Lark) messaging platform using the underlying API. Supports sending local image files to users or group chats. Use when the user want...
使用说明 (SKILL.md)

Feishu Send Image

通过飞书 API 发送图片消息。支持发送本地图片文件给指定用户或群聊。

安装

方式1:通过 OpenClaw 对话安装

在飞书(或其他渠道)的 OpenClaw 对话框中直接说:

安装 leo-feishu-send-image skill

帮我装一下 leo-feishu-send-image

OpenClaw 会自动从 ClawHub 下载并安装 skill。

方式2:通过命令行安装

clawhub install leo-feishu-send-image

前置要求

1. 飞书应用配置

~/.openclaw/openclaw.json 中添加飞书应用配置:

{
  "channels": {
    "feishu": {
      "accounts": {
        "default": {
          "appId": "cli_xxxxxxxxxxxxxxxx",
          "appSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        }
      }
    }
  }
}

如何获取 App ID 和 App Secret:

  1. 访问 飞书开放平台
  2. 创建企业自建应用
  3. 进入应用详情 → 凭证与基础信息
  4. 复制 App IDApp Secret
  5. 确保应用有 im:chat:readonlyim:message:send_as_bot 权限

2. 安装依赖工具

需要 jq 工具处理 JSON:

# Ubuntu/Debian
sudo apt-get install jq

# CentOS/RHEL
sudo yum install jq

# macOS
brew install jq

使用方法

方式1:通过 OpenClaw 对话使用(推荐)

安装 skill 后,直接在对话框中说:

用飞书发图 skill 发送 /path/to/image.jpg 给 ou_xxxxxxxx

用 leo-feishu-send-image 发图给 ou_xxxxxxxx

飞书发送图片 /path/to/image.jpg 给 ou_xxxxxxxx

参数说明:

  • /path/to/image.jpg - 本地图片文件路径
  • ou_xxxxxxxx - 接收者的 open_id(用户)或 oc_xxxxxxxx(群聊)

方式2:直接调用脚本

# 进入 skill 目录
cd ~/.openclaw/workspace/skills/leo-feishu-send-image

# 基本用法
./scripts/send-image.sh \x3C图片路径> \x3C接收者ID>

# 指定账户
./scripts/send-image.sh \x3C图片路径> \x3C接收者ID> \x3C账户ID>

示例:

# 发送给用户
./scripts/send-image.sh ./output.jpg ou_114db42b481a66952fceb246da9c7bd7

# 发送到群聊
./scripts/send-image.sh ./output.jpg oc_e4bc81fe9899665019af2cccaa7bb30d

# 使用指定账户(如果配置了多个账户)
./scripts/send-image.sh ./output.jpg ou_xxxxxxxx prompt

完整使用场景示例

场景1:AI 生成图片后自动发送

用户:用即梦生成一张风景图,然后发给我

OpenClaw:
1. 调用即梦 skill 生成图片
2. 保存到 workspace
3. 调用 leo-feishu-send-image 发送图片给用户

场景2:批量发送图片

用户:把这 5 张图都发给我

OpenClaw:
for i in 1 2 3 4 5; do
    ./scripts/send-image.sh ./image_$i.jpg ou_xxxxxxxx
done

场景3:发送到群聊

用户:把这张图发到游戏开发群

OpenClaw:
./scripts/send-image.sh ./design.png oc_xxxxxxxx

API 流程说明

本 skill 底层调用飞书开放平台的三个 API:

  1. 获取 Access Token

    • 接口:POST /auth/v3/tenant_access_token/internal
    • 使用 app_id 和 app_secret 换取 tenant_access_token
  2. 上传图片

    • 接口:POST /im/v1/images
    • 上传图片文件,返回 image_key
  3. 发送消息

    • 接口:POST /im/v1/messages
    • 使用 image_key 发送图片消息
    • ⚠️ 注意:content 字段必须是 JSON 字符串(使用 jq tojson 转换)

支持的图片格式

  • JPEG / JPG
  • PNG
  • WEBP
  • GIF
  • TIFF
  • BMP
  • ICO

故障排查

错误信息 可能原因 解决方法
缺少 app_id 飞书配置未找到 检查 ~/.openclaw/openclaw.json 中的 channels.feishu.accounts 配置
获取 token 失败 App ID / Secret 错误 确认应用凭证正确,且应用已启用
上传失败 图片格式不支持 转换为 JPEG/PNG 格式后重试
发送失败 接收者 ID 错误 确认 open_id 或 chat_id 正确,且机器人有权限发送给该用户/群聊
未安装 jq 缺少依赖工具 执行 sudo apt-get install jq 或对应系统的安装命令

获取接收者 ID

获取用户 open_id

  1. 在飞书开放平台 → 应用详情 → 权限管理
  2. 确保有 contact:user.read 权限
  3. 调用 API 或通过事件订阅获取

获取群聊 chat_id

  1. 将机器人添加到群聊
  2. 在群设置 → 群机器人 中查看
  3. 或通过 im.chat.list API 获取

相关链接

更新日志

v1.0.0

  • 初始版本发布
  • 支持发送图片到用户和群聊
  • 支持多账户配置

作者: @leo-jiqimao
ClawHub: https://clawhub.com/skills/leo-feishu-send-image
问题反馈: 请在 ClawHub 页面提交 issue

安全使用建议
This skill appears coherent and implements only what it claims: reading your local OpenClaw config, exchanging your appId/appSecret for a tenant token, uploading an image, and sending it via Feishu. Before installing: (1) review ~/.openclaw/openclaw.json and ensure you are comfortable storing the App Secret there (restrict file permissions); (2) verify the script is run in a trusted environment (it will transmit the image to Feishu); (3) install jq from your OS package manager to avoid untrusted downloads; (4) confirm the Feishu app has only the permissions you intend (im:message:send_as_bot, etc.); (5) if you do not want the agent to send messages autonomously, control invocation settings in OpenClaw/agent policies. Overall the footprint is proportionate, but treat the appSecret as sensitive and only install from trusted sources.
功能分析
Type: OpenClaw Skill Name: leo-feishu-send-image Version: 1.0.1 The skill is a legitimate utility for sending images via the Feishu (Lark) messaging platform. The script `scripts/send-image.sh` correctly reads credentials from the local OpenClaw configuration file and communicates exclusively with official Feishu API endpoints (open.feishu.cn) to authenticate, upload images, and send messages. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
The name/description (send images via Feishu) aligns with the included script and SKILL.md. The skill only needs Feishu app credentials stored in ~/.openclaw/openclaw.json and jq for JSON handling — both are appropriate for the described API usage.
Instruction Scope
SKILL.md and the script only instruct reading the OpenClaw config file, invoking Feishu API endpoints (tenant token, image upload, send message), and using jq/curl. There are no instructions to read unrelated files, exfiltrate data to unexpected endpoints, or perform system-wide changes.
Install Mechanism
There is no install spec (instruction-only) and the included script is run locally. The only external dependency mentioned is jq, which is installed via standard package managers — low install risk.
Credentials
Requiring appId/appSecret in ~/.openclaw/openclaw.json is expected for Feishu API access. Note that appSecret is a sensitive credential stored in plaintext in a local config file; users should ensure proper file permissions and trust the skill before placing secrets there.
Persistence & Privilege
Skill is not always-enabled (always: false) and does not request elevated or persistent system privileges, nor does it modify other skills' configurations. Autonomous invocation is allowed by platform default but is not combined with other concerning privileges here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install leo-feishu-send-image
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /leo-feishu-send-image 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
完善使用文档,添加详细安装说明和使用示例
v1.0.0
Send images via Feishu API - by @leo-jiqimao
元数据
Slug leo-feishu-send-image
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Leo Feishu Send Image 是什么?

Send images via Feishu (Lark) messaging platform using the underlying API. Supports sending local image files to users or group chats. Use when the user want... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 132 次。

如何安装 Leo Feishu Send Image?

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

Leo Feishu Send Image 是免费的吗?

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

Leo Feishu Send Image 支持哪些平台?

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

谁开发了 Leo Feishu Send Image?

由 leo-jiqimao(@leo-jiqimao)开发并维护,当前版本 v1.0.1。

💬 留言讨论