Agents Directory
SkillsRankingsAgents
CategoriesModelsBenchmarksCompareAgent LeaderboardSkillsRankingsAgentsAbout

lark-doc

SkillCommunityTranslated from Chinese

The lark-doc skill enables AI agents to interact with Feishu/Lark Docx documents using the v2 API. It supports creating, reading, editing, summarizing, and translating document content, as well as managing embedded media and whiteboards.

Compatibility:
Claude Code logoClaude CodeCodex logoCodexHermes logoHermesOpenClaw logoOpenClaw
Visit lark-doc
Install:
npx skills add open.feishu.cn/lark-doc
View on skills.sh

docs (v2)

Identity: Document operations use --as user by default. Execute lark-cli auth login before first use.

CRITICAL, API Version: This skill uses the v2 API. You must explicitly pass --api-version v2 when executing docs +create, docs +fetch, and docs +update.

# Common examples
lark-cli docs +fetch  --api-version v2 --doc "Document URL or token"
lark-cli docs +create --api-version v2 --content '<title>Title</title><p>Content</p>'
lark-cli docs +update --api-version v2 --doc "Document URL or token" --command append --content '<p>Content</p>'

Prerequisites, Read before performing operations

CRITICAL, Before performing any corresponding operation, you MUST use the Read tool to read the following files. All are required:

  1. ../lark-shared/SKILL.md, Authentication, permission handling, global parameters (common to all operations)
  2. Reading documents (docs +fetch --api-version v2) → Must read lark-doc-fetch.md (--scope / --detail selection, partial reading strategy, <fragment> / <excerpt> output structure)
  3. Creating or editing document content → Must read lark-doc-xml.md (XML syntax rules; switch to lark-doc-md.md only when the user explicitly requests Markdown); read lark-doc-create-workflow.md when creating from scratch; read lark-doc-update-workflow.md when editing existing documents.

Failure to read the above files before performing operations will result in incorrect parameter selection, formatting errors, or substandard styling.

Format Selection Rules (Global):

  • Creation / Import Scenarios (docs +create, or full-segment writing via docs +update --command append/overwrite): Both XML and Markdown are acceptable. If the user provides a local .md file or explicitly says "import Markdown", use Markdown directly; otherwise, default to XML (which supports callouts, grids, checkboxes, and other rich blocks).
  • Precision Editing Scenarios (local refinement commands for docs +update such as str_replace / block_insert_after / block_replace / block_delete / block_move_after): Prioritize XML (--doc-format xml, which is the default). XML reliably expresses block structures and styles, making local refinement more controllable; do not switch to Markdown just because it is simpler.

Quick Decision Making

  • When a user needs a "direct link / anchor link to a specific block": Return Document Base URL#block_id. If you only have the document URL and no block_id, first use docs +fetch --detail with-ids to obtain the target block ID.
  • Example:
    • Known document URL = https://xxx.feishu.cn/docx/doxcn123
    • Known block_id = blkcn456
    • Should return https://xxx.feishu.cn/docx/doxcn123#blkcn456
  • When a user needs to create, copy, or move resource blocks (whiteboards, spreadsheets, bitables, etc.) within a document, you must first read the "III. Resource Blocks" section of lark-doc-xml.md.
  • When writing documents, prioritize planning important information (core processes, architecture, comparisons, risks, roadmaps, key metrics, causal relationships) as whiteboards rather than using only text or tables.
  • New whiteboards must be isolated to a SubAgent: Simple diagrams are inserted directly by the SubAgent as <whiteboard type="svg">Full SVG</whiteboard> without reading lark-whiteboard; complex diagrams require the main Agent to first create a <whiteboard type="blank"></whiteboard> and then launch a SubAgent to read lark-whiteboard for writing.
  • When a user says "look at the images/attachments/materials in the document" or "preview materials" → Use lark-cli docs +media-preview.
  • When a user explicitly says "download materials" → Use lark-cli docs +media-download.
  • If the target is a whiteboard/whiteboard thumbnail → You must use lark-cli docs +media-download --type whiteboard (do not use +media-preview).
  • After obtaining a spreadsheet URL/token → Switch to lark-sheets for object-level operations.
  • When a user says "add a comment to the document", "view comments", "reply to a comment", or "add/delete an emoji reaction to a comment" → Switch to lark-drive to handle it.
  • When embedded <sheet>, <bitable>, or <cite file-type="sheets|bitable"> tags appear in document content → You must proactively extract the token and switch to the corresponding skill to drill down and read the internal data; do not simply present the tag itself.
Tag / AttributeExtracted FieldSwitch to Skill
<sheet token="..." sheet-id="...">token -> spreadsheet_token, sheet-idlark-sheets
<bitable token="..." table-id="...">token -> app_token, table-idlark-base
<cite type="doc" file-type="sheets" token="..." sheet-id="...">Same as <sheet>lark-sheets
<cite type="doc" file-type="bitable" token="..." table-id="...">Same as <bitable>lark-base
<vc-transcribe-tab vc-node-id="...">vc-node-id -> note_idlark-note: First note +detail --note-id <vc-node-id>
<synced_reference src-token="..." src-block-id="...">src-token -> doc_token, src-block-id -> block_idUse docs +fetch --api-version v2 to read the src-token document and locate the block

Shortcuts (Recommended)

Shortcuts are advanced wrappers for common operations (lark-cli docs +<verb> [flags]). Prioritize using operations that have Shortcuts.

