Feishu Document Writer for Openclaw

A specialized technical specification for converting Markdown content into the native Block tree model used by Feishu (Lark) cloud documents.

sunnyyao2222-eng
v1.0.0
Feb 13, 2026
0
1.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install feishu-doc-write

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install feishu-doc-write using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Feishu Document Writer?

The Feishu Document Writer is a robust bridge designed for developers who need to programmatically interact with Feishu (Lark) cloud documents. Because Feishu utilizes a strict Block tree model rather than raw Markdown, this skill provides the necessary mapping and logic to transform standard structured text into discrete, API-compatible blocks. By utilizing Openclaw Skills, users can ensure that their automated content—ranging from simple paragraphs to complex callouts—is rendered perfectly within the Feishu ecosystem.

This tool addresses the complexities of the Feishu Docx API, including the handling of nested structures, image uploads, and specific styling enums. It provides a reliable framework for developers to build automation tools that maintain high document fidelity without the manual overhead of constructing complex JSON payloads for every document update. Integrating this capability into your workflow via Openclaw Skills significantly streamlines internal documentation and knowledge management.

Feishu Document Writer Use Cases

  • Automating the synchronization of technical documentation from Markdown-based repositories to Feishu for team access.
  • Generating automated daily or weekly project status reports directly into collaborative Lark documents.
  • Converting AI-generated research or summaries into structured Feishu documents with rich formatting like callouts and code blocks.
  • Streamlining the migration of legacy documentation into the Feishu ecosystem using the specialized Openclaw Skills workflow.

How Feishu Document Writer Works

  1. Retrieve a tenant access token by authenticating with the Feishu Open Platform using your app credentials.
  2. Identify the target document or create a new one to obtain a unique document_id.
  3. Parse source Markdown content into an array of Feishu-specific Block objects, mapping elements like headings and lists to their respective block types.
  4. Execute a batch write operation using the children creation API to maintain correct content ordering.
  5. Handle advanced elements like callouts and images through multi-step creation and upload processes as defined in the Openclaw Skills specification.
  6. Verify the document revision ID to ensure state consistency and prevent data overwrites.

Feishu Document Writer Setup

To begin using the Feishu Document Writer, you must first authenticate your application to receive a bearer token. Run the following command to initialize your session:

curl -X POST 'https://open.feishu.cn/open-apis/auth/v3/app_access_token/internal' \
  -H 'Content-Type: application/json' \
  -d '{ "app_id": "<your_app_id>", "app_secret": "<your_app_secret>" }'

Ensure your Feishu app has the required scopes for docx:document and drive:file to allow Openclaw Skills to modify cloud content.

Feishu Document Writer Data Schema & Taxonomy

The skill maps Markdown elements to the Feishu Docx schema as follows:

Markdown Element block_type Feishu JSON Key
# H1 - ### H3 3, 4, 5 heading1-3
Paragraph 2 text
Code Block 14 code
Quote 15 quote
Callout 19 callout

Data is structured as a tree where the Page (block_type 1) serves as the root, and all subsequent content items are added as children to ensure compatibility with Openclaw Skills requirements.

Feishu Document Writer Advanced Features

  • Batch Request Optimization: Supports grouping up to 50 blocks in a single API call to bypass rate limits and improve write speed.
  • Custom Callout Syntax: Implements a specialized :::callout markdown extension to support native Feishu highlight boxes with custom emojis and colors.
  • Concurrency Management: Uses serial write logic and index tracking to prevent the random ordering issues common in parallel API requests.
  • Complex Nesting Support: Provides a two-step workflow for container blocks, allowing for rich formatting inside callouts and quotes within Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*