Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

feishu-doc-editing飞书文档编辑

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

11,710

周安装

503

GitHub Stars

1

下载量

4,104
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:feishu-doc-editing(飞书文档编辑)
来源仓库:https://github.com/guoqunabc/feishu-doc-editing
安装命令:
openclaw skills install feishu-doc-editing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install feishu-doc-editing

简介

通过 OpenClaw feishu_doc 工具优化飞书文档编辑性能。

  • 支持修改已有文档并控制变更粒度。feishu-doc-editing 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 需结合项目路由与设计系统确保结构一致性。
  • 避免生成孤立代码片段,应与页面整体集成。
  • 建议配合本地预览验证视觉效果后再提交更改。

SKILL.md

name
feishu-doc-editing
description
|

Feishu 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.

Full decision tree (when to use update_block vs delete+insert vs append, with protection mechanisms) is in ~/self-improving/domains/feishu.md under "最小改动原则".

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\
\
Paragraph one.\
\
Paragraph two.\
\
![caption](https://image-url.png)"
}

Images as ![alt](url) inside insert/append are auto-positioned inline — no separate upload_image needed when the URL is public.

Strategy 4: Positioned Image Insertion

MethodWhen to use
insert with ![](url) markdownPublic URL, image goes with surrounding text
upload_image + parent_block_id + indexLocal 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.

  • Prefer Bitable for data-heavy tables. Bitable has native batch record APIs.
  • Minimize cell count.
  • New tables: use create_table_with_values (one-step).
  • Existing tables: update only changed cells, not the entire table.

Strategy 6: Large Document Chunking

The Feishu document.convert API and documentBlockChildren.create have per-request size limits. For long content:

  • Chunk appends at 300–600 lines (or ~3K chars) per call to avoid 400 errors.
  • Split at heading boundaries (# or ##) — keeps each chunk semantically coherent.
  • Avoid splitting inside fenced code blocks.
  • OpenClaw's append/insert auto-chunk internally, but feeding smaller pieces reduces conversion failures.

Strategy 7: Rate-Limit & Retry

Feishu API returns 429 when request frequency is too high. Handle it:

  • Space concurrent calls — if firing 10+ parallel operations, use a concurrency limit of ~5.
  • Exponential backoff on 429 — wait 1s, 2s, 4s before retrying. Max 3 retries.
  • Batch block creation where possible — one request with multiple children beats N separate requests.

OpenClaw's built-in tool handles basic retries, but be aware when orchestrating many operations in rapid succession.

Strategy 8: Rich-Text Preservation

update_block replaces the entire text element array — all inline styles (bold, italic, color, links) are lost. To preserve formatting:

  • Read the block first via get_block to inspect existing text_element_style fields.
  • Only update blocks where the text actually changed — skip unchanged blocks even if you're rewriting a section.
  • For style-only changes (color, highlight), use color_text action instead of update_block.
  • When rich text must be preserved exactly, consider delete_block + insert with markdown that re-expresses the formatting, rather than update_block which strips styles.

Strategy 9: Conflict Avoidance

When multiple agents or users may edit the same document simultaneously:

  • Check revision_id from read action before making changes. If the revision has advanced since your list_blocks, re-fetch before editing.
  • Minimize the edit window — scan, plan, and execute in quick succession. Don't hold a stale block tree for minutes.
  • Prefer append for additive content — appending to the end rarely conflicts with other editors working in the middle.
  • Avoid deleting blocks you didn't create unless explicitly instructed.

Anti-Patterns

Don'tDo instead
write to change a few paragraphsupdate_block on specific blocks
Serial update_block one-by-oneBatch independent ops in one tool-call
upload_image without position paramsPass parent_block_id + index, or use insert with ![](url)
Parallel upload_image with after_block_id to different positionsSerial: append text → upload_image → append text → upload_image (API ignores after_block_id in parallel)
Re-fetch list_blocks after every editCache and reuse; re-fetch only after structural changes
Insert top-to-bottom when mixing insert/deleteBack-to-front to avoid index drift
Append 2000-line markdown in one callChunk at ~300–600 lines per append
Ignore 429 rate limitsExponential backoff, limit concurrency to ~5
update_block on formatted text blindlyCheck existing styles; use color_text for style-only edits

Compatibility

  • Works with OpenClaw's built-in feishu_doc tool — no code changes needed
  • Complements feishu-doc skill (API reference) and feishu-readability skill (formatting rules)
  • Applies to all Feishu accounts (球球星球 / 小米 / any tenant)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

95.36%
按下载量换算3,914

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills