微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📎

飞书文件传输与管理助手

feishu-file · vlatest
专业技能 安全 A 级 作者 Unknown 公开目录收录
1.2k 下载 363 安装 3.7k 收藏 65.7k 浏览

简介

基于飞书 Open API 的企业级文件管理工具,支持上传下载与消息发送,需配合 feishu-common 使用,适合自动化办公场景。

原始描述

Manage file uploads and downloads via Feishu API.

通过你的 Agent 添加

点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。

或者手动安装

Claude Codeunzip -o skill.zip -d ~/.claude/skills/feishu-file/
其它 Agent解压到它自己的 skills 目录,目录名用 feishu-file

包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。 技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。

中文使用说明 来自收录源

功能概述

Feishu File Skill 是一款专为飞书(Feishu/Lark)生态设计的文件管理工具,通过 Node.js 封装官方 API,提供文件上传、下载及消息发送三大核心功能。该 Skill 采用模块化架构,与 feishu-common 共享认证层,实现 token 复用和权限统一管理。

核心用法

  • Send File:node skills/feishu-file/send.js --target <chat_id_or_user_id> --file <local_path> — 上传本地文件并直接发送至指定聊天会话或用户
  • Upload Only:node skills/feishu-file/upload.js --file <local_path> — 静默上传获取 file_key,适用于卡片消息或富文本嵌入场景
  • Download File:node skills/feishu-file/download.js --message-id <msg_id> --file-key <file_key> --output <local_path> — 从消息中提取文件资源,需确保 Bot 已在目标群中并具备 im:resource:read 权限

显著优点

  1. 官方 API 合规:所有端点均为 open.feishu.cn 官方域名,TLS 1.2+ 加密传输
  2. 零敏感信息泄露:依赖环境变量(FEISHU_APP_ID、FEISHU_APP_SECRET)完成认证,无硬编码密钥
  3. 依赖极简:仅引入 commander(CLI 解析)与 dotenv(配置加载),CVE 风险极低
  4. 权限边界清晰:下载功能明确声明所需 scope,符合飞书权限最小化原则

潜在局限

  • 前置依赖:必须预先安装并配置 feishu-common,独立运行受限
  • 社区维护:T3 级来源,无可信组织背书,长期维护稳定性存疑
  • 功能单一:聚焦 IM 文件场景,缺乏企业级批量处理或异步队列能力
  • 错误信息暴露:部分 API 异常可能泄露内部细节,需用户自行包装

适合人群

  • 已搭建飞书 Bot 的开发者/运维团队
  • 需要轻量级文件收发自动化的中小企业
  • 低代码/无代码平台集成飞书能力的中间件开发者

常规风险

  • 凭证泄露风险:.env 文件若未妥善保管,可能导致 App Secret 外泄
  • 权限扩散:im:resource:read 需用户主动评估是否过度授权
  • API 限流:高频调用可能触发飞书平台速率限制
  • 消息可见性:下载文件时 Bot 必须在群内,历史消息不可回溯

技能正文

Feishu File Skill

Manage file uploads and downloads via Feishu API.

Prerequisites

  • Install feishu-common first.
  • This skill depends on ../feishu-common/index.js for token and API auth.

Commands

Send File

Upload a local file and send it to a chat or user.

node skills/feishu-file/send.js --target <chat_id_or_user_id> --file <local_path>

Upload Only

Upload a file and get its file_key (for use in cards or rich text).

node skills/feishu-file/upload.js --file <local_path>

Download File

Download a file resource from a message.

node skills/feishu-file/download.js --message-id <msg_id> --file-key <file_key> --output <local_path>

Note: The bot must have access to the message (be in the chat). For files sent by others, the im:resource:read scope is required.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

officeapiautomationcontent-mediaproductivity

同类 Skill