wecomcli-message

Send Markdown, image, file, voice, and video messages to WeCom chats via wecom-cli.

287|46|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/YanHaidao/wecom --skill wecomcli-message-yanhaidao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wecomcli-message
Source: https://github.com/YanHaidao/wecom/tree/main/skills/wecomcli-message
Command: npx skills add https://github.com/YanHaidao/wecom --skill wecomcli-message-yanhaidao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Sending messages through WeCom (Enterprise WeChat) bots requires knowing which chats the bot is allowed to reach and obtaining valid chat IDs and media IDs. This Skill guides the AI to query the authorized session list, match the correct target conversation, and deliver text, Markdown, image, file, voice, or video messages without exposing internal identifiers to users. ## Core Features & Use Cases - Session Discovery: Lists recent single and group chats the bot can message, sorted by last message time, and matches targets by chat name or position. - Multi-Type Message Sending: Sends Markdown (up to 20480 UTF-8 bytes), images, files, AMR voice, and video messages with optional title and description. - Strict chat_id Handling: Requires chat_id to come from the current sessions list or the authorized user's identity, preventing spoofed or stale targets. - Use Case: A user says "send this week's report PDF to the product group" — the Skill lists recent sessions, matches the group, obtains a media_id via the media upload skill, and delivers the file message. ## Quick Start Ask the AI to send a Markdown message saying hello to your most recent WeCom group chat using wecom-cli.

Frequently Asked Questions about wecomcli-message

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

FAQPage Schema
How do I send a message to a WeCom group chat with a bot?

First call wecom-cli message aibot sessions list to get recent chats, match the target group by chat_name, then call wecom-cli message aibot send with the matched chat_id and a markdown content object. The chat_id must come from the current sessions list, not user input.

How to send images or files through WeCom bot messages?

Upload the local file via the media upload interface first to get a media_id with the matching type (image, file, voice, or video), then pass that media_id in the send request. Voice messages require genuine AMR format files.

Can I send WeCom messages to any user by their userid?

No. Messages can only go to the authorized user (via identity whoami) or to chats appearing in the current sessions list. A userid from contacts cannot be used directly as chat_id, and external IDs are rejected.

Why does WeCom message sending fail with an invalid chat_id?

The chat_id was likely reused from an earlier conversation turn or constructed manually. Re-run sessions list in the current flow and copy the chat_id from the fresh response, especially after context compression.

What are the message size limits for WeCom bot Markdown messages?

Markdown content is limited to 20480 UTF-8 bytes. Video titles are capped at 128 bytes and descriptions at 512 bytes. Content exceeding limits should be shortened or split with user consent rather than silently truncated.