wecom-unified

wecom-unified

An all-in-one WeCom CLI suite covering contacts, documents, online spreadsheets, smartsheets, smartpages, calendars, meetings, todos, WeDrive (Disk), emails, messages, media files, and other business domains. Supports searching contacts and userids by name/pinyin/English name/alias, searching, renaming, and authorizing documents, creating and reading/writing doc online documents, creating and modifying online spreadsheets, creating/importing and reading/writing smartsheet sub-sheets/fields/records/views/charts and cell coloring/highlighting styles, creating and editing smartpages (including forms and data dashboards), creating/querying/modifying/canceling calendar events and checking free/busy status, office buildings, and meeting rooms, booking and managing online meetings (including meeting notes, todos, and full transcripts), creating/querying/modifying/completing/deleting or leaving todos, searching and uploading WeDrive files, downloading offline files, renaming supported files, and creating new folders, sending/replying to/forwarding and searching/reading emails, sending text/Markdown/image/file/voice/video messages to the current authorized user or recent active chats, as well as uploading and downloading media files. Always triggered when the user provides doc.weixin.qq.com, page.weixin.qq.com, or drive.weixin.qq.com links; even if "WeCom" is not explicitly mentioned, this skill should be triggered as long as it involves workplace scenarios such as finding people, documents, spreadsheets, schedules, meetings, todos, WeDrive, emails, or sending messages. "Document" without a specified type defaults to Smartpage; "Spreadsheet/Table" without specifying "Online Spreadsheet" defaults to Smartsheet.

86stars
4forks
Updated 8/18/2026
SKILL.md
read-only
name
wecom-unified
description

An all-in-one WeCom CLI suite covering contacts, documents, online spreadsheets, smartsheets, smartpages, calendars, meetings, todos, WeDrive (Disk), emails, messages, media files, and other business domains. Supports searching contacts and userids by name/pinyin/English name/alias, searching, renaming, and authorizing documents, creating and reading/writing doc online documents, creating and modifying online spreadsheets, creating/importing and reading/writing smartsheet sub-sheets/fields/records/views/charts and cell coloring/highlighting styles, creating and editing smartpages (including forms and data dashboards), creating/querying/modifying/canceling calendar events and checking free/busy status, office buildings, and meeting rooms, booking and managing online meetings (including meeting notes, todos, and full transcripts), creating/querying/modifying/completing/deleting or leaving todos, searching and uploading WeDrive files, downloading offline files, renaming supported files, and creating new folders, sending/replying to/forwarding and searching/reading emails, sending text/Markdown/image/file/voice/video messages to the current authorized user or recent active chats, as well as uploading and downloading media files. Always triggered when the user provides doc.weixin.qq.com, page.weixin.qq.com, or drive.weixin.qq.com links; even if "WeCom" is not explicitly mentioned, this skill should be triggered as long as it involves workplace scenarios such as finding people, documents, spreadsheets, schedules, meetings, todos, WeDrive, emails, or sending messages. "Document" without a specified type defaults to Smartpage; "Spreadsheet/Table" without specifying "Online Spreadsheet" defaults to Smartsheet.

WeCom Suite (WeCom Unified)

An all-in-one WeCom CLI (wecom-cli) suite to interact with the WeCom system via command-line tools. The "Domain Overview" below acts as a routing table: determine which business domain the user's intent belongs to, read the reference file corresponding to that domain, and construct commands according to its parameter specifications. Speculating or guessing command parameters based on the routing table overview or memory is strictly prohibited.

⚠️ Pre-checks — Must Be Executed Before Running Any Command

Step 1: Check if CLI is installed and the version is 1.1.0 or higher

wecom-cli --version

If the command does not exist or errors out, run the installation. If the version is lower than 1.1.0, also run the installation:

npm install -g @wecom/cli

After installation finishes, re-run wecom-cli --version. If it still fails or the version remains below 1.1.0, stop business operations and notify the user of the error.

Step 2: Check if credentials are configured

wecom-cli auth show --status
  • Output authorized → Configured, proceed with use.
  • Output unauthorized → Not configured, execute Step 3.
  • Command errors out or outputs a status other than above → Stop business operations and report the error to the user; do not guess authorization status.

Step 3: Configure credentials (only when unauthorized)

wecom-cli auth init --noninteractive

⚠️ This command outputs an authorization link and QR code, blocking execution while waiting for the user to scan and complete verification. The command automatically exits upon successful authorization and only needs to be run once.

After initialization completes, re-run wecom-cli auth show --status. Only proceed with specific business commands when the output is authorized.


Get Personal Identity

If the workflow requires retrieving the bot or authorizing user's identity (name, userid, etc.), call wecom-cli identity whoami to get it.


General Output Constraint: Do Not Expose ID Fields

