Agent skill

Wecomcli Message

by WecomTeam in WecomTeam/wecom-cli

查询当前可以发送消息的聊天会话范围,并向会话列表中的单聊或群聊发送文本、Markdown、图片、文件、语音、视频消息。用户要求“给某人发消息”“在某个群里通知”“给最近会话发消息”或“把图片/文件/语音/视频发到企业微信”时使用。

MITAuto-check passedDocuments & Office

Install Wecomcli Message

skills CLI
$ npx skills add WecomTeam/wecom-cli --skill wecomcli-message -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install WecomTeam/wecom-cli wecomcli-message --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/WecomTeam/wecom-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/wecomcli-message .claude/skills/wecomcli-message && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
wecomcli-message
GitHub stars
3.2k
Used in
1 other repo
Token cost
~1.2k tokens
SKILL.md length
296 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

查询当前可以发送消息的聊天会话范围,并向会话列表中的单聊或群聊发送文本、Markdown、图片、文件、语音、视频消息。用户要求“给某人发消息”“在某个群里通知”“给最近会话发消息”或“把图片/文件/语音/视频发到企业微信”时使用。

  • Works in 2 steps: 可以向授权人发送消息。 → 可以向授权人以外的、机器人最近有消息往来的聊天会话(单聊和群聊)发送消息。
  • Tasks that involve Markdown
  • SKILL.md covers 适用范围, 技能依赖, 获取能发送消息的会话列表 and 发送消息, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Wecomcli Message is an agent skill from WecomTeam/wecom-cli. 查询当前可以发送消息的聊天会话范围,并向会话列表中的单聊或群聊发送文本、Markdown、图片、文件、语音、视频消息。用户要求“给某人发消息”“在某个群里通知”“给最近会话发消息”或“把图片/文件/语音/视频发到企业微信”时使用。

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering Markdown. The repository describes itself as: 企业微信开放平台命令行工具 — 让人类和 AI Agent 都能在终端中操作企业微信. The licence is MIT.

When your agent uses it

  • Tasks that involve Markdown

Example prompts

  • “给某人发消息”
  • “在某个群里通知”
  • “给最近会话发消息”
  • “/wecomcli-message”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. 可以向授权人发送消息。
  2. 可以向授权人以外的、机器人最近有消息往来的聊天会话(单聊和群聊)发送消息。

What it can do on your machine

Read from SKILL.md and the folder at commit c4b9b66. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Wecomcli Message loads about 1.2k tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 296 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~33
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from WecomTeam/wecom-cli at commit c4b9b66, republished under its MIT licence (© WecomTeam). 296 words, ~1,201 tokens.

