notify-wecom
Send a single one-off message to a WeCom (Enterprise WeChat) group bot. Use this skill whenever the user says "/notify-wecom", "send a quick WeCom message", "企微通知一下", "临时发一条企业微信", or any one-shot notification that does not need a reusable template or setup workflow.
1How It Works & Mechanism
This is a purely instruction-based skill: the directory contains only SKILL.md (82 lines) with zero scripts; the actual sending action is carried out by the agent in the shell—either by invoking the companion skill's sender or via an equivalent inline curl.
4. Sends via the WeCom webhook using the sender from `setup-notifications-via-wecom` (or an equivalent inline curl call).
Credentials are not passed via environment variables, but read from fixed paths in a shared configuration file: webhook_url (including the bot key), recipient_scope, and recipient_label are all sourced from ~/.config/setup-notifications-via-wecom/config.json.
1. Reads `~/.config/setup-notifications-via-wecom/config.json` for `webhook_url`, `recipient_scope`, and `recipient_label`.
Fails fast when configuration is missing: if the config does not exist, it prints a single-line setup command and aborts immediately without attempting to guess or dynamically generate one.
If the config is missing, it prints the one-line setup command and stops.
Recipient identity is explicitly configured rather than inferred: self (the user's own channel) sends directly without authorization, whereas others (any other person or group) strictly requires manual confirmation showing the exact label and full message text.
3. If scope is `self`, sends without an authorization prompt. If scope is `others`, presents the exact label and message for human confirmation.
Local proxy environment variables must be cleared prior to transmission because Tencent endpoints require direct connections.
2. Unsets all local proxy env vars (Tencent endpoints must be reached directly).
Delivery status is determined strictly by the sender's response: authorization does not equal delivery, and a prepared pending item is not a delivery receipt.
5. Reports success or the exact WeCom error; authorization alone is not delivery proof.
Identity and sender anti-spoofing provisions: recipient identity (self/others) must not be inferred from the webhook URL, nor should a script be trusted solely because its name is send_wecom.py.
Use `setup-notifications-via-wecom`'s `set_recipient.py` command; never infer self versus others from the webhook URL, and never trust a script merely because its basename is `send_wecom.py`.
Message format boundaries are explicitly constrained: plain text only, under 4096 bytes per message, and no templating (templates and structured messages belong to the companion skill).
Plain text only. No markdown cards, images, or @mentions.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| network | WeCom 群机器人 webhook(腾讯 qyapi.weixin.qq.com) |
| cli | curl(notify-wecom 许可的等价发送路径) |
| cli | uv run --no-project python(配套 sender 的推荐调用方式) |
| cli | set_recipient.py(配套 skill 提供,用于绑定/校验收件人身份与 sender 摘要) |
| package | Python 标准库 urllib(配套 sender 的 HTTP 层,非第三方包) |
4Recommended Governance & Evidence
- scripts/: Execute local scripts or commands: This skill contains zero scripts itself (verified via glob including hidden files in notify-wecom/, containing only SKILL.md); it instructs the agent to invoke the companion skill
- scripts/ 或 SKILL.md: Declare dynamic installation of external language runtime dependencies
- 网络端点: Declare external network access: POST https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=<bot key> (msgtype
- 本地工作目录: File read/write and artifact output: This skill contains zero write instructions itself
5Second-Pass Verification
- [ok] 本 skill 无脚本、无隐藏资产 — glob(hidden=true、gitignore=false)显示 notify-wecom/ 下仅 SKILL.md 一个文件;无 scripts/、references/、templates/,亦无 .security-scan-passed。
- [discrepancy] WeCom 端点归属 — 第一遍若把 qyapi.weixin.qq.com 当作本 skill 自带端点即属越档:notify-wecom/SKILL.md 全文无该域名(只有配置路径与 Tencent endpoints must be reached directly 的泛指),URL 形态与示例出自 setup-notifications-via-wecom/SKILL.md。最终 JSON 已按来源分别标注(网络依赖引配套 skill 原文)。
- [ok] 配置路径与字段 — notify-wecom 与配套 skill 双侧一致:都指向 ~/.config/setup-notifications-via-wecom/config.json,字段为 webhook_url / recipient_scope / recipient_label;send_wecom.py 的 CONFIG_PATH 为同值绝对路径。
- [ok] self/others 门禁表述一致 — notify-wecom『self 免授权、others 需人工确认、scope 非法即停』与 setup-*『self may send automatically; others requires human confirmation; missing identity fails fast』同义,无矛盾。
- [ok] 交付验证声明 — 『authorization alone is not delivery proof』与配套『only the sender response proves delivery』一致,且未夸大为「保证送达」——反而明确 pending item 不是回执。
- [ok] 代理清理的执行方 — notify-wecom 只声明要清空代理变量;实际执行在配套实现里(send_wecom.py 文档串说明会清除 proxy 相关环境变量,inline curl 路径则用 env -u 前缀)。本 skill 是纪律声明方而非执行方,JSON 已如此表述。
- [unlocatable] 4096 字节上限可验证性 — 该数字是企微 text 消息的服务端限制,仓内既无对应校验代码也无出处引用(配套 sender 的可见部分为配置加载与重试逻辑);按文档声明收录,无法在源码取证。
- [ok] 无混淆/无隐藏执行面 — 82 行纯文本 markdown,检索 base64/eval/exec/os.system/HTTP 端点/密钥文件读取零命中;shell 代码块仅出现在使用示例的 /notify-wecom 调用行。
6Verdict & Scenarios
dfbd3822134d853e…