feishu-doc
Skill0 starsChanged 9 months agoMITView on GitHub
Reads and writes Feishu/Lark wiki and docx documents via Open API (app_id/app_secret). Supports large tables (auto-split into ≤9-row native tables). Use when the user provides a Feishu document URL and needs to read or update its content. Run via python3 in terminal, do not open browser.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- CatCatUncle/openworkbuddytheir own version, first seen Oct 2, 2026
- wulaosiji/skillstheir own version, first seen Sep 9, 2026
- weininghui/skillstheir own version, first seen Aug 23, 2026
- yangwhale/CloseCrabtheir own version, first seen Aug 18, 2026
- Zuojuzhang/my_claude_code_agent_configtheir own version, first seen Aug 7, 2026
- zrt-ai-lab/opencode-skillstheir own version, first seen Jul 13, 2026
Used with
Projects with it also use skill-creator.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillskill-creator
Guide for creating effective GitHub Copilot skills (.github/skills/) in this repository. Use when creating a new skill, updating an existing skill, or when asked about skill structure, format, or best practices for the vscode-documentdb project.
Also in 4 projects that use this
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- zrt-ai-lab/opencode-skills★ 287same name
- CatCatUncle/openworkbuddy★ 259same name
- wulaosiji/skills★ 28same name
- Zuojuzhang/my_claude_code_agent_config★ 18same name
- yangwhale/CloseCrab★ 4same name
- weininghui/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- yapi-fetchSkill
The file
Files
feishu-doc
通过飞书开放平台 Open API 读取和写入飞书文档内容,输出结构化 JSON(包含 markdown 格式的文档内容)。
重要:通过 scripts/ 目录下的 Python 脚本获取/修改文档内容,无需打开浏览器。请直接在终端执行脚本。
When to Use
- User provides a Feishu wiki/docx URL and needs the document content
- Reading Feishu documents as requirements or design references
- Writing or appending content to Feishu documents
调用方式
在 feishu-doc skill 根目录执行以下命令(SKILL.md 与 scripts/ 同级)。
如不在 skill 根目录,可先进入目录:
- Windsurf:
cd ~/.codeium/windsurf/skills/feishu-doc - Cursor:
cd ~/.cursor/skills/feishu-doc
读取文档:
python3 scripts/index.py read "<Feishu_URL>"清空文档(删除所有内容,写入前需先确认再清空):
python3 scripts/index.py clear "<Feishu_URL>"写入文档(全量写入,第一个 H1 设为文档标题):
python3 scripts/index.py write "<Feishu_URL>" "<content_file>"追加内容(在文档末尾追加,不修改标题和已有内容):
python3 scripts/index.py append "<Feishu_URL>" "<content_file>"定点插入(按标题/文本定位,支持模糊匹配和正则):
python3 scripts/index.py insert-targeted "<Feishu_URL>" "<content_file>" \
--anchor-type heading --anchor "技术方案" --match fuzzy --position section_end删除章节(先删子章节/内容,再删标题):
python3 scripts/index.py delete-section "<Feishu_URL>" \
--anchor "技术方案" --match fuzzy⚠️
insert-targeted和delete-section默认都需要确认:会先输出预览,输入yes才执行。 非交互场景请显式传--yes。
URL Format
支持格式:
https://xxx.feishu.cn/wiki/TOKENhttps://xxx.feishu.cn/docx/TOKEN
示例:https://xxx.feishu.cn/wiki/XPK4w1xGDi4ntbkdc2Mcu1FVnac
认证配置
支持两种认证方式,优先使用个人授权。
方式1:个人授权(推荐)
使用 user_access_token,能访问你个人有权限的所有文档,无需逐个授权。
前置步骤:
- 在 https://open.feishu.cn/app 创建企业自建应用
- 申请权限:
docx:document:readonly、docx:document - 安全设置 → 重定向 URL → 添加
http://127.0.0.1:9999/callback - 发布应用
首次登录:
python3 scripts/login.py浏览器会自动打开飞书授权页,点击授权后 token 自动保存。
- access_token 有效期 2 小时,脚本自动用 refresh_token 刷新
- refresh_token 有效期 30 天,过期后重新运行
login.py
退出登录:
python3 scripts/login.py logout重新登录(token 过期或切换账号):
python3 scripts/login.py logout && python3 scripts/login.py方式2:应用授权
使用 tenant_access_token,需要将文档/知识库分享给应用。
前置步骤:同方式1的步骤1-2,然后在飞书中将文档「分享」给该应用。
.feishu 格式
app_id=cli_xxxx
app_secret=xxxx输出结构
读取(read):
{
"docUrl": "https://...",
"title": "文档标题",
"blockCount": 42,
"markdown": "# 文档标题\n\n文档内容...",
"rawContent": "纯文本内容..."
}清空(clear):
{
"docUrl": "https://...",
"action": "clear",
"blocksDeleted": 42,
"status": "success"
}写入(write):
{
"docUrl": "https://...",
"action": "write",
"blocksAdded": 5,
"status": "success"
}定点插入(insert-targeted):
{
"docUrl": "https://...",
"action": "insert-targeted",
"anchor": "技术方案",
"position": "section_end",
"blocksAdded": 3,
"status": "success"
}删除章节(delete-section):
{
"docUrl": "https://...",
"action": "delete-section",
"anchor": "技术方案",
"blocksDeleted": 8,
"status": "success"
}写入支持的格式
- 标题(H1~H9,第一个 H1 自动设为文档标题)
- 代码块(自动识别 Java、SQL、JSON、Python、Go、Shell、mermaid 等语言)
- 无序列表、有序列表
- 待办事项(
- [ ]/- [x]) - 引用(渲染为飞书 Callout 容器)
- 表格(自动拆分为飞书原生表格,每个子表最多 8 行数据 + 1 行表头,大表格无缝支持)
- 分割线
- 行内样式:加粗、
行内代码、删除线、超链接
前置条件
- 需 python3(macOS/Linux 自带,Windows 需安装)
- 飞书开放平台应用需有目标文档的访问权限
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