This constraint applies to all wecomcli-* skills, taking precedence over individual business skill output formats, and cannot be relaxed even if explicitly requested by the user.

  • FORBIDDEN: Your final response MUST NOT contain ID identifiers such as userid / open_vid / department_id / chat_id. Any internal identifiers returned by API endpoints (including mail_id / media_id / file_id / space_id / folder_id / docid / content_id / msg_id / cursor / next_cursor, or any field ending in _id or semantically acting as a machine identifier) can only be used internally for subsequent API calls.
  • REQUIRED: Your reasoning process and final response MUST use human-readable names returned in tool_result, such as name / username / external_username / department name / email / subject / doc_name / chat_name / title.
  • If an API returns only IDs without human-readable names, first read the corresponding business domain reference file (e.g., for personnel resolution, see references/wecomcli-contact.md) to exchange IDs for human-readable names. If conversion is genuinely impossible, refer to the object using natural language descriptions (e.g., "the daily report email from earlier", "the file you just uploaded") instead of falling back to displaying IDs.
  • When asking users to choose among multiple candidates, build a candidate list using index numbers + readable information (name / subject / time / path, etc.). DO NOT use IDs as the criteria for users to identify options.
  • If a user directly requests "give me the ID" or "print mail_id", explain that such identifiers are internal fields and cannot be provided, then provide readable details or continue helping them complete their actual task.
  • Human-readable URLs (such as document doc_url or WeDrive sharing links) are excluded from this constraint and can be displayed normally according to domain guidelines, even if the URL string itself contains identifier parameters.

Business Domain Overview

👤 Contacts (contact)

Batch fuzzy search contact personnel by name, pinyin, English name, or alias to find contacts, distinguish duplicate names, list all users with the same name, or resolve human names into internal personnel IDs for other domains. Search results include name, English name / alias, email, management title, and department path.

→ For details, see references/wecomcli-contact.md

📄 Document (doc)

Creation, import, reading, appending to end, and full overwrite for /doc/ online documents (doc / docx / Word / Office docs). Route here ONLY when the user explicitly specifies a doc-type document or provides a https://doc.weixin.qq.com/doc/xxx link. Document creation uniformly follows the "Generate .docx → Import" flow. Unspecified requests like "create / write / organize into a document" default to Smartpage. Searching, renaming, adding members, or modifying permissions go to Document Management.

→ For details, see references/wecomcli-doc.md

🗂️ Document Management (doc-manage)

Common management entry point shared across document types: searching documents (including recent views, recent creations, and filtering by creator / member / date range), and renaming, adding members / modifying permissions, and setting link-join rules for doc documents, online spreadsheets, smartsheets, and smartpages. Searches can also match PPTs, forms, mind maps, flowcharts, reports, and PDFs. Use this first when the user provides only a document title and needs to locate it before reading/writing. Content reading and writing are not handled by this domain.

→ For details, see references/wecomcli-doc-manage.md

📊 Online Spreadsheet (sheet)

Creation, CSV / Excel import, reading metadata and range data, updating specified ranges, appending rows to end, and adding/deleting sub-sheets for /sheet/ online spreadsheets. Route here when the user explicitly says "online spreadsheet" or provides a https://doc.weixin.qq.com/sheet/xxx link. /smartsheet/ links or smartsheet requests route to Smartsheet. Searching, renaming, and permission management route to Document Management.

→ For details, see references/wecomcli-sheet.md

🧮 Smartsheet (smartsheet)

Data, structure, and display configuration management for /smartsheet/ smartsheets: creation/import, reading sub-sheets, fields, records, views, and charts, adding/deleting/modifying structure and records, configuring filters / sorts / groupings / formulas / charts, and setting cell/row coloring, highlights, conditional formatting, column widths, hidden fields, and frozen columns. Built-in templates can be referenced when building from scratch. If adding or updating records returns 851003 / no authority, use the Webhook fallback procedure described in this domain. Unspecified requests like "table / spreadsheet / Excel / WeCom spreadsheet" default to this domain; if the user explicitly says "online spreadsheet" or the link contains /sheet/, route to Online Spreadsheet. Searching, renaming, and permission management route to Document Management.

→ For details, see references/wecomcli-smartsheet.md

📰 Smartpage (smartpage)

Creation / Markdown import, reading page trees and body text, adding/deleting/modifying/moving pages and adjusting layouts, appending/overwriting content, block-level editing, attachment uploading, and building data-driven pages, forms, and chart pages for smartpages (smart homepages). Route here when the user mentions "smartpage / smart homepage" or provides doc.weixin.qq.com/smartpage/... or page.weixin.qq.com/smartpage/... links; generic requests like "create / write / organize document" without a specified type also default here. Published links are read-only; editing requires edit-mode links. Operations on underlying records and structures of embedded data tables are delegated to Smartsheet, while the page presentation layer remains in this domain.