ShortcutDescription
+createCreate a Lark document (XML / Markdown)
+fetchFetch Lark document content (XML / Markdown)
+updateUpdate a Lark document (str_replace / block_insert_after / block_replace / ...)
+media-insertInsert a local image or file at the end of a Lark document (4-step orchestration + auto-rollback). Prefer --from-clipboard when the image is already on the system clipboard (screenshots, copy from Feishu/browser); use --file only for on-disk sources.
+media-downloadDownload document media or whiteboard thumbnail (auto-detects extension)
+media-previewPreview document media file (auto-detects extension)
+whiteboard-updateAlias of whiteboard +update. Update an existing whiteboard with DSL, Mermaid or PlantUML. Prefer whiteboard +update; refer to lark-whiteboard skill for details.

Out of Scope

  • Document comment management → lark-drive
  • Data operations for spreadsheets or Base → lark-sheets / lark-base
  • Cloud storage file upload, download, and permission management → lark-drive

docs (v2)

身份:文档操作默认使用 --as user。首次使用前执行 lark-cli auth login。

CRITICAL — API 版本:本 skill 使用 v2 API。执行 docs +create、docs +fetch、docs +update 时必须显式传入 --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 +update 的 str_replace / block_insert_after / block_replace / block_delete / block_move_after 等局部精修指令):优先使用 XML(--doc-format xml,即默认值)。XML 能稳定表达 block 结构和样式,局部精修更可控;不要因为 Markdown 更简单就自行切换。

快速决策

  • 用户需要“某个 block 的直达链接 / 锚点链接”时:返回 文档基础 URL#block_id。如果当前只有文档 URL 没有 block_id,先用 docs +fetch --detail with-ids 拿到目标 block 的 id
  • 例:
    • 已知文档 URL = https://xxx.feishu.cn/docx/doxcn123
    • 已知 block_id = blkcn456
    • 应返回 https://xxx.feishu.cn/docx/doxcn123#blkcn456
  • 用户需要在文档内创建、复制或移动资源块(画板、电子表格、多维表格等)时,必须先读取 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)
  • 拿到 spreadsheet URL/token 后 → 切到 lark-sheets 做对象内部操作
  • 用户说"给文档加评论""查看评论""回复评论""给评论加/删除表情 reaction" → 切到 lark-drive 处理
  • 文档内容中出现嵌入的 <sheet>、<bitable> 或 <cite file-type="sheets|bitable"> 标签时 → 必须主动提取 token 并切到对应技能下钻读取内部数据,不能只呈现标签本身
标签 / 属性提取字段切到技能
<sheet token="..." sheet-id="...">token -> spreadsheet_token, sheet-idlark-sheets
<bitable token="..." table-id="...">token -> app_token, table-idlark-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
<vc-transcribe-tab vc-node-id="...">vc-node-id -> note_idlark-note:先 note +detail --note-id <vc-node-id>
<synced_reference src-token="..." src-block-id="...">src-token -> doc_token, src-block-id -> block_id用 docs +fetch --api-version v2 读取 src-token 文档,定位 block

Shortcuts(推荐优先使用)

Shortcut 是对常用操作的高级封装(lark-cli docs +<verb> [flags])。有 Shortcut 的操作优先使用。

Shortcut说明
+createCreate a Lark document (XML / Markdown)
+fetchFetch Lark document content (XML / Markdown)
+updateUpdate a Lark document (str_replace / block_insert_after / block_replace / ...)
+media-insertInsert a local image or file at the end of a Lark document (4-step orchestration + auto-rollback). Prefer --from-clipboard when the image is already on the system clipboard (screenshots, copy from Feishu/browser); use --file only for on-disk sources.
+media-downloadDownload document media or whiteboard thumbnail (auto-detects extension)
+media-previewPreview document media file (auto-detects extension)
+whiteboard-updateAlias of whiteboard +update. Update an existing whiteboard with DSL, Mermaid or PlantUML. Prefer whiteboard +update; refer to lark-whiteboard skill for details.

不在本 Skill 范围

  • 文档评论管理 → lark-drive
  • 电子表格或 Base 的数据操作 → lark-sheets / lark-base
  • 云空间文件上传、下载、权限管理 → lark-drive
Categories:
Document ProcessingProductivity
Share:
Details:
  • Installs


    275,841
  • First seen


    Jun 10, 2026
View Repository

Auto-fetched from GitHub 10 hours ago.

Stats via skills.sh.

Skills similar to lark-doc:

Website favicon

 

 
 
  • Installs


Website favicon

 

 
 
  • Installs


Website favicon

 

 
 
  • Installs


Browse:SkillsRankingsModelsBenchmarksProvidersAgentsAgent LeaderboardCompareCategories
Quick Links:AboutBlog

© 2026 Agents Directory

Skills similar to lark-doc:

lark-drive

Skill
This skill provides comprehensive management for Lark Drive (also known as Feishu Cloud Storage). It enables users to upload, download, organize, and search files, as well as manage document permissions, comments, and metadata. Additionally, it supports importing local files like Word, Excel, and Markdown into online Lark documents.
Productivity
Manage files, folders, and permissions in Lark Drive.
  • Installs


    275,739

lark-sheets

Skill
This skill enables AI agents to interact with Lark (Feishu) online spreadsheets. It supports creating and managing spreadsheets, manipulating sheet structures, reading and writing cell data, performing batch operations, and managing objects like charts, pivot tables, and conditional formatting.
Document ProcessingProductivity
Manage and manipulate Lark online spreadsheets.
  • Installs


    275,586

lark-slides

Skill
This skill enables AI agents to create and edit Lark Slides presentations. It supports managing slide pages, including creation, deletion, and content replacement, while handling media uploads and template-based generation.
Document ProcessingProductivity
Create and edit Lark Slides presentations.
  • Installs


    275,467