← Back to Skills Marketplace
yaqiangsun

Feishu Send Media

by yaqiangsun · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
210
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install feishu-send-media
Description
Send images, files, audio, video and other media to Feishu users or chats. Use when user asks to send, share, or transfer media files via Feishu direct messa...
README (SKILL.md)

Feishu Send Media

Send media files (images, documents, audio, video) directly to Feishu users or chats using the message tool.

Sending Media

Basic File Send

Use the message tool with action: send and path parameter:

{
  "action": "send",
  "target": "ou_xxx",  // user open_id or chat_id
  "path": "/path/to/file.pdf"
}

Supported types:

  • Images: .png, .jpg, .jpeg, .gif, .webp
  • Documents: .doc, .docx, .pdf, .txt, .rtf
  • Audio: .mp3, .wav, .m4a
  • Video: .mp4, .mov

Parameters:

  • target: User open_id (e.g., ou_3ac66d1ad7b8c1xxxxxxxxxxxxxxs) or chat ID
  • path: Absolute path to local file
  • Optional filename: Override display name

Sending to Group Chats

Use chat_id as target:

{
  "action": "send",
  "target": "oc_xxx",  // group chat ID
  "path": "/path/to/file.pdf"
}

Inline Images

For images to display inline in the message (not as attachments), use the image parameter with base64:

{
  "action": "send",
  "target": "ou_xxx",
  "image": "data:image/png;base64,..."
}

High-Reliability Workflow (Recommended)

Follow these steps exactly for maximum success rate:

Step 1: Copy file to workspace (with deduplication)

# Extract filename from source path
filename=$(basename "/source/path/to/file.png")

# Copy to workspace (overwrite if exists)
cp -f "/source/path/to/file.png" "~/.openclaw/workspace/${filename}"

# Verify copy succeeded
if [ ! -f "~/.openclaw/workspace/${filename}" ]; then
  echo "ERROR: File copy failed"
  exit 1
fi

Why overwrite (-f): Ensures fresh copy every time, avoids stale file issues.

Step 2: Get absolute path and validate

# Get absolute path
abs_path=$(cd ~/.openclaw/workspace && pwd)/${filename}

# Validate file exists and is readable
if [ ! -r "$abs_path" ]; then
  echo "ERROR: File not readable: $abs_path"
  exit 1
fi

# Log for debugging
echo "Sending: $abs_path"

Step 3: Send with message tool

{
  "action": "send",
  "target": "ou_xxx",
  "path": "/Users/casia/.openclaw/workspace/filename.png"
}

Step 4: Verify response

Check tool response:

  • ✅ Success: "messageId" field present
  • ❌ Failure: "error" field present

Automatic Error Recovery (Critical)

If Step 4 fails, automatically attempt fallbacks in order:

Fallback 1: Retry once with workspace path

# Sometimes transient failure, retry
cp -f "/source/path/to/file.png" "~/.openclaw/workspace/${filename}"
# Resend

Fallback 2: Use base64 for images (especially .png, .gif)

# Convert to base64
base64_string=$(base64 -i "$abs_path")

# Send as inline image
{
  "action": "send",
  "target": "ou_xxx",
  "image": "data:image/png;base64,${base64_string}"
}

When to use: Path method fails, small images (\x3C3MB), .png/.gif files

Fallback 3: Upload to Feishu drive then share

{
  "action": "upload_file",
  "doc_token": "xxx",
  "file_path": "$abs_path"
}

Then send the returned file URL.

When to use: Files >20MB, persistent path failures

Error Handling Checklist

Error Cause Solution
File not found Wrong path Verify source path exists
Permission denied File permission issue chmod 644 on file
Tool error Feishu API issue Retry → base64 → drive
Empty file Zero-byte file Check source before copying
File too large >20MB Use Feishu drive

Quick Reference

Scenario Primary Method Fallback 1 Fallback 2
Small image (\x3C3MB) path base64 -
Large image (3-20MB) path base64 drive
Document path drive -
Audio/Video path drive -
Very large (>20MB) drive - -

Mandatory Rules

  1. ALWAYS copy to workspace first - Never send from /tmp, Downloads, or other临时路径
  2. ALWAYS verify copy succeeded - Check file exists before sending
  3. ALWAYS use absolute path - No relative paths in message tool
  4. ALWAYS attempt fallback on failure - Never give up after one try
  5. ALWAYS extract basename - Preserve original filename, don't rename
