Back to Skills

wecomcli-doc

企业微信文档、智能表格和智能文档(原名智能主页)管理技能。提供文档的创建、读取、编辑能力,智能表格的创建,以及智能文档的创建和内容导出。适用场景:(1) 以 Markdown 格式获取文档完整内容 (2) 新建文档或智能表格 (3) 用 Markdown 格式覆写文档内容 (4) 创建智能文档,将本地 Markdown 文件发布为智能文档 (5) 导出智能文档内容为 Markdown。支持通过 docid 或文档 URL 定位文档。

1,871stars129forksUpdated 5/2/2026

Security Assessment

Safe(100/100)
Security Score100/100

About wecomcli-doc

The wecomcli-doc skill provides comprehensive management for documents, smart spreadsheets, and smart documents within the WeCom ecosystem. It addresses the need for efficient creation, retrieval, editing, and export of corporate documents and smart content. By leveraging the WeCom CLI tool, users can interact with documents programmatically, ensuring seamless integration into workflows that require automated or large-scale document management. The skill distinguishes between standard documents, smart spreadsheets, and smart documents (previously known as smart homepages) to apply the correct interface for each type, reducing errors and improving operational efficiency.

Key features include creating new documents or smart spreadsheets, retrieving document content in Markdown format, editing documents with Markdown, publishing local Markdown files as smart documents, and exporting smart documents back into Markdown. The skill uses asynchronous mechanisms for certain operations, such as retrieving full document content and exporting smart documents, ensuring reliable handling of large files or complex documents. Users can locate documents either by `docid` or URL, and the skill enforces strict routing rules to select the correct interface based on URL patterns. Error handling includes standard response codes and specific codes for mismatched document types, guiding users to retry with the appropriate interface.

The wecomcli-doc skill is ideal for corporate users, content managers, and developers who need structured document handling within WeCom. It is particularly useful for teams that maintain documentation in Markdown and require automated publishing or content updates across multiple documents or smart pages. Common use cases include creating project reports, task sheets, exporting smart documents for offline editing, and synchronizing Markdown content with enterprise WeCom environments. Its structured API and command-line integration make it suitable for both individual power users and automated workflows in enterprise systems.

FAQ

How do I retrieve the full content of a document?

You can use the `get_doc_content` command with either `docid` or document URL. It returns Markdown content asynchronously, providing a `task_id` for polling until the task is complete.

Can I create a smart spreadsheet using this skill?

Yes, you can create a smart spreadsheet using `create_doc` with `doc_type` set to 10. Advanced spreadsheet features are handled by the `wecomcli-smartsheet` skill.

What should I do if I get an 'incompatible doc type' error?

This error occurs when the document type does not match the interface. Verify the URL pattern and use the correct interface for that document type before retrying.

How do I create a smart document from a local Markdown file?

Use the `+smartpage_create` command, specifying the title and subpages with their respective Markdown file paths. Each file should be under 10MB and use `content_type` 1 for Markdown.

Is it possible to overwrite document content?

Yes, use the `edit_doc_content` command with `content_type` set to 1 to overwrite the document body with Markdown content.

All Files

6 files
SKILL.md5.4 KB
View
references/create-doc.md1.1 KB
View
references/edit-doc-content.md1.3 KB
View
references/get-doc-content.md2.1 KB
View
references/smartpage-create.md2.8 KB
View
references/smartpage-export.md3.2 KB
View

Install wecomcli-doc

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill