wecomcli-doc

Create, import, read, and write WeCom doc documents via wecom-cli commands.

2.0k|291|Updated Jul 24, 2026
One-click install
npx skills add https://github.com/Pinvou/pinvou-agent --skill wecomcli-doc-pinvou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wecomcli-doc
Source: https://github.com/Pinvou/pinvou-agent/tree/main/pinvou3-app/src-tauri/resources/common/bundle/wecom-skills/wecomcli-doc
Command: npx skills add https://github.com/Pinvou/pinvou-agent --skill wecomcli-doc-pinvou

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-docx, and includes scripts (resource) and references (resource) components.

What problem does it solve? Managing WeCom (Enterprise WeChat) online doc documents programmatically is tedious when done by hand. This Skill lets an AI agent create new doc documents, import local .doc/.docx/.txt files, read document content, and append or overwrite text through the wecom-cli command line tool. ## Core Features & Use Cases - Create and import documents: Generate a .docx file from a JSONL spec (headings, paragraphs, tables, page breaks) via the build_docx.py script, then import it as a WeCom doc document. - Read document content: Fetch doc content as text, markdown, or OOXML using the document's docid extracted from its URL. - Append or overwrite content: Append text to the end of a document by default, or fully overwrite it only when the user explicitly requests replacement. - Use Case: A user asks to turn meeting notes into a WeCom online document. The agent writes a JSONL spec, builds a formatted .docx, imports it with wecom-cli, and returns the shareable document URL. ## Quick Start Ask the agent to create a WeCom doc document from your notes, or provide a doc.weixin.qq.com link and ask it to read, append to, or overwrite that document.

Frequently Asked Questions about wecomcli-doc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a WeCom online doc document with wecom-cli?

Creating a doc document is a two-step flow: first write a JSONL spec describing headings, paragraphs, tables, and page breaks, then run build_docx.py to generate a .docx file, and finally import it with wecom-cli doc import to get the docid and URL.

How do I append or overwrite content in a WeCom doc document?

Use wecom-cli doc contents append to add text to the end without touching existing content, or doc contents overwrite to fully replace it. Append is the default for neutral phrasing; overwrite is used only when the user explicitly asks to replace or rewrite.

How do I get the docid for a WeCom document?

Extract the docid from the document URL: in https://doc.weixin.qq.com/<type>/<docid>?scode=..., the segment after the type and before the question mark is the docid. If only a name is given, search via the wecomcli-doc-manage skill first.

When should I use smartpage instead of a doc document?

Use wecomcli-smartpage when the user generically asks to create or write a document without specifying doc type, when the link is a smartpage URL, or when the docid starts with a1 or b1. Structured data with fields and records belongs in smartsheet, not doc.

What file formats can be imported as WeCom doc documents?

The import command accepts local .doc, .docx, and .txt files. You provide the file name with extension, the absolute local path, and optionally a password for encrypted Office files.

Why does build_docx.py reject my JSONL spec?

The script validates every line against the doc-create.md schema before building. Unknown actions, wrong parameter types, invalid hex colors, heading levels outside 0-4, or paths outside the WECOMAGENT_READABLE_DIRS/WRITABLE_DIRS sandbox all raise errors.