Download SKILL.mdSave it as .claude/skills/wecomcli-message/SKILL.md (or your agent's skills folder).
name
wecomcli-message
description
查询当前可以发送消息的聊天会话范围,并向会话列表中的单聊或群聊发送文本、Markdown、图片、文件、语音、视频消息。用户要求“给某人发消息”“在某个群里通知”“给最近会话发消息”或“把图片/文件/语音/视频发到企业微信”时使用。

企业微信发送消息

执行任何 wecom-cli 命令前,必须先读取并完成 wecomcli-shared 技能的公共前置检查。

  1. 可以向授权人发送消息。
  2. 可以向授权人以外的、机器人最近有消息往来的聊天会话(单聊和群聊)发送消息。

适用范围

适用
  • 适用于给授权人发消息,使用 wecom-cli identity whoami 获取授权人ID,可作为 chat_id 使用,无需调用 sessions list。
  • 适用于查询当前有权限发送消息的聊天会话范围并给这些范围中的成员或群聊发送 Markdown 消息、图片、文件、AMR 语音或视频
不适用
  • 发送对象不是授权人且不在本次 sessions list 返回结果中 → 告知用户当前只能向最近活跃的会话或授权人发送

技能依赖

调用依赖技能前,必须先完整读取对应 SKILL.md。

依赖技能触发场景数据流向
wecomcli-media发送图片、文件、语音或视频时只有本地文件路径,没有可直接复用的 media_id包含媒体上传接口,如没有已有的 media_id,必须先阅读该技能获取 media_id,上传时传入的 type 应和发送时的msg_type 对齐

获取能发送消息的会话列表

命令
bash
wecom-cli message aibot sessions list
返回
字段类型说明
sessionsarray会话列表,按最后一条消息时间从新到旧排序,具体数量以实际回包为准
sessions[].chat_idstring会话 ID
sessions[].chat_namestring群名称或单聊名称
sessions[].chat_typestringsingle 单聊或 group 群聊
sessions[].last_msg_timestring最后一条消息时间,格式 YYYY-MM-DD HH:MM:SS
sessions_countintegersessions 数组元素数量
chat_id 来源

向授权人以外的用户发送消息,调用 wecom-cli message aibot send 前,需要先调用一次 sessions list,然后从本次返回的 sessions[] 中选定目标项,把该项的 chat_id 原样复制到 send.chat_id。

以下值都不能直接作为 send.chat_id:

  • 用户输入的 ID
  • 之前轮次或历史上下文保存的 chat_id
  • wecomcli-contact 返回的 userid
  • 根据姓名、群名或其他字段自行构造的值

这些值最多只能作为匹配线索;最终发送参数必须重新取自本次 sessions list 的匹配项。

目标会话匹配
  • 聊天名称:在本次 sessions[] 中按非空 chat_name 精确匹配;不能精确匹配需要向用户反问确认发送目标,唯一命中时从匹配项复制 chat_id。
  • 最近第一个/最近某个会话:按 sessions[] 原始顺序选择用户明确指定的项。
  • 用户提供 ID:只能与本次 sessions[].chat_id 做完全相等校验;命中后仍从匹配项复制 chat_id,不能直接复用用户输入值。

匹配结果处理:

  • 唯一匹配时继续发送。
  • 多个聊天会话候选时,按返回顺序展示聊天名和最后消息时间,让用户选择。
  • 用户完成选择后,必须重新调用 sessions list,再用选定对象匹配当次返回值。
  • 无匹配时停止发送,如实告知目标不在最近 10 个会话中;不要接受外部 chat_id 绕过限制。
  • sessions_count=0 时停止发送,告知当前没有可发送的最近会话。
  • 展示会话列表时保持接口原始顺序;展示名称和时间,不展示内部 chat_id。

发送消息

前置条件

调用本接口前必须完成以下步骤:

  1. 根据发送对象选择调用 wecom-cli message aibot sessions list获取 chat_id 或 wecom-cli identity whoami 获取授权人ID。
  2. 在本次列表中唯一匹配目标。
  3. 如果发送授权人以外的对象,从列表中匹配项原样复制 sessions[].chat_id。
  4. 目标是媒体消息时,再准备对应的 media_id。

在目标会话匹配成功前,不上传媒体,也不调用 send。

命令
bash
wecom-cli message aibot send --json '<JSON 参数>'
公共参数
字段类型必填说明
chat_idstring是必须取自 wecom-cli identity whoami 或当前发送流程中刚调用的 sessions list 返回的目标 sessions[].chat_id
msg_typestring是markdown / image / file / voice / video
markdownobject条件必填仅 msg_type="markdown" 时传
imageobject条件必填仅 msg_type="image" 时传
fileobject条件必填仅 msg_type="file" 时传
voiceobject条件必填仅 msg_type="voice" 时传
videoobject条件必填仅 msg_type="video" 时传

每次请求必须且只能携带一个与 msg_type 同名的内容对象。不要传空对象,也不要同时传多个消息对象。

Markdown 消息

markdown.content 必填,最长 20480 UTF-8 字节。普通文本也按 Markdown 发送。

bash
wecom-cli message aibot send --json '{
  "chat_id": "<本次 sessions[].chat_id>",
  "msg_type": "markdown",
  "markdown": {
    "content": "<markdown 消息内容>"
  }
}'
图片消息

image.media_id 必填,必须由媒体上传接口以 type=image 上传获得。

