larksuite avatar

Feishu Update Doc

Updates Feishu cloud documents with seven different modes that let you append, overwrite, or surgically edit specific sections. The smart part is the two location methods: you can target content with ellipsis notation like "start text...end text" or grab entire sections by heading title. It pushes you toward small, precise updates instead of nuking the whole doc, which matters because overwriting destroys images, comments, and embeds that can't be reconstructed from the API. Good for maintaining living documentation where you need to update specific sections without collateral damage. Handles async operations for large docs and includes syntax error recovery for diagram blocks.

skills.sh installs
191
GitHub stars
2.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add larksuite/openclaw-lark --skill feishu-update-doc --agent claude-code

Installs into .claude/skills of the current project.

Files

feishu__update_doc

更新飞书云文档内容,支持 7 种更新模式。优先使用局部更新(replace_range/append/insert_before/insert_after),慎用 overwrite(会清空文档重写,可能丢失图片、评论等)。

定位方式

定位模式(replace_range/replace_all/insert_before/insert_after/delete_range)支持两种定位方式,二选一:

selection_with_ellipsis - 内容定位

支持两种格式:

  1. 范围匹配:开头内容...结尾内容

    • 匹配从开头到结尾的所有内容(包含中间内容)
    • 建议 10-20 字符确保唯一性
  2. 精确匹配:完整内容(不含 ...)

    • 匹配完整的文本内容
    • 适合替换短文本、关键词等

转义说明:如果要匹配的内容本身包含 ...,使用 \.\.\. 表示字面量的三个点。

示例:

  • 你好...世界 → 匹配从"你好"到"世界"之间的任意内容
  • 你好\.\.\.世界 → 匹配字面量 "你好...世界"

建议:如果文档中有多个 ...,建议使用更长的上下文来精确定位,避免歧义。

selection_by_title - 标题定位

格式:## 章节标题(可带或不带 # 前缀)

自动定位整个章节(从该标题到下一个同级或更高级标题之前)。

示例:

  • ## 功能说明 → 定位二级标题"功能说明"及其下所有内容
  • 功能说明 → 定位任意级别的"功能说明"标题及其内容

可选参数

new_title

更新文档标题。如果提供此参数,将在更新文档内容后同步更新文档标题。

特性:

  • 仅支持纯文本,不支持富文本格式
  • 长度限制:1-800 字符
  • 可以与任何 mode 配合使用
  • 标题更新在内容更新之后执行

返回值

成功

{
  "success": true,
  "doc_id": "文档ID",
  "mode": "使用的模式",
  "message": "文档更新成功(xxx模式)",
  "warnings": ["可选警告列表"],
  "log_id": "请求日志ID"
}

异步模式(大文档超时)

{
  "task_id": "async_task_xxxx",
  "message": "文档更新已提交异步处理,请使用 task_id 查询状态",
  "log_id": "请求日志ID"
}

Sponsors

Details

Repository
github.com/larksuite/openclaw-lark
Categories
Documentation, Office & Documents
First seen
Jun 3, 2026

More from larksuite/openclaw-lark

All 7
1levnikolaevich avatarln-160-docs-skill-extractorlevnikolaevich/claude-code-skillsExtracts procedural content from project docs into slash commands. Use when docs contain deploy, test, or troubleshoot procedures.187skills.sh installs
2akillness avatarapi-documentationakillness/oh-my-skillsapi documentation174skills.sh installs
32025emma avatarclaude-code-guide2025emma/vibe-coding-cnclaude code guide155skills.sh installs
4signoz avatarsignoz-docssignoz/agent-skillsUse this skill first whenever the user asks about SigNoz instrumentation, OpenTelemetry setup, querying, dashboards, alerts, troubleshooting, self-hosted deploy116skills.sh installs
5vudovn avatardocumentation-templatesvudovn/antigravity-kitdocumentation templates115skills.sh installs
6davila7 avatarClaude Code Guidedavila7/claude-code-templatesMaster guide for using Claude Code effectively. Includes configuration templates, prompting strategies "Thinking" keywords, debugging techniques, and best pract0skills.sh installs