→ For details, see references/wecomcli-smartpage.md

📅 Calendar (calendar)

Creating, browsing, searching, viewing details, updating, and canceling calendar events, querying multi-person free/busy schedules and common free time slots, checking office building / meeting room availability, and booking or swapping meeting rooms. This domain handles arrangements without online meeting links, including offline face-to-face meetings. Arrangements with meeting IDs / join links that support remote or video attendance route to Meeting. Ambiguous requests like "schedule a meeting / set up a sync" MUST be disambiguated first when creating according to the reference; ambiguous queries do not prompt for clarification, but instead query both Calendar and Meeting domains and merge the results. Recurring events creation, update, cancellation, and invitation accept/decline are currently unsupported.

→ For details, see references/wecomcli-calendar.md

🎥 Meeting (meeting)

Creating, browsing lists, searching keywords, viewing details, updating, and canceling online meetings (including meeting IDs / join links supporting remote or video attendance). Also reads smart AI meeting notes, meeting todos, and complete transcripts, and generates customized summaries based on transcripts upon user request. Creating / updating meeting times requires querying free/busy status via the Calendar domain; when meeting rooms are involved, the Calendar domain checks building/room availability and reserves the room, while actual booking or swapping completes alongside meeting creation/update. Offline-only arrangements without online meeting links route to Calendar; ambiguous requests like "schedule a meeting" undergo disambiguation only during creation, while ambiguous queries search across both Calendar and Meeting domains. Recurring meetings creation, update, cancellation, and invitation accept/decline are currently unsupported.

→ For details, see references/wecomcli-meeting.md

✅ Todo (todo)

Creating single or batch todos (with assignee assignment, due dates, and due-time reminders), querying details and lists, filtering by creation time, due date, completion status, and title / description keywords, as well as updating titles, descriptions, full assignee lists, and due dates, completing todos, deleting entire todos, or leaving todos created by others. Completion scope can be the current user's portion or the entire todo marked by the creator. Queries only cover existing records in the todo system; keyword searches perform literal matching rather than semantic searching. Actual reminder timing depends on backend response; individually modifying an assignee's accept / decline / uncompleted state, directly disabling reminders, or customizing arbitrary advance reminder times are currently unsupported.

→ For details, see references/wecomcli-todo.md

💾 WeDrive / Disk (disk)

Recent file list in WeDrive / cloud disk / shared spaces; searching files by keyword, type, or creator, optionally scoped to a shared space; searching folders or shared spaces themselves; reading file metadata and paths, uploading files, downloading offline binary files, renaming supported WeDrive files, and creating new folders. When searching inside a shared space, the space name acts only as a scope filter; when searching for a shared space itself, use the space name keyword and restrict the search type to space. When given only a space name without clarifying whether to find content within it or search the space itself, prompt the user for the specific target. Route here when the user explicitly mentions "WeDrive / cloud disk / shared space" or provides a https://drive.weixin.qq.com/s?k=... link. This domain handles file-level operations and online document locations; online document content editing belongs to the respective document domain, while doc / online spreadsheet / smartsheet / smartpage renaming belongs to Document Management. Moving, deleting, or copying files, deleting / renaming folders, and managing space and share permissions are currently unsupported.

→ For details, see references/wecomcli-disk.md

📧 Email (email)

Sending, replying to / replying all, and forwarding emails, supporting CC, BCC, local attachments, and inline images; browsing / searching emails by keywords, sender, date range, read status, folder, tags, attachments, starred status, importance, etc., and reading email bodies, attachments, and inline images. Route here ONLY when the user explicitly mentions "email / mailbox" for calendar invites or meeting bookings sent via email; the event / meeting entities themselves still belong to their respective business domains. Marking read/unread, deleting, drafts, writing tags, recalling, and modifying sent emails are currently unsupported. If reading regular attachments / images returns media IDs, delegate to the Media domain for downloading.

→ For details, see references/wecomcli-email.md

💬 Message (message)

Sending Markdown (plain text is also sent as Markdown), images, files, AMR audio, and video messages to the current authorized user, or to direct chats / group chats with recent bot interactions; also querying the scope of recent chats available for sending. Sending to the authorized user does not require searching chat lists first; sending to other targets requires the destination to come from the current chat list, and cannot directly use contact search results or historical chat identifiers. Media messages must first delegate to the Media domain to upload local files as sendable assets.

→ For details, see references/wecomcli-message.md

🖼️ Media (media)

Downloading files to local storage based on existing media IDs, or uploading files from known local paths as media assets reusable across messages, WeDrive, and other services. Media IDs MUST come from actual API responses or explicit user input and cannot be replaced with URLs; leak-prevention encrypted links cannot be downloaded or decrypted via this domain. This domain handles only file transfer; it does not search assets, nor does it parse or identify file content.

→ For details, see references/wecomcli-media.md