Skip to content
Back to skills

Feishu Img Tool

ASecurity

Feishu image upload and send tool. Send images to Feishu chats by uploading first then sending with image_key.\n Usage: `node feishu-image-tool.js send --target <open_id> --file <path>`

  • 33 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 5, 2026
businessbashnodeapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add dvcrn/openclaw-skills-marketplace --skill feishu-img-tool --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Feishu Img Tool?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Feishu Img Tool
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dvcrn-feishu-img-tool/badge)](https://www.skillsdirectory.com/skills/dvcrn-feishu-img-tool)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: feishu-img-tool
description: "Feishu image upload and send tool. Send images to Feishu chats by uploading first then sending with image_key.\n Usage: `node feishu-image-tool.js send --target <open_id> --file <path>`"
---

# Feishu Image Tool

Tool `feishu_image` for uploading and sending images to Feishu chats.

## How It Works

Feishu requires a two-step process to send images:

1. **Upload Image** - Call `/open-apis/im/v1/images` to upload the image and get `image_key`
2. **Send Message** - Call `/open-apis/im/v1/messages` with `msg_type: "image"` and the `image_key`

## Actions

### Upload and Send Image

```json
{
  "action": "send",
  "target": "ou_xxx",  // User open_id or chat_id
  "file_path": "/path/to/image.png",
  "message": "Optional caption"
}
```

**Parameters:**
- `action`: `"send"`
- `target`: Feishu user open_id or chat_id (omit for current conversation)
- `file_path`: Path to the image file on the server
- `message`: Optional text message to send with the image

**Returns:**
- `success`: boolean
- `image_key`: The uploaded image key
- `message_id`: The sent message ID

### Upload Image Only

```json
{
  "action": "upload",
  "file_path": "/path/to/image.png"
}
```

Returns `image_key` for later use.

### Send Image with Key

```json
{
  "action": "send_with_key",
  "target": "ou_xxx",
  "image_key": "img_v3_xxx"
}
```

## Image Limits

- **Max size**: 10 MB
- **Supported formats**: JPG, JPEG, PNG, WEBP, GIF, BMP, ICO
- **Resolution**: 
  - GIF: max 2000 x 2000 pixels
  - Other formats: max 12000 x 12000 pixels

## Configuration

### Feishu App Credentials

Required credentials (in order of priority):
1. Environment variables: `FEISHU_APP_ID`, `FEISHU_APP_SECRET`
2. Config file: `~/.feishu-image/config.json`

```bash
# Method 1: Environment variables
export FEISHU_APP_ID="cli_xxx"
export FEISHU_APP_SECRET="xxx"

# Method 2: Config file (~/.feishu-image/config.json)
{
  "appId": "cli_xxx",
  "appSecret": "xxx"
}
```

### Required Permissions

- `im:message` - Send messages as bot
- `im:image` - Upload images

## Permissions

- `im:message` - Send messages as bot
- `im:image` - Upload images

## Example Usage

### Send stock chart to user

```json
{
  "action": "send",
  "target": "ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "file_path": "/tmp/stock-report.png",
  "message": "📊 今日股票报告"
}
```

### Send to current conversation (omit target)

```json
{
  "action": "send",
  "file_path": "/tmp/chart.png"
}
```

## Implementation Notes

- Uses Feishu SDK `@larksuiteoapi/node-sdk`
- `client.im.image.create()` for upload
- `client.im.message.create()` for sending
- `image_key` is permanent and can be reused by the same app

Files in this skill

  • README.md2.7 KB
  • SKILL.md2.6 KB
  • config.example.json292 B
  • feishu-image-tool.js6.4 KB
  • index.js2.4 KB
  • package.json342 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.