lark-doc

Read, create, and edit Feishu/Lark Docx and Wiki documents via lark-cli commands.

3|2|Updated Jul 21, 2026
One-click install
npx skills add https://github.com/zlsbksdxl/codex-lark --skill lark-doc-zlsbksdxl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lark-doc
Source: https://github.com/zlsbksdxl/codex-lark/tree/main/plugins/feishu2codex/skills/lark-doc
Command: npx skills add https://github.com/zlsbksdxl/codex-lark --skill lark-doc-zlsbksdxl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Working with Feishu/Lark cloud documents programmatically requires navigating complex APIs, block structures, and format rules. This Skill lets an AI agent fetch, create, and precisely edit Docx and Wiki documents through structured lark-cli commands without manual API orchestration. ## Core Features & Use Cases - Document Fetching with Scoped Reads: Retrieve full documents or targeted sections using outline, range, keyword, or section scopes, with detail levels from simple text to full block IDs and styles. - Precise Block-Level Editing: Create documents from XML or Markdown and apply eight update commands (str_replace, block_insert_after, block_replace, block_delete, block_move_after, and more) for surgical edits. - Media and Resource Handling: Insert images from clipboard or disk, preview and download document media, manage cover images, embed whiteboards, and count document words with a dedicated script. - Use Case: Given a Feishu doc URL, ask the agent to summarize one section, replace outdated text, insert a Mermaid diagram, and report the total word count. ## Quick Start Ask the agent to fetch the Feishu document at your docx URL and summarize its contents, making sure lark-cli is installed and you have run lark-cli auth login first.

Frequently Asked Questions about lark-doc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read a Feishu document from a URL?

Run lark-cli docs +fetch with the docx or wiki URL as the --doc argument. Use --scope with outline, section, range, or keyword to read only the part you need instead of the full document.

How do I edit a specific paragraph in a Lark doc?

First fetch the document with --detail with-ids to get block IDs, then run docs +update with commands like block_replace or block_insert_after targeting that block ID. For simple text changes, str_replace with --pattern works without block IDs.

Should I use XML or Markdown format for Lark docs?

XML is the default and preferred format, especially for precise block-level edits, since it preserves block structure and styles. Use Markdown only when the user explicitly requests it or provides a .md file for import.

Can this skill handle embedded sheets or Base tables in a document?

No. When fetched content contains sheet or bitable tags, the skill extracts their tokens and routes to the lark-sheets or lark-base skills for data operations. Document comments and drive file operations are also handled by lark-drive.

How do I count words in a Feishu document?

Fetch the document with --detail full in XML format and pipe the JSON output to the bundled doc_word_stat.py script. It reports word_count and char_count using a consistent counting standard for Chinese and English text.

Why does docs +update fail after a previous edit?

Block IDs become invalid after overwrite, block_replace, or block_delete operations. Re-fetch the document with --detail with-ids to obtain fresh block IDs before continuing block-level edits.