bash
wecom-cli message aibot send --json '{
  "chat_id": "<本次 sessions[].chat_id>",
  "msg_type": "image",
  "image": {
    "media_id": "<media_id>"
  }
}'
文件消息

file.media_id 必填,必须由媒体上传接口以 type=file 上传获得;文件名取上传时的原始文件名。

bash
wecom-cli message aibot send --json '{
  "chat_id": "<本次 sessions[].chat_id>",
  "msg_type": "file",
  "file": {
    "media_id": "<media_id>"
  }
}'
语音消息

voice.media_id 必填,必须由媒体上传接口以 type=voice 上传获得;源文件仅支持 AMR 格式,不能只改扩展名冒充 AMR。

bash
wecom-cli message aibot send --json '{
  "chat_id": "<本次 sessions[].chat_id>",
  "msg_type": "voice",
  "voice": {
    "media_id": "<media_id>"
  }
}'
视频消息
字段必填说明
video.media_id是由媒体上传接口以 type=video 上传获得
video.title否最长 128 UTF-8 字节;省略时使用上传时的原始文件名
video.description否最长 512 UTF-8 字节;省略时不展示描述
bash
wecom-cli message aibot send --json '{
  "chat_id": "<本次 sessions[].chat_id>",
  "msg_type": "video",
  "video": {
    "media_id": "<media_id>",
    "title": "产品演示",
    "description": "本周版本的核心功能演示"
  }
}'

用户没有提供视频标题或描述时直接省略对应字段,不传空字符串,也不追问非必填字段。

关键约束

  • 用户明确要求发送且目标与内容完整时直接执行,不重复追问确认;缺少目标、内容或本地文件时只追问缺失项。
  • 连续发送多条时,不用每次 send 前都重新调用 sessions list 或 wecom-cli identity whoami,但连续发送中途上下文发生压缩时重新调用确保 chat_id 正确。
  • chat_id、userid、media_id 都是内部调用值,禁止面向用户展示。
  • Markdown 正文、视频标题和描述限制按 UTF-8 字节数计算;超限时不静默截断,请用户缩短或明确同意拆分。
  • 发送成功后只说明目标和消息类型,不编造消息 ID。
  • 接口失败时如实转达错误,不使用 curl / Python 等方式绕过 wecom-cli。

© WecomTeam, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/wecomcli-message of WecomTeam/wecom-cli.

Open the folder on GitHubat commit c4b9b66

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in WecomTeam/wecom-cli, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Wecomcli Message next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Wecomcli Message compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wecomcli Message this skillWecomTeam/wecom-cli3.2k1 repos~1.2kAutomated safety check: PassMIT
Markdown Article FormatterJimLiu/baoyu-skills26k6 repos~3.5kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Obsidian MarkdownAtmosphere/atmosphere3.8k20 repos~1.3kAutomated safety check: PassApache-2.0
Gzh Designisjiamu/gzh-design-skill3.9k1 repos~2.2kAutomated safety check: PassAGPL-3.0
Crosspostingwasp-lang/wasp19k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Markdown Article Formatter

    JimLiu/baoyu-skills

    Reformats plain text or Markdown articles with frontmatter, a title, a summary, headings, bold, lists and code blocks, and saves a separate formatted copy.

    26k GitHub starsUsed in 6 repos~3.5k tokens
    Documents & OfficeAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Obsidian Markdown

    Atmosphere/atmosphere

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    3.8k GitHub starsUsed in 20 repos~1.3k tokens
    Documents & OfficeAuto-check passed
  • Gzh Design

    isjiamu/gzh-design-skill

    微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…

    3.9k GitHub starsUsed in 1 repo~2.2k tokens
    Documents & OfficeAuto-check passed
  • Crossposting

    wasp-lang/wasp

    Crosspost Wasp blog articles (MDX) to DEV.to and Medium. An agent skill from wasp-lang/wasp.

    19k GitHub stars~1.1k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Segment Docs

    JanDeDobbeleer/oh-my-posh

    Reference mapping between Oh My Posh Go segment source code and MDX documentation.

    24k GitHub stars~1.1k tokensUpdated today
    Documents & OfficeAuto-check passed

