Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
larksuite avatar

Lark Doc

  • 391k installs
  • 15.9k repo stars
  • Updated July 28, 2026
  • larksuite/cli

lark-doc is a CLI skill for reading and editing Feishu cloud documents (docx and wiki).

About

lark-doc enables agents to read and edit Feishu cloud documents (docx and wiki documents). It supports creating documents from scratch, fetching content in XML or Markdown, patching local changes, inserting media, and managing revisions.

  • Read and edit Lark (Feishu) document content in XML or Markdown format
  • Create documents, fetch, update, patch content, manage media and attachments
  • Supports rich text, tables, code blocks, links and whiteboard integration

Lark Doc by the numbers

  • 390,773 all-time installs (skills.sh)
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

lark-doc capabilities & compatibility

Use cases
documentation
Runs
Remote server
Pricing
Bring your own API key
npx skills add https://github.com/larksuite/cli --skill lark-doc

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs391k
repo stars15.9k
Security audit2 / 3 scanners passed
Last updatedJuly 28, 2026
Repositorylarksuite/cli

How do you read and edit Feishu docs from CLI?

Read, create, and edit Feishu/Lark documents with support for rich text, media, and version history.

Who is it for?

Teams building documents in Feishu who need to automate content creation and updates.

Skip if: Skip lark-doc for pure multidimensional-table CRUD or chat messaging—use lark-base or lark-im instead.

When should I use this skill?

When you need to create, read, edit, or manage Feishu document content.

What you get

Created or updated Lark Docx content, fetched document text, and extracted tokens for downstream Base or whiteboard skills.

  • updated Lark Docx
  • fetched document content

By the numbers

  • Requires lark-cli docs commands with --api-version v2
  • Supports DocxXML and Markdown document formats

Files

SKILL.mdMarkdownGitHub ↗

docs (v2)

⚠️ API 版本:本 skill 使用 v2 API。所有 `docs +create --api-version v2`、`docs +fetch --api-version v2`、`docs +update --api-version v2` 命令必须携带 `--api-version v2`。
# 常用示例
lark-cli docs +fetch  --api-version v2 --doc "文档URL或token"
lark-cli docs +create --api-version v2 --content '<title>标题</title><p>内容</p>'
lark-cli docs +update --api-version v2 --doc "文档URL或token" --command append --content '<p>内容</p>'

前置条件 — 执行操作前必读

CRITICAL — 执行对应操作前,MUST 先用 Read 工具读取以下文件,缺一不可: 1. `../lark-shared/SKILL.md` — 认证、权限处理、全局参数(所有操作通用) 2. 读取文档(`docs +fetch --api-version v2`) → 必读 `lark-doc-fetch.md`--scope / --detail 选择、局部读取策略、<fragment> / <excerpt> 输出结构) 3. 创建或编辑文档内容 → 必读 `lark-doc-xml.md`(XML 语法规则,仅当用户明确要求 Markdown 时改读 `lark-doc-md.md`);从零创建时加读 `lark-doc-create-workflow.md`;编辑已有文档时加读 `lark-doc-update-workflow.md`

未读完以上文件就执行相应操作会导致参数选择错误、格式错误或样式不达标。

格式选择规则(全局):
- 创建 / 导入场景docs +create,或 docs +update --command append/overwrite 的整段写入):XML 和 Markdown 都可以。用户提供 .md 本地文件、或明确说"导入 Markdown"时,直接用 Markdown;否则默认 XML(可用 callout、grid、checkbox 等富 block)。
- 精准编辑场景docs +updatestr_replace / block_insert_after / block_replace / block_delete / block_move_after 等局部精修指令):优先使用 XML(--doc-format xml,即默认值)。XML 能稳定表达 block 结构和样式,局部精修更可控;不要因为 Markdown 更简单就自行切换。

快速决策

  • 用户需要在文档内创建、复制或移动资源块(画板、电子表格、多维表格等)时,必须先读取 `lark-doc-xml.md` 的「三、资源块」章节
  • 写文档时,重要信息(核心流程、架构、对比、风险、路线图、关键指标、因果关系)优先规划为画板,不要只用文字或表格承载
  • 新增画板必须隔离到 SubAgent:简单图由 SubAgent 直接插入 <whiteboard type="svg">完整 SVG</whiteboard>,不读 lark-whiteboard;复杂图才由主 Agent 先建 <whiteboard type="blank"></whiteboard>,再启动 SubAgent 读取 lark-whiteboard 写入
  • 用户说"看一下文档里的图片/附件/素材""预览素材" → 用 lark-cli docs +media-preview
  • 用户明确说"下载素材" → 用 lark-cli docs +media-download
  • 如果目标是画板/whiteboard/画板缩略图 → 只能用 lark-cli docs +media-download --type whiteboard(不要用 +media-preview
  • 用户说"找一个表格""按名称搜电子表格""找报表""最近打开的表格""最近我编辑过的 xxx" → 直接用 lark-cli drive +search(参考 `lark-drive`)。老的 `docs +search` 已进入维护期、后续会下线,不要再新增依赖。
  • drive +search 结果里会直接返回 SHEET / Base / FOLDER 等云空间对象,是资源发现的统一入口
  • 拿到 spreadsheet URL/token 后 → 切到 lark-sheets 做对象内部操作
  • 用户说"给文档加评论""查看评论""回复评论""给评论加/删除表情 reaction" → 切到 lark-drive 处理
  • 文档内容中出现嵌入的 <sheet><bitable><cite file-type="sheets|bitable"> 标签时 → 必须主动提取 token 并切到对应技能下钻读取内部数据,不能只呈现标签本身
标签 / 属性提取字段切到技能
<sheet token="..." sheet-id="...">token -> spreadsheet_token, sheet-id`lark-sheets`
<bitable token="..." table-id="...">token -> app_token, table-id`lark-base`
<cite type="doc" file-type="sheets" token="..." sheet-id="..."><sheet>`lark-sheets`
<cite type="doc" file-type="bitable" token="..." table-id="..."><bitable>`lark-base`
<synced_reference src-token="..." src-block-id="...">src-token -> doc_token, src-block-id -> block_iddocs +fetch --api-version v2 读取 src-token 文档,定位 block

补充: 云空间资

Related skills

How it compares

Use lark-doc for Docx/Wiki body editing; switch to lark-base or lark-wiki for Bitable records or knowledge-space node management.

FAQ

Which API version does lark-doc require?

lark-doc mandates lark-cli docs commands use --api-version v2 for +create, +fetch, and +update. Default content format is DocxXML, with Markdown also supported for create and update operations.

When should lark-doc hand off to another Lark skill?

lark-doc reads and extracts tokens from embedded spreadsheets, multidimensional tables, and whiteboard SVG blocks first, then routes follow-up work to lark-base or lark-whiteboard instead of handling table CRUD directly.

Is Lark Doc safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Documentationdocsintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.