Pinvou/pinvou-agent / pinvou3-app/src-tauri/resources/common/bundle/wecom-skills/wecomcli-doc
wecomcli-doc
Verified何时用:仅当用户明确指定 doc/docx/word/在线文档/office文档或提供 doc.weixin.qq.com/doc/ 链接时使用;泛指「做个文档/写文档/整理成文档」默认走 wecomcli-smartpage 或本地工具,本技能不得抢占。doc 内容操作:新建、导入(.doc/.docx/.txt)、读取、追加、覆盖写入;结构化数据需求改用智能文档/智能表格;公共管理走 wecomcli-doc-manage。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.5 KB |
| references/doc-contents-append.md | markdown | 1.4 KB |
| references/doc-contents-overwrite.md | markdown | 1.7 KB |
| references/doc-create.md | markdown | 7.9 KB |
| scripts/build_docx.py | script | 45.8 KB |
references/doc-contents-overwrite.md
View on GitHub# 覆盖在线文档内容 — `wecom-cli doc contents overwrite`
全量覆盖**doc文档**中的所有内容,原有内容将被完全替换。
## 命令
```bash
wecom-cli doc contents overwrite --json '<JSON 参数>'
```
## 参数
| 字段 | 类型 | 必填 | 默认值 | 语义 |
|---|---|---|---|---|
| `docid` | string | 是 | — | 在线文档 ID|
| `content_type` | string | 否 |`markdown` | 内容格式枚举:`text` 纯文本 / `markdown`;通常传 `text` |
| `content` | string | 否 | — | 覆盖写入的完整文本;与 `file_path` 二选一。|
| `file_path` | string | 否 | — | 本地文件路径;与 `content` 二选一,支持通过文件路径覆盖 |
## 返回
覆盖成功返回空对象。
## 使用规则
- **`content` / `file_path` 二选一**:可以直接传入内容,也可以传入文件路径;两者不可同时省略。
- **清空文档不能传空值**:`content` 若传 `null`、空字符串或不传都会被拒;要清空请传 `" "`(一个空格)。
## 超时与结果不明
覆盖遇网络超时 / 返回丢失时结果不明(可能已替换成功,也可能没有),且接口不返回可关联本次调用的凭据,因此**禁止自动重试,也禁止以读回结果自动判定成败**:读回内容与本轮载荷一致不能排除更早或并发的同文覆盖;未一致也不能排除原请求延迟生效(此时补写会互相覆盖)。
正确做法:停止自动操作,向用户如实报告「结果未知」,并说明可用 SKILL.md「读取doc文档内容」(`contents get`)人工核对;仅在用户明确确认此前覆盖未生效后,才补写一次(计入 SKILL.md「业务失败处理」的 2 次上限)。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |