mcpField
F
feishu-doc

feishu-doc

github.com/zrt-ai-labDocuments29645 installsUpdated 14w ago
Repository

About feishu-doc

Feishu Doc Skill reads and edits Feishu Wiki, Docs, Sheets, and Bitable content through scripts. It supports block-level operations and chunked appends for long documents.

Key features

  1. 01Read Docs, Sheets, Bitable, and Wiki
  2. 02Create blank documents and overwrite with Markdown
  3. 03Append Markdown to a document
  4. 04List, get, update, and delete blocks
  5. 05Append long documents in sections

Use cases

  1. 01Reading Feishu Wiki or spreadsheet content
  2. 02Creating and writing a Markdown document
  3. 03Updating selected blocks in an existing document
  4. 04Writing a long document in successive sections

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/zrt-ai-lab/opencode-skills --skill feishu-doc

After installing, type/feishu-docin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

_meta.json
append_simple.js
config.json
create.js
download_file.js
fetch_mock.js
index.js
input_guard.js
package-lock.json
package.json
README.md
setup_iter11.js
test-read.js
validate_patch.js
lib/
auth.js
bitable.js
docx.js
sheet.js
wiki.js

Details

From the project README

Feishu Doc Skill

Fetch content from Feishu (Lark) Wiki, Docs, Sheets, and Bitable. Write and update documents.

Prerequisites

  • Install feishu-common first.
  • This skill depends on ../feishu-common/index.js for token and API auth.

Capabilities

  • Read: Fetch content from Docs, Sheets, Bitable, and Wiki.
  • Create: Create new blank documents.
  • Write: Overwrite document content with Markdown.
  • Append: Append Markdown content to the end of a document.
  • Blocks: List, get, update, and delete specific blocks.

Long Document Handling (Unlimited Length)

To generate long documents (exceeding LLM output limits of ~2000-4000 tokens):

  1. Create the document first to get a doc_token.
  2. Chunk the content into logical sections (e.g., Introduction, Chapter 1, Chapter 2).
  3. Append each chunk sequentially using feishu_doc_append.
  4. Do NOT try to write the entire document in one feishu_doc_write call if it is very long; use the append loop pattern.

Usage

# Read
node index.js --action read --token <doc_token>

# Create
node index.js --action create --title "My Doc"

# Write (Overwrite)
node index.js --action write --token <doc_token> --content "# Title\nHello world"

# Append
node index.js --action append --token <doc_token> --content "## Section 2\nMore text"

Configuration

Create a config.json file in the root of the skill or set environment variables:

{
  "app_id": "YOUR_APP_ID",
  "app_secret": "YOUR_APP_SECRET"
}

Environment variables:

  • FEISHU_APP_ID
  • FEISHU_APP_SECRET

Comments

Markdown supported