# Send feishu-doc-write to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "feishu-doc-write",
    "name": "feishu-doc-write",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/sunnyyao2222-eng/feishu-doc-write",
    "canonicalUrl": "https://clawhub.ai/sunnyyao2222-eng/feishu-doc-write",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/feishu-doc-write",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=feishu-doc-write",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "feishu-doc-write",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-01T19:41:00.617Z",
      "expiresAt": "2026-05-08T19:41:00.617Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=feishu-doc-write",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=feishu-doc-write",
        "contentDisposition": "attachment; filename=\"feishu-doc-write-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "feishu-doc-write"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/feishu-doc-write"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/feishu-doc-write",
    "downloadUrl": "https://openagent3.xyz/downloads/feishu-doc-write",
    "agentUrl": "https://openagent3.xyz/skills/feishu-doc-write/agent",
    "manifestUrl": "https://openagent3.xyz/skills/feishu-doc-write/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/feishu-doc-write/agent.md"
  }
}
```
## Documentation

### Feishu Document Writer

Reference spec for writing content to Feishu (Lark) cloud documents via the Docx API. Feishu docs use a Block tree model — raw Markdown is not accepted.

Document (block_type=1, Page)
  +-- Heading1 Block (block_type=3)
  +-- Text Block (block_type=2)
  +-- Callout Block (block_type=19)
  |     +-- Text Block
  |     +-- Bullet Block
  +-- Image Block (block_type=27)
  +-- Divider Block (block_type=22)

### Preferred Approach: Convert API

Feishu provides an official Markdown -> Blocks conversion endpoint:

POST /open-apis/docx/v1/documents/{document_id}/convert

{
  "content": "# Title\\n\\nBody text\\n\\n- Item 1\\n- Item 2\\n\\n> Quote",
  "content_type": "markdown"
}

Pros: No manual Block JSON construction. Handles most standard Markdown.
Limitation: Does not support Feishu-specific blocks (Callout, etc.) — use manual Block creation for those.

### Block Type Reference

block_typeNameJSON KeyNotes1PagepageDocument root2TexttextParagraph3-11Heading1-9heading1-heading9Headings12BulletbulletUnordered list (each item = separate block)13OrderedorderedOrdered list14CodecodeCode block (with style.language enum)15QuotequoteBlockquote17TodotodoCheckbox item (with style.done)19CalloutcalloutHighlight box (Feishu-specific, container block)22DividerdividerHorizontal rule27ImageimageTwo-step: create placeholder, then upload31TabletableTable34QuoteContainerquote_containerQuote container

### Create Blocks API

POST /open-apis/docx/v1/documents/{document_id}/blocks/{block_id}/children?document_revision_id=-1

Headers:
  Content-Type: application/json
  Authorization: Bearer <tenant_access_token>

Body:
{
  "children": [ ...Block array... ],
  "index": 0
}

block_id: Parent block ID (usually document_id itself for root)
index: Insert position (0 = beginning, -1 or omit = end)

### Text

{
  "block_type": 2,
  "text": {
    "elements": [{
      "text_run": {
        "content": "Paragraph text here",
        "text_element_style": { "bold": false, "italic": false }
      }
    }]
  }
}

### Heading

{ "block_type": 3, "heading1": { "elements": [{ "text_run": { "content": "H1 Title" } }] } }
{ "block_type": 4, "heading2": { "elements": [{ "text_run": { "content": "H2 Title" } }] } }

### Bullet / Ordered List

{ "block_type": 12, "bullet": { "elements": [{ "text_run": { "content": "List item" } }] } }
{ "block_type": 13, "ordered": { "elements": [{ "text_run": { "content": "Numbered item" } }] } }

Each list item is a separate Block.

### Code Block

{
  "block_type": 14,
  "code": {
    "elements": [{ "text_run": { "content": "console.log('hello');" } }],
    "style": { "language": 23, "wrap": false }
  }
}

Common language enums: PlainText=1, JavaScript=23, Python=40, TypeScript=49, Go=20, Shell=46, SQL=47, Java=22, Rust=44, C=12, CSS=17, HTML=21, Docker=19.

### Callout (Feishu-specific highlight box)

Callout is a container block — create it first, then add child blocks inside.

// Step 1: Create callout as document child
{ "block_type": 19, "callout": { "background_color": 3, "border_color": 3, "emoji_id": "star" } }

// Step 2: POST .../blocks/{callout_block_id}/children
{ "children": [{ "block_type": 2, "text": { "elements": [{ "text_run": { "content": "Highlight text" } }] } }] }

Color enums: Red=1, Orange=2, Yellow=3, Green=4, Blue=5, Purple=6, Grey=7.

### Divider

{ "block_type": 22, "divider": {} }

### Image (two-step)

Step 1: Create placeholder block { "block_type": 27, "image": {} }
Step 2: Upload via POST /open-apis/drive/v1/medias/upload_all
  - multipart/form-data: file, file_name, parent_type="docx_image", parent_node=<image_block_id>

### Text Styling

Apply styles via text_element_style in text_run:

PropertyTypeEffectboldboolBolditalicboolItalicstrikethroughboolStrikethroughunderlineboolUnderlineinline_codeboolInline codetext_colorintText color (same enum as callout colors)background_colorintBackground colorlink.urlstringHyperlink

Multiple text_run elements in one block = mixed styles in one paragraph.

### Markdown to Block Mapping

Markdownblock_typeJSON Key# H13heading1## H24heading2### H35heading3Paragraph2text- item12bullet1. item13orderedCode fence14code> quote15quote- [ ] todo17todo---22divider![](url)27image (two-step)**bold**--text_element_style.bold: true*italic*--text_element_style.italic: true\`code\`--text_element_style.inline_code: true~~strike~~--text_element_style.strikethrough: true[text](url)--text_element_style.link.url(no MD equivalent)19callout (Feishu-specific)

### Concurrency & Ordering (Critical)

Problem: Concurrent Block creation API calls produce random ordering.

### Solution A: Single Batch Request (Recommended)

Put all blocks in one children array, single API call:

{
  "children": [
    { "block_type": 3, "heading1": { "elements": [{"text_run": {"content": "Title"}}] } },
    { "block_type": 2, "text": { "elements": [{"text_run": {"content": "Paragraph 1"}}] } },
    { "block_type": 22, "divider": {} },
    { "block_type": 4, "heading2": { "elements": [{"text_run": {"content": "Section 2"}}] } }
  ],
  "index": 0
}

### Solution B: Serial Writes with Index

For long content requiring multiple requests, execute serially with explicit index:

Request 1: index=0, write block A
Request 2: index=1, write block B (wait for A to succeed)
Request 3: index=2, write block C (wait for B to succeed)

### Solution C: Collect-Then-Write (Recommended)

LLM outputs complete Markdown -> Conversion layer -> Single API batch write

Never let the LLM write one paragraph at a time with concurrent API calls.

### Complete Write Flow

Create document: POST /open-apis/docx/v1/documents with { "folder_token": "<token>", "title": "Title" } -> returns document_id
Build Block array: Convert full content to Block JSON
Batch write: POST .../documents/{doc_id}/blocks/{doc_id}/children?document_revision_id=-1 with all blocks
Container blocks (optional): For Callout etc., get block_id from step 3 response, then add children

### Custom Callout Syntax

Since Markdown has no Callout equivalent, use this custom markup:

:::callout{color=yellow emoji=bulb}
Highlight content here.
Supports **bold**, *italic*, and lists.
:::

ParamValuesDefaultPurposecolorred, orange, yellow, green, blue, purple, greyyellowBackground & borderemojiAny Feishu emoji_id (bulb, star, warning, fire)bulbLeft iconborderSame as color valuesSame as colorBorder color (override)

Common templates:

:::callout{color=yellow emoji=bulb}
**Key Insight**: The most important takeaway
:::

:::callout{color=red emoji=warning}
**Warning**: Common misconception
:::

:::callout{color=green emoji=check}
**Action Item**: What to do next
:::

### Rate Limits & Constraints

Max blocks per batch: ~50 recommended
Long articles: Split by H2/H3 sections, 200-500ms between batches
Always use document_revision_id=-1 (latest version)
Token validity: ~2 hours, cache and refresh before expiry

### Authentication

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

### Schema Pitfalls (Battle-tested)

No Markdown tables in write ops — use bullet lists instead (prevents schema errors)
No nested code blocks inside lists — Feishu schema validation is strict on nesting depth
Callout is a container — always requires a two-step create (container first, then children)
Each list item = separate Block — don't try to put multiple items in one block

### References

Create Blocks API: https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/create
Block Data Structure: https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/data-structure/block
Convert API: https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/convert
Extended API reference: See FEISHU_API_HANDBOOK.md in workspace root
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: sunnyyao2222-eng
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-01T19:41:00.617Z
- Expires at: 2026-05-08T19:41:00.617Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/feishu-doc-write)
- [Send to Agent page](https://openagent3.xyz/skills/feishu-doc-write/agent)
- [JSON manifest](https://openagent3.xyz/skills/feishu-doc-write/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/feishu-doc-write/agent.md)
- [Download page](https://openagent3.xyz/downloads/feishu-doc-write)