feishu-doc-editing
Performance-optimized strategies for editing Feishu (Lark) documents via OpenClaw's feishu_doc tool. Use when: (1) modifying existing Feishu documents, (2) inserting images at specific positions, (3) writing tables or structured content, (4) any multi-block document editing task, (5) writing long documents that may hit API size limits. Provides concrete patterns to minimize API calls and maximize editing speed while preserving existing formatting. Covers: parallel operations, positioned image insertion, large document chunking, rate-limit handling, rich-text preservation, and conflict avoidance. Complements the built-in feishu-doc skill (API reference) with operational best practices.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/guoqunabc/feishu-doc-editingFeishu Document Editing — Performance Best Practices
Core Principle: Minimum Change
Never use write (full document replace) for partial edits — it destroys existing rich-text formatting (colors, highlights, inline styles). Always use targeted block-level operations.
Strategy 1: Scan Once, Act in Parallel
Pattern: One list_blocks → plan all changes → fire independent operations together.
1. feishu_doc(action: "list_blocks", doc_token: "xxx")
→ Full block tree with IDs, types, content
2. Identify which blocks need update/delete/insert
3. Issue all independent operations in one tool-call batch:
- update_block(block_id: "A", content: "new text")
- update_block(block_id: "B", content: "new text")
- delete_block(block_id: "C")
- insert(after_block_id: "D", content: "...")
Why: update_block on different blocks has zero dependency. OpenClaw executes independent tool calls within a single response concurrently (other AI frameworks may vary — verify before assuming).
Result: 10 serial updates (3–5 s) → 10 concurrent updates (~0.3–1 s).
Cache the block tree: Reuse list_blocks throughout the session. Re-fetch only after inserts/deletes that shift the structure.
Strategy 2: Back-to-Front for Insert/Delete
When mixing insert and delete, operate from the document's end toward the beginning.
Why: Inserting or deleting a block shifts indices of all subsequent siblings. Back-to-front keeps earlier indices stable — no need to re-query after each op.
Example: Delete blocks at indices 5, 12, 20 → delete 20 first, then 12, then 5.
Strategy 3: Merge Adjacent Inserts
Combine consecutive inserts into one call:
{
"action": "insert",
"doc_token": "xxx",
"after_block_id": "target_block",
"content": "## New Section\n\nParagraph one.\n\nParagraph two.\n\n"
}
Images as  inside insert/append are auto-positioned inline — no separate upload_image needed when the URL is public.
Strategy 4: Positioned Image Insertion
| Method | When to use |
|---|---|
insert with  markdown | Public URL, image goes with surrounding text |
upload_image + parent_block_id + index | Local file / base64, precise position needed |
upload_image with position:
{
"action": "upload_image",
"doc_token": "xxx",
"file_path": "/tmp/chart.png",
"parent_block_id": "doc_root_or_parent_id",
"index": 5
}
Finding the index: From list_blocks, locate the target in its parent's children array. Use that index to insert before, or index+1 to insert after.
Strategy 5: Table Performance
Docx tables are the slowest — each cell needs separate clear + convert + insert API calls.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-guoqunabc-feishu-doc-editing": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
gateway-watchdog
Monitor OpenClaw Gateway health by detecting abnormal error rates in logs. Use when: (1) setting up Gateway error monitoring, (2) diagnosing repeated API failures (429, quota, timeouts), (3) user asks about Gateway health or error trends, (4) integrating error detection into heartbeat checks. Detects rate-limiting, server errors, auth failures, network errors, and message delivery failures across all channels.
Feishu Doc Writing
Skill by guoqunabc
chat-with-l
和小提(L)聊天。小提是朋友 Kid(孙榕)的 OpenClaw AI 助手,运行在 49.232.185.232:18789。使用场景:(1) 主人让雷姆去找小提聊天/传话/打招呼,(2) 提到"小提"、"L"、"Kid"、"孙榕"相关的对话请求。
browser-zombie-cleaner
Detect and clean up zombie browser processes left by OpenClaw's browser tool. When the OpenClaw Gateway restarts, Playwright-launched browser processes get orphaned and accumulate memory. This skill identifies them safely and optionally terminates them. Use when: memory is high, browser processes are piling up, or as part of periodic health checks.
飞书文档可读性优化
飞书文档格式优化与安全修改规范。**必须在通过MCP修改任何mi.feishu.cn文档之前加载此skill**。包括最小修改原则、富文本保护、段落间距、加粗规范。触发条件:用户要求修改飞书文档内容或格式,涉及mi.feishu.cn域名,或调用小米飞书MCP的update-doc工具。