lark-doc
Skill640 starsChanged 7 months agoMITView on GitHub
飞书云文档:创建和编辑飞书文档。从 Markdown 创建文档、获取文档内容、更新文档(追加/覆盖/替换/插入/删除)、上传和下载文档中的图片和文件、搜索云空间文档。当用户需要创建或编辑飞书文档、读取文档内容、在文档中插入图片、搜索云空间文档时使用;如果用户是想按名称或关键词先定位电子表格、报表等云空间对象,也优先使用本 skill 的 docs +search 做资源发现。
Files
docs (v1)
CRITICAL — 开始前 MUST 先用 Read 工具读取 ../lark-shared/SKILL.md,其中包含认证、权限处理
核心概念
文档类型与 Token
飞书开放平台中,不同类型的文档有不同的 URL 格式和 Token 处理方式。在进行文档操作(如添加评论、下载文件等)时,必须先获取正确的 file_token。
文档 URL 格式与 Token 处理
| URL 格式 | 示例 | Token 类型 | 处理方式 |
/docx/ | https://example.larksuite.com/docx/doxcnxxxxxxxxx | file_token | URL 路径中的 token 直接作为 file_token 使用 |
/doc/ | https://example.larksuite.com/doc/doccnxxxxxxxxx | file_token | URL 路径中的 token 直接作为 file_token 使用 |
/wiki/ | https://example.larksuite.com/wiki/wikcnxxxxxxxxx | wiki_token | ⚠️ 不能直接使用,需要先查询获取真实的 obj_token |
/sheets/ | https://example.larksuite.com/sheets/shtcnxxxxxxxxx | file_token | URL 路径中的 token 直接作为 file_token 使用 |
/drive/folder/ | https://example.larksuite.com/drive/folder/fldcnxxxx | folder_token | URL 路径中的 token 作为文件夹 token 使用 |
Wiki 链接特殊处理(关键!)
知识库链接(/wiki/TOKEN)背后可能是云文档、电子表格、多维表格等不同类型的文档。不能直接假设 URL 中的 token 就是 file_token,必须先查询实际类型和真实 token。
处理流程
- 使用
wiki.spaces.get_node查询节点信息lark-cli wiki spaces get_node --params '{"token":"wiki_token"}' - 从返回结果中提取关键信息
node.obj_type:文档类型(docx/doc/sheet/bitable/slides/file/mindnote)node.obj_token:真实的文档 token(用于后续操作)node.title:文档标题
根据
obj_type使用对应的 APIobj_type 说明 使用的 API docx新版云文档 drive file.comments.*、docx.*doc旧版云文档 drive file.comments.*sheet电子表格 sheets.*bitable多维表格 bitable.*slides幻灯片 drive.*file文件 drive.*mindnote思维导图 drive.*
查询示例
# 查询 wiki 节点
lark-cli wiki spaces get_node --params '{"token":"wiki_token"}'返回结果示例:
{
"node": {
"obj_type": "docx",
"obj_token": "xxxx",
"title": "标题",
"node_type": "origin",
"space_id": "12345678910"
}
}资源关系
Wiki Space (知识空间)
└── Wiki Node (知识库节点)
├── obj_type: docx (新版文档)
│ └── obj_token (真实文档 token)
├── obj_type: doc (旧版文档)
│ └── obj_token (真实文档 token)
├── obj_type: sheet (电子表格)
│ └── obj_token (真实文档 token)
├── obj_type: bitable (多维表格)
│ └── obj_token (真实文档 token)
└── obj_type: file/slides/mindnote
└── obj_token (真实文档 token)
Drive Folder (云空间文件夹)
└── File (文件/文档)
└── file_token (直接使用)重要说明:画板编辑
⚠️ lark-doc skill 不能直接编辑已有画板内容,但
docs +update可以新建空白画板
场景 1:已通过 docs +fetch 获取到文档内容和画板 token
如果用户已经通过 docs +fetch 拉取了文档内容,并且文档中已有画板(返回的 markdown 中包含 <whiteboard token="xxx"/> 标签),请引导用户:
- 记录画板的 token
- 查看
../lark-whiteboard/SKILL.md了解如何编辑画板内容
场景 2:刚创建画板,需要编辑
如果用户刚通过 docs +update 创建了空白画板,需要编辑时:
步骤 1:按空白画板语法创建
- 在
--markdown中直接传<whiteboard type="blank"></whiteboard> - 需要多个空白画板时,在同一个
--markdown里重复多个 whiteboard 标签 步骤 2:从响应中记录 token docs +update成功后,读取响应字段data.board_tokensdata.board_tokens是新建画板的 token 列表,后续编辑直接使用这里的 token 步骤 3:引导编辑- 记录需要编辑的画板 token
- 查看
../lark-whiteboard/SKILL.md了解如何编辑画板内容
注意事项
- 已有画板内容无法通过 lark-doc 的
docs +update直接编辑 - 编辑画板需要使用专门的
../lark-whiteboard/SKILL.md
快速决策
- 用户说“找一个表格”“按名称搜电子表格”“找报表”“最近打开的表格”,先用
lark-cli docs +search做资源发现。 docs +search不是只搜文档 / Wiki;结果里会直接返回SHEET等云空间对象。- 拿到 spreadsheet URL / token 后,再切到
lark-sheets做对象内部读取、筛选、写入等操作。
补充说明
docs +search 除了搜索文档 / Wiki,也承担“先定位云空间对象,再切回对应业务 skill 操作”的资源发现入口角色;当用户口头说“表格 / 报表”时,也优先从这里开始。
Shortcuts(推荐优先使用)
Shortcut 是对常用操作的高级封装(lark-cli docs +<verb> [flags])。有 Shortcut 的操作优先使用。
| Shortcut | 说明 |
+search | Search Lark docs, Wiki, and spreadsheet files (Search v2: doc_wiki/search) |
+create | Create a Lark document |
+fetch | Fetch Lark document content |
+update | Update a Lark document |
+media-insert | Insert a local image or file at the end of a Lark document (4-step orchestration + auto-rollback) |
+media-download | Download document media or whiteboard thumbnail (auto-detects extension) |
+whiteboard-update | Update an existing whiteboard in lark document with whiteboard dsl. Such DSL input from stdin. refer to lark-whiteboard skill for more details. |
Other versions11 projects use a version of this.
Word for word · 2
- liangdabiao/lark-workflow-feishu-cli★ 66100% same
- SpaceZephyr/allSkills★ 14100% same
Edited · 5
- 7emotions/lark-skills★ 276% same
- HanksChen0110/skills★ 212% same
- pengt1993/claude-skills★ 112% same
- anyhui/hermes-skills★ 089% same
- MarvinLi0216/claude-skills★ 015% same
Wrote their own version · 4
- larksuite/cli★ 18ksame name
- IWanalq/doubao-office-skills★ 14same name
- benmix/skills★ 1same name
- leishifu666/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.
Used alongsideProjects with it also use lark-attendance and lark-okr.
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.
7emotionsSkilllark-attendance
飞书考勤打卡:查询自己的考勤打卡记录
Also in 3 projects that use this
7emotionsSkilllark-okr
飞书 OKR:管理目标与关键结果。查看和编辑 OKR 周期、目标(Objective)、关键结果(Key Result)、对齐关系、量化指标。当用户需要查看或创建 OKR、管理目标和关键结果、查看对齐关系时使用。
Also in 3 projects that use this
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-browserSkill
- docxSkill
- pdfSkill
- pptxSkill
- xlsxSkill
- byted-web-searchSkill
- design-mdSkill
- find-skillsSkill
- github-issuesSkill
- lark-approvalSkill
- lark-baseSkill
- lark-calendarSkill
- lark-contactSkill
- lark-driveSkill
- lark-eventSkill
- lark-imSkill
- lark-mailSkill
- lark-minutesSkill
- lark-openapi-explorerSkill
- lark-sharedSkill
- lark-sheetsSkill
- lark-skill-makerSkill
- lark-taskSkill
- lark-vcSkill
- lark-whiteboardSkill
- lark-wikiSkill
- lark-workflow-meeting-summarySkill
- lark-workflow-standup-reportSkill
- mcporterSkill
- minimax-docxSkill
- minimax-pdfSkill
- minimax-xlsxSkill
- native-mcpSkill
- planSkill
- skill-creatorSkill
- systematic-debuggingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

