← 返回 Skills 市场
81
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install feishu-message-download
功能描述
从飞书消息中下载文件(视频、图片、文档等)到本地
使用说明 (SKILL.md)
飞书消息文件下载
从飞书消息中下载文件(视频、图片、文档等)到本地。
描述
本 Skill 用于从飞书聊天消息中下载附件到本地,支持视频、图片、文件等多种类型。
下载后的文件可以用于:
- 视频编辑和处理
- 上传到抖音、小红书、B 站等平台
- 本地存档和备份
- AI 分析和处理
- 转发到其他平台
功能
- 从飞书消息链接或消息 ID 中提取文件信息
- 支持手动指定 file_key 和 message_id
- 自动获取飞书 tenant_access_token
- 下载文件到本地指定目录
安装
# 安装依赖
pip install -r requirements.txt
配置
本 Skill 需要以下飞书应用凭证,可通过以下方式配置:
方式 1:OpenClaw 配置(推荐)
在 OpenClaw 配置文件中设置:
{
"channels": {
"feishu": {
"appId": "your_app_id",
"appSecret": "your_app_secret"
}
}
}
方式 2:环境变量
export FEISHU_APP_ID="your_app_id"
export FEISHU_APP_SECRET="your_app_secret"
使用方法
方法 1:通过消息链接下载
from download import FeishuMessageDownloader
downloader = FeishuMessageDownloader()
downloader.download_from_message_url(
message_url="https://open.feishu.cn/im/xxx",
output_dir="~/Downloads"
)
方法 2:通过消息 ID 和 file_key 下载
from download import FeishuMessageDownloader
downloader = FeishuMessageDownloader()
downloader.download_file(
message_id="om_xxxxxxxx",
file_key="file_xxxxxxxx",
output_dir="~/Downloads",
filename="my_video.mp4"
)
方法 3:命令行使用
# 通过消息链接下载
python download.py --url "https://open.feishu.cn/im/xxx" --output ~/Downloads
# 通过消息 ID 和 file_key 下载
python download.py --message-id "om_xxxxxxxx" --file-key "file_xxxxxxxx" --output ~/Downloads
# 指定保存文件名
python download.py --message-id "om_xxxxxxxx" --file-key "file_xxxxxxxx" --output ~/Downloads --filename "video.mp4"
参数说明
| 参数 | 说明 | 必填 |
|---|---|---|
--url |
飞书消息链接 | 可选 |
--message-id |
消息 ID (om_xxx) | 可选 |
--file-key |
文件 key (file_xxx) | 可选 |
--output |
输出目录,默认为当前目录 | 可选 |
--filename |
保存的文件名 | 可选 |
飞书应用权限要求
本 Skill 需要以下飞书应用权限:
im:resource- 访问消息资源
支持的文件类型
- 视频文件 (.mp4, .mov, .avi, etc.) - 可用于视频编辑、平台发布
- 图片文件 (.jpg, .png, .gif, .webp, etc.) - 可用于设计、文档制作
- 文档文件 (.pdf, .doc, .xls, .ppt, etc.) - 可用于本地编辑、存档
- 音频文件 (.mp3, .wav, etc.) - 可用于音频处理、转录
- 其他飞书支持的文件类型
典型使用场景
场景 1:视频内容发布
用户发送视频到飞书 → 下载到本地 → 发布到抖音/小红书/B 站
# 下载视频
python download.py --message-id "om_xxx" --file-key "file_xxx" --output ~/Videos
# 然后使用视频发布工具发布到各平台
场景 2:文档处理
收到飞书文档 → 下载到本地 → 编辑处理 → 重新上传或转发
python download.py --url "https://open.feishu.cn/im/xxx" --output ~/Documents
场景 3:图片素材收集
收集飞书群里的图片 → 批量下载 → 用于设计或存档
from download import FeishuMessageDownloader
downloader = FeishuMessageDownloader()
for msg in messages:
downloader.download_file(
message_id=msg['id'],
file_key=msg['file_key'],
output_dir="~/Pictures/Collection"
)
场景 4:AI 处理流程
下载飞书文件 → AI 分析/处理 → 生成报告或内容
# 下载视频
downloader = FeishuMessageDownloader()
result = downloader.download_file(message_id, file_key, "~/AI_Input")
# 使用 AI 处理
# ... AI 处理代码 ...
使用建议
- 批量下载:可以结合飞书消息列表 API,批量下载多个文件
- 自动命名:如果不指定 filename,会自动使用原始文件名
- 目录管理:建议按日期或项目分类保存文件
- 定期清理:下载后的文件记得定期清理,避免占用过多空间
API 端点
GET https://open.feishu.cn/open-apis/im/v1/messages/{message_id}/resources/{file_key}?type=file
返回结果
成功下载后返回保存的文件路径:
{
"success": True,
"file_path": "/path/to/downloaded/file.mp4",
"file_size": 1234567,
"filename": "file.mp4"
}
错误处理
可能的错误情况:
- 凭证无效或过期
- 消息不存在或无权访问
- 文件不存在或已过期
- 网络连接问题
注意事项
- 文件下载链接有过期时间,请及时下载(通常 7 天)
- 大文件下载可能需要较长时间,请耐心等待
- 确保应用有访问该消息的权限,否则无法下载
- 下载后的文件处理:
- 视频文件:可用于剪辑、转码、发布到视频平台
- 图片文件:可用于编辑、压缩、格式转换
- 文档文件:可用于内容提取、格式转换、打印
- 存储空间:定期清理下载的文件,避免占用过多磁盘空间
- 隐私合规:下载的文件仅供个人使用,注意数据安全和隐私保护
与其他 Skill 的配合
本 Skill 可以与以下类型的 Skill 配合使用:
| 配合 Skill 类型 | 使用场景 |
|---|---|
| 视频发布 Skill | 下载飞书视频 → 发布到抖音/小红书/B 站 |
| 视频处理 Skill | 下载视频 → 剪辑/转码/压缩 |
| AI 分析 Skill | 下载文件 → AI 分析/总结/提取 |
| 文档处理 Skill | 下载文档 → 编辑/转换/合并 |
| 云存储 Skill | 下载文件 → 上传到云盘/网盘 |
完整工作流程示例
飞书视频 → 抖音发布 完整流程
# 步骤 1:从飞书下载视频
python download.py \
--message-id "om_x100b523c2b77fd30c24abb58a94deee" \
--file-key "file_v3_0010e_dc672f40-87b6-4d67-b69d-e40290032c2g" \
--output ~/.openclaw/workspace \
--filename "douyin_video.mp4"
# 步骤 2:(可选)视频处理
# ffmpeg -i douyin_video.mp4 -c:v libx264 -c:a aac output.mp4
# 步骤 3:发布到抖音
# 使用抖音发布工具或手动上传
批量处理飞书文件
from download import FeishuMessageDownloader
import os
# 初始化下载器
downloader = FeishuMessageDownloader()
# 批量下载多个文件
messages = [
{"message_id": "om_xxx1", "file_key": "file_xxx1", "type": "video"},
{"message_id": "om_xxx2", "file_key": "file_xxx2", "type": "image"},
{"message_id": "om_xxx3", "file_key": "file_xxx3", "type": "document"},
]
output_base = "~/Downloads/Feishu_Files"
for msg in messages:
# 按类型分类保存
type_dir = os.path.join(output_base, msg['type'])
os.makedirs(type_dir, exist_ok=True)
result = downloader.download_file(
message_id=msg['message_id'],
file_key=msg['file_key'],
output_dir=type_dir
)
if result['success']:
print(f"✅ 下载成功:{result['file_path']}")
else:
print(f"❌ 下载失败:{result.get('error')}")
作者
勇哥的小飞侠 🧚🏻♀️🌸🧚🏻
安全使用建议
This skill implements a normal Feishu file downloader, but exercise caution before installing: (1) The code requires FEISHU_APP_ID and FEISHU_APP_SECRET (or an OpenClaw config) but the registry metadata did not declare these — do not supply credentials unless you trust the author. (2) The skill reads ~/.openclaw/openclaw.json if present; that file can contain other channel configs — inspect it before running. (3) The SKILL.md contained unicode control characters (a prompt‑injection signal); open the file in a plain text viewer and remove/verify any unexpected characters. (4) Inspect download.py fully (it appears to use only open.feishu.cn endpoints and local file writes) and run the script in a sandbox or isolated account with minimal permissions the first time. (5) If you plan to provide real credentials, create an app with minimal required permissions (im:resource) and rotate/revoke keys after testing. If you want, I can highlight exact lines in download.py and the SKILL.md that reference credentials, config paths, and the unicode control characters.
功能分析
Type: OpenClaw Skill
Name: feishu-message-download
Version: 1.0.0
The skill is a legitimate utility for downloading files from Feishu (Lark) messages using official API endpoints (open.feishu.cn). The code in `download.py` follows standard practices for authentication, token management, and file handling, with no evidence of data exfiltration, obfuscation, or malicious intent. It correctly identifies and uses configuration from environment variables or the OpenClaw config directory as described in the documentation.
能力标签
能力评估
Purpose & Capability
The code and instructions implement a Feishu file downloader and require FEISHU_APP_ID / FEISHU_APP_SECRET or an OpenClaw config; however the registry metadata lists no required environment variables or primary credential. That mismatch (skill will not work without credentials) is an incoherence that should have been declared.
Instruction Scope
SKILL.md and download.py instruct the agent to obtain tenant_access_token from Feishu and download resources via open.feishu.cn, and to read environment variables or ~/.openclaw/openclaw.json. That scope matches the stated purpose. However the SKILL.md contained detected unicode-control-chars (prompt-injection pattern) — this is suspicious for an instruction file intended to be interpreted by an LLM/evaluator and should be reviewed/cleaned.
Install Mechanism
No install spec (instruction-only plus a Python script). Only requires python3 and the requests dependency; no remote arbitrary downloads or unusual installers were specified.
Credentials
The skill legitimately needs Feishu app credentials (app id/secret) to obtain tenant_access_token, but those credentials are not declared in the registry metadata. The code also reads ~/.openclaw/openclaw.json if present (which may contain other channel configs) — while it only looks for feishu keys, loading that file is wider access than declared and should be documented.
Persistence & Privilege
The skill does not request always:true or system-wide changes and does not install persistent services. It reads user config files in the home directory and writes downloaded files to the specified output directory (expected behavior).
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install feishu-message-download - 安装完成后,直接呼叫该 Skill 的名称或使用
/feishu-message-download触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
feishu-message-download 1.0.0
- Initial release: Download files (videos, images, documents, etc.) from Feishu messages to local storage.
- Supports downloads via message URL, message ID + file_key, and command line usage.
- Compatible with a wide range of file types: video, image, document, audio, and more.
- Automatic retrieval of Feishu tenant_access_token and flexible configuration (OpenClaw or environment variables).
- Includes features for batch downloads, auto file naming, and directory management.
- Provides error handling for access, network, and file validity issues.
元数据
常见问题
飞书消息文件下载 是什么?
从飞书消息中下载文件(视频、图片、文档等)到本地. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 81 次。
如何安装 飞书消息文件下载?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-message-download」即可一键安装,无需额外配置。
飞书消息文件下载 是免费的吗?
是的,飞书消息文件下载 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
飞书消息文件下载 支持哪些平台?
飞书消息文件下载 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 飞书消息文件下载?
由 Cindypapa(@cindypapa)开发并维护,当前版本 v1.0.0。
推荐 Skills