lark-doc

lark-doc is a skill for Claude Code, Codex from davidtoby/agent-skills. It costs 162 tokens per session (2,600 once invoked), scanned A, original, MIT.

A tool for reading and editing Feishu cloud documents, including document pages and wiki entries. Feishu is a workplace collaboration platform commonly used for shared documents and knowledge bases.

In plain words
What is it for?
Use it to fetch, create, update, append to, or download Feishu documents and their image attachments.
Why use it?
It lets an agent work with documents stored in Feishu instead of leaving their contents disconnected from the task.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/davidtoby/agent-skills/lark-doc
Any agent
npx skills add davidtoby/agent-skills --skill lark-doc
Clone the repo
git clone --depth 1 https://github.com/davidtoby/agent-skills

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 lark-doc

README.md
[![agentmods](https://agentmods.dev/badge/skills/davidtoby/agent-skills/lark-doc.svg)](https://agentmods.dev/skills/davidtoby/agent-skills/lark-doc)
Your own site
<a href="https://agentmods.dev/skills/davidtoby/agent-skills/lark-doc"><img src="https://agentmods.dev/badge/skills/davidtoby/agent-skills/lark-doc.svg" alt="Measured on agentmods" height="20"></a>
Per session 162 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,600 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00162 $0.02600
Opus 5 $0.00081 $0.01300
Sonnet 5 $0.00032 $0.00520
Haiku 4.5 $0.00016 $0.00260

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

Security

Grade A, and why

lark-doc 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/doc_word_stat.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • lark-doc — 95% identical, 12 lines differ
skills/lark-doc/SKILL.md · 85 lines

How it starts

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

docs

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

# 常用示例
lark-cli docs +fetch --doc "文档URL或token;若 URL 存在 #share-... 锚点,优先使用锚点方式读取,不要全文拉取"
lark-cli docs +create --content '<title>标题</title><p>内容</p>'
lark-cli docs +update --doc "文档URL或token" --command append --content '<p>内容</p>'

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

CRITICAL — 执行对应操作前,MUST 先用 Read 工具读取以下文件,缺一不可:

  1. ../lark-shared/SKILL.md — 认证、权限处理、全局参数(所有操作通用)
  2. 读取文档(docs +fetch → 必读 lark-doc-fetch.md--scope / --detail 选择、局部读取策略、<fragment> / <excerpt> 输出结构)
  3. 创建或编辑文档内容 → 必读 lark-doc-xml.md(XML 语法规则,仅当用户明确要求 Markdown 时改读 lark-doc-md.md)和必读 lark-doc-style.md(写作原则:默认段落、按体裁、组件克制);从零创建时加读 lark-doc-create-workflow.md;编辑已有文档时加读 lark-doc-update.mdlark-doc-update-workflow.md

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

格式选择规则(全局):

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

快速决策

  • 用户要复制文档 / 创建文档副本 / 另存为副本时,切到 lark-drive,按其中的复制指引使用 lark-cli drive files copy;不要用 docs +fetch + docs +create 重建正文,也不要走 drive +export / drive +import
  • 先判定任务路径:找文档 / 导入导出走 lark-drive;只读 / 摘要用 docs +fetch 默认 simple;明确旧文本 → 新文本直接 str_replace;只有 block 链接、评论锚点、插入 / 替换 / 删除 / 移动才局部 fetch with-ids;保真改写已有内容才读 full
  • block 直达链接格式:文档基础 URL#block_id;没有 block_id 时局部 fetch with-ids
  • 连续执行多个文档写操作时,必须按 lark-doc-update.md 的「Block ID 生命周期」判断旧 block ID 是否还能复用;overwrite / block_replace / block_delete 后不要复用受影响的旧 ID,插入 / 复制后要重新 fetch 才能拿到新 block ID
  • 用户需要在文档内创建、复制或移动资源块(画板、电子表格、多维表格等)时,必须先读取 lark-doc-xml.md 的「三、资源块」章节
  • 写文档时,由内容和用户意图决定表达形式;流程、架构、路线图、关键指标等信息可以使用画板,但不要默认把重要信息都画板化
  • 新增或更新画板时,按 lark-doc-whiteboard.md 选型;Mermaid 可由主 Agent 直接插入,SVG / 复杂图 / 已有画板更新按其中流程隔离到 SubAgent
  • 用户说"看一下文档里的图片/附件/素材""预览素材" → 用 lark-cli docs +media-preview
  • 用户明确说"下载素材" → 用 lark-cli docs +media-download
  • 用户想把文档回滚到某个 revision_id 或某一时刻 → 先读 lark-doc-history.md,按其中流程操作
  • 用户明确说"下载/更新/删除文档封面图" → 用 lark-cli docs +resource-download/+resource-update/+resource-delete --type cover
  • resource-* 目前仅支持 Docx 封面资源;其他图片、附件或素材请走 +media-*
  • 如果目标是画板/whiteboard/画板缩略图 → 只能用 lark-cli docs +media-download --type whiteboard(不要用 +media-preview
  • 用户明确要操作思维笔记时;已有思维笔记,走 思维笔记链路;新建思维笔记,走 lark-doc-whiteboard
  • 拿到 spreadsheet URL/token 后 → 切到 lark-sheets 做对象内部操作
  • 用户需要统计文档的总字数 / 总字符数(word count / character count)时,先读取 lark-doc-word-stat.md,并按其中流程调用 scripts/doc_word_stat.py;统计口径以该脚本为准,不要改用其他方式自行计算。
  • 用户说"给文档加评论""查看评论""回复评论""给评论加/删除表情 reaction" → 切到 lark-drive 处理
  • 文档内容中出现嵌入的 <sheet><bitable><cite file-type="sheets|bitable"> 标签时 → 必须主动提取 token 并切到对应技能下钻读取内部数据,不能只呈现标签本身

Read the full file on GitHub · 85 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. 2d ago First seen · 85 lines · 162 tokens per session scan A 249110f21116

Subscribe to this mod's changes

lark-doc is a skill published in the GitHub repository davidtoby/agent-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 162 tokens to every session and 2,600 once invoked, about $0.0008 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-09-03.

Related

Other skills, from other repositories

morph-ppt

Use this skill when the user wants a .pptx with smooth cross-slide animation — PowerPoint Morph transitions, Keynote-style continuous motion, shapes that grow / move / rotate as the slide advances. Trigger on: 'morph', 'morph transition', 'smooth transition', 'continuous animation across slides', 'Keynote-style…

iOfficeAI/OfficeCLI · 169 tokens

officecli-academic-paper

Use this skill to build academic-style .docx output: journal / conference / thesis chapters carrying formal citation style (APA, Chicago, IEEE, MLA), numbered equations, figure & table cross-references, footnotes/endnotes, bibliography, or multi-column journal layout. Trigger on: 'research paper', 'journal paper'…

iOfficeAI/OfficeCLI · 141 tokens

officecli-docx

Use this skill any time a .docx file is involved -- as input, output, or both. This includes: creating Word documents, reports, letters, memos, or proposals; reading, parsing, or extracting text from any .docx file; editing, modifying, or updating existing documents; working with templates, tracked changes, comments…

iOfficeAI/OfficeCLI · 114 tokens

officecli-financial-model

Use this skill when the user wants to build a financial model — 3-statement model, DCF valuation, LBO, SaaS unit economics, sensitivity / scenario analysis, debt schedule, or fundraising projections — in Excel. Trigger on: 'financial model', '3-statement model', 'P&L + BS + CF', 'DCF', 'WACC', 'NPV', 'terminal value'…

iOfficeAI/OfficeCLI · 222 tokens

officecli-pptx

Use this skill any time a .pptx file is involved -- as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file; editing, modifying, or updating existing presentations; combining or splitting slide files; working with…

iOfficeAI/OfficeCLI · 106 tokens

officecli-word-form

Use this skill to create fillable Word forms (.docx) with real Content Controls (SDT) + legacy FormField checkboxes + MERGEFIELD mail-merge placeholders + document protection. Trigger on: 'fillable form', 'form fields', 'content controls', 'SDT', 'word form', 'fill in', 'only editable fields', 'protect document'…

iOfficeAI/OfficeCLI · 224 tokens