smallnest/goclaw/feishu-upload-image

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Upload images to Feishu/Lark. Returns image_key for use in messages.

Install

npx vskill@latest install smallnest/goclaw/feishu-upload-image

SKILL.md

Feishu Upload Image

Upload images to Feishu/Lark and get the image_key for use in messages.

Usage

Upload from Local File
bash
python3 ./scripts/upload_image.py /path/to/image.jpg
Upload via HTTP
bash
python3 ./scripts/upload_image.py --type message --image-type message https://example.com/image.jpg
Upload from Base64
bash
python3 ./scripts/upload_image.py --base64 "iVBORw0KGgoAAAANS..."

Options

OptionDescriptionDefault
`--type messageavatar`Image usage typemessage
`--image-type messageavatar`Same as --typemessage

Limits

  • Max file size: 10MB
  • Supported formats: JPEG, PNG, WEBP, GIF, TIFF, BMP, ICO
  • GIF resolution ≤ 2000×2000
  • Other formats ≤ 12000×12000

Response

Returns image_key which can be used in Feishu messages:

json
{
"code": 0,
"data": {
"image_key": "img_v2_xxx"
}
}

发送图片消息指南

获取必要信息
  1. 飞书访问令牌 (tenant_access_token 或 app_access_token)
  2. 接收者ID (open_id, user_id, chat_id, 或 email)
发送图片消息API

方式1:直接发送图片消息

bash
curl -X POST https://open.feishu.cn/open-apis/im/v1/messages \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"receive_id": "{chat_id}",
"msg_type": "image",
"content": "{\"image_key\":\"{image_key}\"}"
}'

方式2:在富文本中嵌入图片

bash
curl -X POST https://open.feishu.cn/open-apis/im/v1/messages \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"receive_id": "{chat_id}",
"msg_type": "post",
"content": "{\"post\":{\"zh_cn\":{\"title\":\"图片消息\",\"content\":[[{\"tag\":\"img\",\"image_key\":\"{image_key}\"}]]}}}"
}'
获取群聊chat_id
  1. 在飞书中打开群聊,查看URL中的chat_id
  2. 或者通过API查询群聊列表:
bash
curl -X GET https://open.feishu.cn/open-apis/im/v1/chats \
-H "Authorization: Bearer {access_token}"
实践经验
  • 上传图片后获得 image_key,有效期通常为7天
  • 使用前需确保有正确的访问令牌权限
  • 发送消息需要 im:message:send_as_bot 权限
  • 建议先上传图片,再发送消息,两步操作分离

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
599
Repository forks
119
7-day trend score
32

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/smallnest/goclaw/feishu-upload-image/badge)](https://verified-skill.com/skills/smallnest/goclaw/feishu-upload-image)

Something wrong with this skill or its page? Tell us.