feishu-docx-powerwrite

High-quality Feishu/Lark Docx writing via OpenClaw. Covers tool selection, chunked writing, native tables, $ symbol escaping, and all known pitfalls. Trigger on Feishu doc/docx links, "write to Feishu doc", "generate a Feishu doc", "append/replace docx", or when users want consistently good doc formatting.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "feishu-docx-powerwrite" with this command: npx skills add asauler/skill-feishu-docx-powerwrite/asauler-skill-feishu-docx-powerwrite-feishu-docx-powerwrite

Feishu Docx PowerWrite

Reliably write great-looking Feishu Docx using OpenClaw's tools.

Tool Selection

ToolUse WhenNotes
feishu_doc(action="create")新建文档返回 doc_token
feishu_doc(action="write")写首段内容覆盖整个文档
feishu_doc(action="append")追加后续内容每次 ≤1500 字
feishu_table.py插入原生表格Markdown 表格不支持

⚠️ 不要用 create_feishu_doc 工具 — 有 JSON parse bug,会失败。

核心工作流

1. 创建 + 写入文档

feishu_doc(action="create", title="标题")
→ 拿到 doc_token
feishu_doc(action="append", doc_token=xxx, content="第一段...")
feishu_doc(action="append", doc_token=xxx, content="第二段...")

2. 分块写入规则

  • 每次 append ≤1500 字(超过会 400 错误)
  • 长报告分 4-5 次 append
  • 按章节自然分块,不要在段落中间断开

3. 表格写入

Markdown 表格通过 feishu_doc append 写入会散落成碎片文本(Table block type 被跳过)。

正确方式:用 feishu_table.py 脚本创建原生表格:

python3 workspace/tools/feishu_table.py

代码调用:

from feishu_table import create_table
create_table(doc_token, [
    ["列1", "列2", "列3"],   # 表头
    ["数据1", "数据2", "数据3"],
], header_bold=True)

4. $ 符号处理

飞书把 $...$ 当 LaTeX 公式渲染。写入包含美元符号的内容时:

  • $82.78 → 被解析为公式
  • 82.78美元USD 82.78

Markdown 格式最佳实践

渲染良好的格式

  • # ## ### 标题层级
  • - 无序列表 + 2 空格缩进嵌套
  • 1. 2. 3. 有序列表
  • ```code``` 代码块
  • **加粗** *斜体*
  • --- 分割线
  • 短段落(每段 3-5 行)

避免的格式

  • Markdown 表格(| col |)→ 用原生表格
  • 超长段落 → 拆短
  • $ 符号 → 用文字替代
  • 深层嵌套列表(>3 层)→ 拍平

长文档写作模式

Sub-agent 搜索 + 主 session 写作

  • Sub-agent 负责搜索和数据收集
  • 主 session 综合数据写报告
  • 原因:sub-agent maxTokens 限制(16k)导致无法写长文,content 参数会被截断

如果必须用 sub-agent 写

  • 任务描述中明确"分块写入,每块不超过 3000 字"
  • exec heredoc 分块写本地文件,再上传飞书

Context 管理

长文档写作会导致 session context 膨胀:

  • 大量文本操作用 sub-agent 隔离
  • exec 命令输出用 tail/head 限制行数
  • 写完长文档后提醒可能需要重启 gateway

权限设置

新建文档默认设为「互联网获得链接即可访问」:

feishu_perm(action="add", token=doc_token, type="docx",
            member_type="openchat", member_id="oc_xxx", perm="view")

常见错误

错误原因解决
append 返回 400单次内容过长每次 ≤1500 字
表格变碎片文本Markdown 表格不支持用 feishu_table.py
$ 变公式LaTeX 解析用"美元"或"USD"
create_feishu_doc 失败工具有 bug用 feishu_doc create + append
sub-agent 写入空白maxTokens 截断主 session 写或分块
上游 400 bad requestcontext 过大重启 gateway

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Feishu Writing Bundle

飞书文档写作整合包。把飞书文档创建、增量更新、局部精准改稿、proposal 正式化、人味化改写、飞书回链交付等能力整合到一个自包含文件中。用于“检索资料后写飞书文档”“把草稿改成能发的文档”“改飞书演讲稿/方案/说明文”“写完后返回飞书文档链接”等场景。适合新的龙虾直接上手,不依赖先认识其他 feishu-*...

Registry SourceRecently Updated
440Profile unavailable
General

AI-Friendly Structured Writer

Format any content into AI-readable structured formats that maximize citation probability. Converts unstructured text into GEO-optimized layouts using header...

Registry SourceRecently Updated
1940Profile unavailable
General

feishu-smart-doc-writer

Feishu/Lark Smart Document Writer - 飞书智能文档写入器. Core Features / 核心功能: 1. Smart Chunk Writing / 智能分块写入 - Solve API limit blank doc issues / 解决长文档API限制导致的空白问题 2...

Registry SourceRecently Updated
5700Profile unavailable
General

Official Writing 公文写作技能

党政机关公文写作技能 - 提供国家标准格式规范、各类公文模板、写作技巧

Registry SourceRecently Updated
680Profile unavailable