Usage Guidance
Before installing or enabling: 1) Confirm how the platform 'message' tool is authenticated to Feishu and what OAuth scopes or tokens it uses—limit them to only what's needed. 2) Be aware this skill's instructions allow reading any local path you provide; avoid giving it paths to sensitive files and consider restricting allowed source directories. 3) The skill instructs automatic fallbacks (retry, base64 inline sending, upload to drive). Consider requiring user confirmation before fallback behaviors to avoid accidental exfiltration of sensitive files. 4) Note the SKILL.md expects shell utilities (cp, base64) and writes to ~/.openclaw/workspace but the skill metadata doesn't declare these requirements—ensure your environment provides/isolates that workspace and that overwrites are acceptable. 5) If you need higher assurance, request the skill author to declare required credentials, clarify the doc_token usage, and add explicit checks/confirmation steps before sending large or sensitive files.
Capability Analysis
Type: OpenClaw Skill Name: feishu-send-media Version: 1.0.2 The skill bundle contains instructions (SKILL.md) that direct an AI agent to execute bash commands for file handling, including copying files to a workspace and performing base64 encoding. While these actions support the stated goal of sending media to Feishu, the use of shell commands with potentially unsanitized variables (like filenames) poses a shell injection risk. The instructions also use forceful language ('Mandatory Rules', 'Follow these steps exactly') and include a hardcoded local path (/Users/casia/), which are risky patterns, though no clear evidence of intentional malice or data exfiltration to unauthorized endpoints was identified.
Capability Assessment
Purpose & Capability
The SKILL.md behavior (copying a local file into ~/.openclaw/workspace, sending via the message tool, falling back to base64 or drive upload) is consistent with a 'send media to Feishu' feature. It references Feishu drive upload and doc_token, which fit the purpose, but the skill does not declare any credentials or required binaries (cp, base64) that the instructions actually call out—this is a transparency gap.
Instruction Scope
The instructions tell the agent to copy arbitrary source paths from the local filesystem, overwrite files in ~/.openclaw/workspace, base64-encode files, and automatically attempt fallbacks that can upload or inline file contents. Those steps legitimately support sending media, but they also give the agent broad authority to read and transmit any local file (including sensitive ones) and to perform automatic retries without explicit user confirmation.
Install Mechanism
Instruction-only skill with no install spec and no code files; lowest install risk (nothing is written to disk by an installer).
Credentials
The skill declares no required env vars or primary credential. The SKILL.md implicitly depends on a platform 'message' tool that must hold Feishu credentials, and a drive upload step references a doc_token placeholder ('xxx') but does not declare it. The lack of declared credential requirements is a transparency issue—it's unclear what credentials the platform-level tool must have and what scopes will be used.
Persistence & Privilege
always: false and no indications the skill will request persistent system-wide changes or modify other skills' configurations.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install feishu-send-media
  3. After installation, invoke the skill by name or use /feishu-send-media
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
优化发送流程:强制复制到workspace、验证步骤更严格、自动错误恢复(重试/base64/云盘)、错误处理表、5条强制规则
v1.0.1
- Added high-reliability workflow with step-by-step instructions for sending files, emphasizing the use of the workspace directory. - Introduced verification steps for file existence and response after sending. - Provided fallback methods using base64 for images and Feishu drive upload for large files or failures. - Expanded error handling guidance for file-not-found, permissions, and large file cases. - Included a quick reference table for best practices by file type.
v1.0.0
Initial release
Metadata
Slug feishu-send-media
Version 1.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Feishu Send Media?

Send images, files, audio, video and other media to Feishu users or chats. Use when user asks to send, share, or transfer media files via Feishu direct messa... It is an AI Agent Skill for Claude Code / OpenClaw, with 210 downloads so far.

How do I install Feishu Send Media?

Run "/install feishu-send-media" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Feishu Send Media free?

Yes, Feishu Send Media is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Feishu Send Media support?

Feishu Send Media is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Feishu Send Media?

It is built and maintained by yaqiangsun (@yaqiangsun); the current version is v1.0.2.

💬 Comments