lark-doc-reviser
Read unresolved comments in a Feishu (Lark) document and apply targeted edits block-by-block based on those comments. Use when the user shares a Feishu doc URL and asks to: (1) fetch/show document comments, (2) revise or edit the doc based on comments, (3) process feedback left in a Feishu doc. Requires lark-cli installed and authenticated.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/billzhuang6569/lark-doc-reviserLark Doc Reviser
Workflow
Step 1 — Fetch doc state
python3 scripts/fetch_doc.py <doc_url_or_token> --out workspace/<token>_state.json
This saves full doc state to workspace/<token>_state.json and prints a summary to stdout:
commented_blocks: blocks that have unresolved comments, each withelements,full_text, andcomments[]{comment_id, anchor_text, instruction}all_blocks: full block list (no elements, for structural reference)
Always save to workspace. The editing process may span multiple sessions.
Step 2 — Present comments to user
Show each entry in commented_blocks as:
[block_type] full_text
→ 【anchor_text】 instruction
Ask the user to confirm which comments to address, or proceed if the intent is clear.
Step 3 — Apply text edits
For each comment requiring a text change, construct a patches list and run:
python3 scripts/patch_blocks.py <doc_token> patches.json
patches.json format — elements completely replace the block's existing content:
[
{
"block_id": "doxcnXXXX",
"elements": [
{"text": "普通文字"},
{"text": "加粗", "bold": true},
{"text": "代码", "code": true},
{"text": "斜体", "italic": true}
]
}
]
Supported element fields: text (required), bold, italic, code, strikethrough, underline.
Note: update_text_elements clears comment_ids from the elements. This is expected — always resolve addressed comments in Step 4.
Step 4 — Resolve addressed comments
python3 scripts/resolve_comments.py <doc_token> <comment_id> [comment_id ...]
# or via stdin:
echo '["id1","id2"]' | python3 scripts/resolve_comments.py <doc_token> -
Step 5 — Re-fetch and update state
Re-run Step 1 to refresh workspace/<token>_state.json after edits.
Limitations
These operations are not handled by this skill's scripts and require additional API calls:
- Insert blank line / empty block: needs Create Block API
- Delete a block (e.g., remove a divider): needs Delete Block API
- Structural reordering: needs Move Block API
For such operations, use lark-cli api directly or ask the user if they want to handle them manually.
Warning
Never use lark-cli docs +update --mode replace_range --selection-by-title to rename a heading. It selects the entire section (heading + all content until next heading) and deletes it all. Use --selection-with-ellipsis "heading text" instead.
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-billzhuang6569-lark-doc-reviser": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
recruitment-agent
招聘Agent:通过 opencli(Boss直聘) + lark-cli(飞书多维表格) 管理招聘流程。支持:(1) 查看Boss直聘最近/未读消息; (2) 将候选人存入人才库(先搜索比对,再新建/更新); (3) 添加人才决策记录(加入库/约面试/跟进/发Offer/归档); (4) 更新人才库中某候选人的指定信息; (5) 约面试(发邀约消息、心跳检测、确认时间、创建飞书日程)。当用户说「查boss消息」「把XXX存入人才库」「我对XXX感兴趣」「对XXX做个决策记录」「更新XXX的信息/字段」「帮我给XXX约个面试」「约一下XXX」时触发。
feishu-bitable-upload
Upload files (images, videos, attachments) to Feishu (Lark) Bitable (multi-dimensional table) and return the file_token. Auto-selects direct upload for files up to 20MB or chunked upload (prepare, part, finish) for larger files. Requires App ID and Secret (lark-cli does NOT cover the /drive/v1/medias/ API). Use when the user wants to: upload a file/image/video to Feishu Bitable, get a file_token from Feishu Drive API, upload attachments to 多维表格 (bitable), 上传文件到飞书多维表格, 获取 file_token.