More from WecomTeam/wecom-cli

All 14 skills in this repo
  • WeCom Online Doc Manager

    WecomTeam/wecom-cli

    Creates WeCom online docs, imports local .doc, .docx or .txt files as docs, reads their content and appends to or overwrites them through wecom-cli.

    3.2k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • WeCom To-Do Manager

    WecomTeam/wecom-cli

    Manages WeCom to-dos from the terminal with wecom-cli: create, list, filter, update, finish and delete them, including assignees and deadlines.

    3.2k GitHub starsUsed in 2 repos~727 tokens
    Auto-check passed
  • WeCom Calendar Scheduler

    WecomTeam/wecom-cli

    Books, views, searches, updates, cancels or checks free/busy time on WeCom (Enterprise WeChat) calendars and meeting rooms, routed away from online-meeting creation.

    3.2k GitHub starsUsed in 1 repo~3.7k tokens
    Auto-check passed
  • WeCom Document Management

    WecomTeam/wecom-cli

    Searches WeCom documents by keyword, recent views or creator, renames them, adds member permissions and sets link-join rules across doc, sheet, smartsheet and smartpage types.

    3.2k GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • WeCom Email Manager

    WecomTeam/wecom-cli

    Sends, replies to, forwards and searches enterprise WeChat mail through wecom-cli, including emailed calendar invitations and meeting bookings.

    3.2k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • WeCom Meeting Manager

    WecomTeam/wecom-cli

    Creates, finds, updates and cancels WeCom online meetings from the terminal, reads their details, summaries and transcripts, and keeps meetings apart from calendar events.

    3.2k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Questions about Wecomcli Message

What does Wecomcli Message do?

查询当前可以发送消息的聊天会话范围,并向会话列表中的单聊或群聊发送文本、Markdown、图片、文件、语音、视频消息。用户要求“给某人发消息”“在某个群里通知”“给最近会话发消息”或“把图片/文件/语音/视频发到企业微信”时使用。. Wecomcli Message is an agent skill from WecomTeam/wecom-cli.

When should I use Wecomcli Message?

Wecomcli Message fits situations like: tasks that involve Markdown.

How do I install Wecomcli Message in Claude Code?

Run `npx skills add WecomTeam/wecom-cli --skill wecomcli-message -a claude-code`. Or copy the skill folder (skills/wecomcli-message in WecomTeam/wecom-cli) into .claude/skills/wecomcli-message in your project. Claude Code loads it when a task matches its description.

How do I install Wecomcli Message in Codex?

Run `npx skills add WecomTeam/wecom-cli --skill wecomcli-message -a codex`. Or copy the skill folder (skills/wecomcli-message in WecomTeam/wecom-cli) into .agents/skills/wecomcli-message in your project. Codex loads it when a task matches its description.

Can I use Wecomcli Message in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add WecomTeam/wecom-cli --skill wecomcli-message -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wecomcli-message, .gemini/skills/wecomcli-message, .github/skills/wecomcli-message and .opencode/skills/wecomcli-message in your project.

What does Wecomcli Message need to run?

SKILL.md names no scripts, command-line tools or credentials: Wecomcli Message is instructions for the agent only. Our summary lists: Python 3.

Does Wecomcli Message access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Wecomcli Message safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Wecomcli Message use?

Wecomcli Message is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Wecomcli Message use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Wecomcli Message?

Skills that share tags, products or a category with Wecomcli Message: Markdown Article Formatter (JimLiu/baoyu-skills, 26k stars), Markitdown (ImCa0/just-laws, 781 stars), Obsidian Markdown (Atmosphere/atmosphere, 3.8k stars) and Gzh Design (isjiamu/gzh-design-skill, 3.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wecomcli Message?

WecomTeam (a GitHub organization) maintains it in WecomTeam/wecom-cli, which has 3,159 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on September 24, 2026.

Source: WecomTeam/wecom-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.