Leo Feishu Send Image

v1.0.1

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...

0· 126·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for leo-jiqimao/leo-feishu-send-image.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Leo Feishu Send Image" (leo-jiqimao/leo-feishu-send-image) from ClawHub.
Skill page: https://clawhub.ai/leo-jiqimao/leo-feishu-send-image
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install leo-feishu-send-image

ClawHub CLI

Package manager switcher

npx clawhub@latest install leo-feishu-send-image
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

latestvk9704bkwgye8r2tjqga26626ds83strf
126downloads
0stars
2versions
Updated 1mo ago
v1.0.1
MIT-0

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 <图片路径> <接收者ID>

# 指定账户
./scripts/send-image.sh <图片路径> <接收者ID> <账户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

Comments

Loading comments...