feishu-drive

feishu-drive is a skill for Claude Code, Codex from alextangson/feishu_skills. It costs 24 tokens per session (1,966 once invoked), scanned A, original, MIT.

A Feishu cloud-drive file management skill. Feishu is a workplace collaboration platform, and this skill uses its Drive API to manage files and folders.

In plain words
What is it for?
It is for creating folders, listing or searching files, reading file and folder details, uploading or downloading files, and moving or copying items in Feishu Drive.
Why use it?
It provides the required authentication steps and API operations in one place, reducing mistakes when searching, moving, copying, or sharing cloud files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is TOKEN="$(./scripts/get_feishu_token.sh)".

Good fit It is for creating folders, listing or searching files, reading file and folder details, uploading or downloading files, and moving or copying items in Feishu Drive.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/alextangson/feishu_skills
agentmods
npx agentmods add skills/alextangson/feishu_skills/feishu-drive

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for feishu-drive

README.md
[![agentmods](https://agentmods.dev/badge/skills/alextangson/feishu_skills/feishu-drive/github.svg)](https://agentmods.dev/skills/alextangson/feishu_skills/feishu-drive)
Your own site
<a href="https://agentmods.dev/skills/alextangson/feishu_skills/feishu-drive"><img src="https://agentmods.dev/badge/skills/alextangson/feishu_skills/feishu-drive/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for feishu-drive

Your own site · 80×15
<a href="https://agentmods.dev/skills/alextangson/feishu_skills/feishu-drive"><img src="https://agentmods.dev/badge/skills/alextangson/feishu_skills/feishu-drive.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,966 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.01966
Opus 5 $0.00012 $0.00983
Sonnet 5 $0.00005 $0.00393
Haiku 4.5 $0.00002 $0.00197

Measured 11d ago against content hash d0dbdb664d23, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

feishu-drive scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

feishu-drive/SKILL.md · 177 lines

How it starts

The opening of the file, as written. The whole thing — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.

飞书云空间文件管理

通过 Drive API 管理文件和文件夹。

Base URL: https://open.feishu.cn/open-apis/drive/v1

认证与 Token 获取

feishu_skills 根目录执行共享脚本:

TOKEN="$(./scripts/get_feishu_token.sh)"

请求头统一使用 Authorization: Bearer ${TOKEN}

如果业务接口返回 token 无效、过期或 401,强制刷新后仅重试一次原请求:

TOKEN="$(./scripts/get_feishu_token.sh --force-refresh)"

环境变量:

  • FEISHU_APP_ID
  • FEISHU_APP_SECRET

本地缓存: ./.feishu_token_cache.json(未过期直接复用,默认提前 5 分钟刷新)


快速启动(必读)

为避免文件进入"私有黑盒":

  1. 创建锚点文件夹(如 AI-Workspace
  2. 授权机器人:文件夹【协作】设置中添加应用为【管理】权限
  3. 获取 Token:复制文件夹 URL 中的 Token
  4. 测试:调用 batch_query 查询该 Token

⚠️ API 创建的文件夹默认只对机器人可见,需手动添加协作者。


文件夹操作

API 端点 方法 请求体示例 说明
创建文件夹 /folders POST {"name":"文件夹名","folder_token":"root"} 创建新文件夹
获取文件夹元数据 /folders/{folder_token}/meta GET - 查询文件夹详情
获取元数据(批量) /metas/batch_query POST {"request_list":[{"token":"fldxxx","type":"folder"}]} 批量查询文件/文件夹
获取文件夹内容 /folders/{folder_token}/children GET - 查询文件夹内文件列表
移动文件夹 /folders/{folder_token}/move POST {"target_token":"fldxxx"} 移动文件夹
复制文件夹 /folders/{folder_token}/copy POST {"target_token":"fldxxx"} 复制文件夹
删除文件夹 /folders/{folder_token} DELETE - 删除空文件夹

文件上传

API 端点 方法 请求体 说明
小文件上传 /files/upload_all POST multipart/form-data 一次性上传(<20MB)
大文件预上传 /files/upload_prepare POST {"file_name":"big.zip","size":104857600} 初始化分片上传
分片上传 /files/upload_part POST multipart/form-data 上传单个分片
完成分片上传 /files/upload_finish POST {"upload_id":"xxx","block_num":10} 完成上传

小文件上传:

POST /files/upload_all
Content-Type: multipart/form-data

file_name=test.txt
parent_type=explorer
parent_node=fldXXX
file=<binary>

文件下载

API 端点 方法 说明
下载文件 /files/{file_token}/download GET 返回文件二进制流
获取文件元数据 /files/{file_token}/meta GET 查询文件详情
获取文件列表 /files GET 参数:folder_token 父文件夹

Read the full file on GitHub · 177 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 177 lines · 24 tokens per session scan A d0dbdb664d23

Subscribe to this mod's changes

feishu-drive is a skill published in the GitHub repository alextangson/feishu_skills (65 stars, last pushed 5mo ago), licensed MIT. It adds 24 tokens to every session and 1,966 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.