支持发送文件到飞书,大于20MB自动分卷裁切

v1.0.4

发送任意本地文件到飞书,自动处理大文件。视频/音频按 20MB 分段(不重新编码),其他文件压缩为 ZIP。支持大文件自动处理。

1· 382·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 jingrongx/sendfiles-to-feishu.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "支持发送文件到飞书,大于20MB自动分卷裁切" (jingrongx/sendfiles-to-feishu) from ClawHub.
Skill page: https://clawhub.ai/jingrongx/sendfiles-to-feishu
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: FEISHU_APP_ID, FEISHU_APP_SECRET
Required binaries: ffmpeg, ffprobe
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 sendfiles-to-feishu

ClawHub CLI

Package manager switcher

npx clawhub@latest install sendfiles-to-feishu
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description request FEISHU_APP_ID and FEISHU_APP_SECRET and ffmpeg/ffprobe — these are exactly what's needed to obtain a Feishu tenant token and perform media splitting/processing. Required binaries and env vars match the declared functionality.
Instruction Scope
SKILL.md and scripts instruct the agent to read a local .env in the skill directory (if present), to auto-install the Python 'requests' package via pip, and to run ffmpeg/ffprobe on user-specified files. These behaviors are within scope for a file-send/processing tool, but note: the script writes split/converted files next to the original file (not only temporary files), and pip install runs at runtime unless 'requests' is already present.
Install Mechanism
No external install/download URLs or archive extraction are present. The only automated install action in code is calling pip to install 'requests' if missing; system packages (ffmpeg/ffprobe) are expected to be provided by the host. This is low-risk compared to arbitrary downloads.
Credentials
The skill requires only FEISHU_APP_ID and FEISHU_APP_SECRET — credentials directly relevant to Feishu API usage. No additional unrelated secrets or config paths are requested or accessed in the provided code.
Persistence & Privilege
The skill is not 'always:true' and is user-invocable. It does read an optional .env in its own skill directory to obtain credentials and may create files (split parts, zips) in the filesystem near the input files. It does not modify other skills or request system-wide elevated privileges in the provided code.
Assessment
This skill appears to do what it claims (split/zip files and upload to Feishu). Before installing: (1) only provide FEISHU_APP_ID/FEISHU_APP_SECRET with the minimal scopes required in Feishu; (2) be aware the scripts may auto-run pip to install 'requests' if missing — you can pre-install dependencies to avoid on-run installs; (3) splitting and converted files are written beside the original file (they can be numerous and take disk space), so run it in a location where that is acceptable; (4) review the code yourself if you require higher assurance (the network calls use open.feishu.cn); and (5) test using non-sensitive files first. Overall the skill is internally coherent and proportionate to its stated purpose.

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

Runtime requirements

📤 Clawdis
Binsffmpeg, ffprobe
EnvFEISHU_APP_ID, FEISHU_APP_SECRET
latestvk97dx0a7a0gwzag58p7nmtkkbd82tr4e
382downloads
1stars
5versions
Updated 1mo ago
v1.0.4
MIT-0

Feishu Send File Skill

发送任意本地文件到飞书,自动处理大文件和特殊格式。

功能

  • 自动检测文件类型(视频、音频、其他)
  • 视频/音频:保持原质量,按 20MB 分段
  • 其他文件:压缩为 ZIP,如仍超限则分段 ZIP
  • 支持任意文件类型

用法

/sendfiles-to-feishu <文件路径> <接收者ID> [ID类型]

参数:

  • 文件路径:本地文件(绝对或相对路径)
  • 接收者ID:open_id (ou_xxx) 或 union_id (on_xxx)
  • ID类型:可选,open_idunion_id(默认自动识别)

示例:

/sendfiles-to-feishu "C:\data\report.pdf" "ou_05eb1e0dcc31159ab77432d1d9adf7a3"
/sendfiles-to-feishu "video.mp4" "on_0144493a63e92550a0602e2b632ff597" "union_id"

处理逻辑

文件类型处理方式
视频(含音频流)按时间切分,每段 < 20MB,不重新编码
视频(无音频)先合并音频(如有分离的音频文件),再切分
纯音频按时间切分
其他(文档、图片、压缩包等)压缩为 ZIP,如仍 > 20MB 则分段 ZIP

权限要求

飞书应用需:

  • im:message.p2p_msgim:message.group_msg
  • drive:file:upload
  • 机器人能力已开启

配置

方式一:.env 文件(推荐)

在技能目录下创建 .env 文件:

# 飞书应用配置
FEISHU_APP_ID=your_app_id_here
FEISHU_APP_SECRET=your_app_secret_here

可复制 .env.example.env 并填入实际值。

方式二:环境变量

设置系统环境变量:

  • FEISHU_APP_ID
  • FEISHU_APP_SECRET

优先级

系统环境变量 > .env 文件

环境检测

脚本启动时自动检测依赖:

类型依赖处理方式
Pythonrequests自动安装
系统ffmpeg, ffprobe提示安装方法

依赖

  • Python 3.8+
  • requests
  • ffmpeg

注意事项

  • 视频分割使用 ffmpeg -c copy,无画质损失
  • 音频视频分离检测可能不准确,如果遇到问题请手动合并
  • ZIP 分割是将同一文件重复打包,接收后需解压并合并(但通常单文件压缩后不会超限)
  • 发送前确保与接收者已有会话(在飞书中互发过消息)

故障排除

  • 发送失败:检查权限和 token
  • 文件过大:自动分段,如果某段仍超限(罕见),手动调整 MAX_FILE_SIZE_MB 常量
  • 音视频分离未合并:确保同目录下有匹配的音频/视频文件(同名)

Comments

Loading comments...