lark-doc

Read, create, and edit Feishu Docx and Wiki documents via the lark-cli v2 API.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/TrayMachi/dotfiles --skill lark-doc-traymachi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lark-doc
Source: https://github.com/TrayMachi/dotfiles/tree/main/agents/skills/lark-doc
Command: npx skills add https://github.com/TrayMachi/dotfiles --skill lark-doc-traymachi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lark-cli, and includes references (resource) components.

What problem does it solve? Working with Feishu (Lark) cloud documents programmatically requires navigating the v2 Docs API, block-level IDs, XML/Markdown content formats, and embedded resources like whiteboards and sheets. This Skill gives an AI agent precise instructions to fetch, create, and surgically edit Docx and Wiki documents through lark-cli without corrupting structure or losing embedded assets. ## Core Features & Use Cases - Document Fetching with Scoped Reads: Retrieve full documents or targeted sections using outline, section, range, and keyword scopes, with detail levels from plain text to full block IDs and styles. - Creation and Precise Editing: Create documents from XML or Markdown, then apply eight update commands (str_replace, block_insert_after, block_replace, block_delete, block_move_after, and more) for block-level surgical edits. - Media and Cover Management: Insert images from clipboard or disk, preview and download document media and whiteboard thumbnails, and manage Docx cover images via resource commands. - Use Case: A user pastes a Feishu doc URL and asks to rewrite the "Deployment" section. The agent fetches just that section with block IDs, applies a block_replace with properly formatted XML, and preserves all embedded images, mentions, and sheets. ## Quick Start Read the Feishu document at this URL and summarize its third section, then append a short conclusion paragraph at the end.

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 --api-version v2 --doc with the document URL or token. Use --scope outline, section, range, or keyword to read only the part you need, and --detail with-ids when you need block IDs for later edits.

How do I edit a specific section of a Feishu doc without rewriting everything?

First fetch the target section with --detail with-ids to get block IDs, then use docs +update with commands like block_replace, block_insert_after, or block_delete against those IDs. Avoid overwrite unless you intend to rebuild the entire document.

Should I use XML or Markdown when creating Feishu documents?

XML is the default and preferred format because it supports rich blocks like callouts, grids, checkboxes, and whiteboards. Use Markdown only when the user explicitly provides a .md file or asks for Markdown import.

Can this skill handle embedded spreadsheets or bitables inside a document?

It extracts the token from embedded sheet, bitable, or cite tags but does not operate on their internal data. You must switch to the lark-sheets or lark-base skill to read or modify those embedded objects.

Why does docs +create or +update fail without --api-version v2?

This skill targets the v2 Docs API, and the create, fetch, and update shortcuts require the explicit --api-version v2 flag. Omitting it routes the call to the wrong API version and causes errors.

What operations are outside the scope of this document skill?

Document comments and reactions are handled by lark-drive, spreadsheet and Base data operations by lark-sheets and lark-base, and cloud drive file uploads or permissions by lark-drive. Whiteboard content editing is delegated to the lark-whiteboard skill.