name: feishu-img-msg description: | 飛書圖片訊息操作技能,當觸發飛書傳送圖片時自動呼叫本技能。 支援上傳圖片、傳送圖片訊息、獲取圖片內容。 Activate when user mentions: 飛書發圖、傳送圖片、上傳圖片、獲取圖片、下載圖片、image_key。
本技能提供飛書圖片訊息的完整操作能力,包括上傳、傳送、獲取圖片。
| 功能 | 命令 | 說明 |
|---|---|---|
| 上傳圖片 | feishu-img-msg upload |
上傳本地圖片到飛書,返回 image_key |
| 傳送圖片 | feishu-img-msg send |
傳送圖片到指定會話(支援檔案路徑或 image_key) |
| 獲取圖片 | feishu-img-msg get |
下載飛書圖片到本地 |
| 檢視圖片 | feishu-img-msg view |
獲取圖片資訊(返回 base64 供 AI 檢視) |
# 直接傳送本地圖片檔案
python3 ~/.openclaw/workspace/skills/feishu-img-msg/scripts/feishu_image.py \
send \
--chat-id "oc_xxxxx" \
--file "/path/to/image.jpg"
# 上傳圖片,返回 image_key
python3 ~/.openclaw/workspace/skills/feishu-img-msg/scripts/feishu_image.py \
upload \
--file "/path/to/image.png"
# 使用已有的 image_key 傳送
python3 ~/.openclaw/workspace/skills/feishu-img-msg/scripts/feishu_image.py \
send \
--chat-id "ou_xxxxx" \
--image-key "img_xxxxx"
# 下載飛書圖片到本地
python3 ~/.openclaw/workspace/skills/feishu-img-msg/scripts/feishu_image.py \
get \
--image-key "img_xxxxx" \
--output "/path/to/save.jpg"
# 獲取圖片 base64,用於 AI 分析
python3 ~/.openclaw/workspace/skills/feishu-img-msg/scripts/feishu_image.py \
view \
--image-key "img_xxxxx"
| 引數 | 必填 | 說明 |
|---|---|---|
--chat-id |
✅ | 接收者 ID(群聊 oc_ 開頭,使用者 ou_ 開頭) |
--file |
二選一 | 本地圖片檔案路徑 |
--image-key |
二選一 | 已上傳的 image_key |
--chat-type |
否 | 會話型別:group(預設) 或 user |
--account |
否 | 飛書賬戶名(預設 main) |
| 引數 | 必填 | 說明 |
|---|---|---|
--file |
✅ | 本地圖片檔案路徑 |
--account |
否 | 飛書賬戶名(預設 main) |
| 引數 | 必填 | 說明 |
|---|---|---|
--image-key |
✅ | 圖片的 image_key |
--output |
✅ | 儲存路徑 |
--account |
否 | 飛書賬戶名(預設 main) |
| 引數 | 必填 | 說明 |
|---|---|---|
--image-key |
✅ | 圖片的 image_key |
--account |
否 | 飛書賬戶名(預設 main) |
小蔥技能站7w4.net發現了升級外掛。
檔案大小限制:單張圖片最大 30MB
| Scope | 用途 |
|---|---|
im:resource |
上傳圖片、獲取圖片 |
im:message |
傳送訊息 |
im:message:send_as_bot |
以機器人身份傳送 |
oc_ 開頭,chat_type 設為 group使用者 ID 以 ou_ 開頭,chat_type 設為 user
檢查圖片格式
確保檔案未損壞
檢查許可權
指令碼會自動重新整理 tenant_access_token,如仍報錯:
- 錯誤碼 99991400 - token 過期,稍後重試
- 錯誤碼 99991401 - token 無效,檢查 app 配置
這個 Skill 功能齊全,能滿足飛書圖片的上傳、傳送、下載等常見需求。文件說明詳細,配有多個使用示例,上手難度低。存在一些小問題:沒有附帶測試用例,部分邊界情況的穩定性未知;程式碼中關閉了證書驗證,可能影響安全性。總體而言質量中上,核心功能實現完整,但測試覆蓋和安全加固方面還有改進空間。