← Back to Skills Marketplace
billllx

WeChat Proactive Push

by Bill Xu · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
43
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install wechat-push-skill
Description
微信主动推送 — 让本地 Agent 主动推送消息到用户手机微信(绕过 24h 客服窗口限制)。当用户提到 微信主动推送、推微信消息、push 微信、给用户发微信、绕过 24h 限制、推送失败排查、推送假成功、ret=-2、errcode=-14、session timeout 时触发。涵盖:openclaw m...
README (SKILL.md)

微信主动推送 skill

装上就能用:wechat-push "消息" → 用户手机微信收到

这是什么

一个让本地 Agent 主动向用户手机微信推送消息的工程化方案。绕过微信官方的"24 小时客服窗口"限制(用户必须先发消息、Agent 才能在 24 小时内回复),实现真正的"主动告知"。

何时使用

用户表达需要

  • "我想让 Agent 主动发微信"
  • "微信主动推送怎么搞"
  • "怎么推消息到用户微信"
  • "绕过 24 小时窗口"

用户报告故障

  • "推送失败 / 收不到"
  • "脚本说 SUCCESS 但用户没收到"(假成功)
  • "推消息 ret=-2 / errcode=-14"
  • "session timeout"
  • "换了账号还是推不出去"

核心原则(先记住这 3 条)

  1. 必须走 OpenClaw 内部通道 openclaw message send —— 裸 curl ilink 在 macOS 上 99% 不通
  2. 必须用活跃 bot 账号 —— 账号目录里可能有多个 *@im.bot.json,按 mtime 选最近的
  3. 必须校验业务层响应 —— Sent via + exit 0 双条件 = 真成功;只看 HTTP 200 = 假成功

完整链路(5 跳)

① 触发层(cron / Agent / 健康检查 / 手动)
    ↓
② 推送脚本  wechat-push.py
    ↓
③ 通道选择  →  openclaw message send CLI
    ↓
④ OpenClaw 微信插件(node 进程,长连接常驻)
    ↓
⑤ ilink 服务端  →  POST /ilink/bot/sendmessage
    ↓
⑥ 用户手机微信

详见 references/protocol-notes.md

装上即用

# 一键安装
bash ~/.openclaw/skills/wechat-push-skill/install.sh

# 安装过程中会:
#   1. 检查 openclaw CLI
#   2. 探测活跃 bot 账号
#   3. 引导配置 openid
#   4. 链接命令到 ~/.local/bin
#   5. 跑一次 verify 验证链路

用法(装完就能用)

# 推一条消息
wechat-push "你好"

# 推给指定 openid(临时覆盖配置)
wechat-push --to [email protected] "你好"

# 静默推送(不响通知,用于探活)
wechat-push --silent "probe test"

# 预演:只打印将使用的 openid/account,不发送
wechat-push --dry-run "你好"

# 链路 5 跳自检
wechat-push-verify

# 故障排查
wechat-push-doctor

文件结构

wechat-push-skill/
├── SKILL.md              ← 你正在看
├── README.md             ← 公开说明(中英)
├── install.sh            ← 一键安装
├── bin/
│   ├── wechat-push       ← 主命令
│   ├── wechat-push-verify   ← 链路自检
│   └── wechat-push-doctor   ← 故障排查
├── lib/
│   ├── wechat_push.py    ← 推送核心
│   ├── ilink_probe.sh    ← 探活
│   └── (config 自动生成在 ~/.config/wechat-push/)
├── templates/
│   └── config.example    ← openid 配置模板
└── references/
    ├── protocol-notes.md ← ilink 协议关键点
    └── troubleshooting.md ← 6 种故障模式库

4 个自动化 cron(可选)

安装后可加这些 cron 自动化推送:

cron 频率 作用
wechat-monitor-5min 5m 看 Mac mini 微信插件状态
ilink-probe-15min 15m silent 探活,状态变 DOWN 时主动告警
daily-morning-briefing 0 8 * * * 早报(C 档详细版)
daily-evening-summary 0 21 * * * 晚报
# 加探活 cron(最常用)
openclaw cron add ilink-probe-15min \
  --every "15m" --session main \
  --system-event "触发 ilink 探活,跑 wechat-push-skill 的 ilink_probe.sh"

6 种故障模式(速查表)

现象 根因 修法
脚本说 SUCCESS,用户没收到 假成功(只看 HTTP 200) 用本 skill v2,校验 Sent via
errcode=-14, "session timeout" bot session 被微信踢 换活跃账号 / 重新扫码
ret=-2 / HTTP 000 裸 curl 裸 ilink 网络层不通 必须走 openclaw message send
getupdates 有响应,sendmessage 推不出 半活状态 plugin 内部状态不同步,重启 plugin
推了 8 次后突然全失败 bot session 静默被踢 等几小时自动恢复 / 重新扫码
推一次 silent 成功,推非 silent 失败 openid 不对 确认 --to 是目标 openid

详见 references/troubleshooting.md

验证标准

装完跑 wechat-push-verify所有 5 跳都 ✅ OK = 装成功。

推一条测试消息 wechat-push "test from skill"用户手机微信实际收到 = 真成功。脚本 exit 0 只能说明命令层通过,不能替代手机端确认。

局限

  • ❌ 不支持多人 / 群发(每个用户单独 install)
  • ❌ 不支持模板消息(卡片 / 图文)
  • ❌ 不支持主动告警 cron(自己加)
  • ❌ 不支持早报/晚报生成(自己写生成逻辑)
  • ✅ 推消息(单条文本)= 唯一核心能力

引用

  • 推送脚本核心:lib/wechat_push.py(~180 行)
  • 探活脚本:lib/ilink_probe.sh
  • 安装器:install.sh
  • 公开说明:README.md
  • 协议笔记:references/protocol-notes.md
  • 故障库:references/troubleshooting.md
Usage Guidance
Install only if you control the OpenClaw WeChat account and have clear consent from the recipient. Treat openids, bot account files, and context-token files as sensitive; avoid running the cron probe unless you intentionally want recurring outbound traffic. Review the installer first, especially the silent verification probe and local symlinks.
Capability Tags
crypto
Capability Assessment
Purpose & Capability
The README, SKILL.md, and code are coherent: the skill sends WeChat messages through `openclaw message send`. The concern is that the stated purpose is to bypass WeChat's 24-hour messaging limit and support silent/recurring probes without strong consent, compliance, or misuse warnings.
Instruction Scope
Runtime instructions allow arbitrary message text, explicit target openids, silent sends, stdin input, and optional cron automation. These fit the purpose, but the artifacts do not require recipient authorization or clear operator confirmation before external transmission beyond ordinary CLI invocation.
Install Mechanism
The installer creates a local config, sets it to mode 600, links commands into `~/.local/bin`, and prompts before a visible test send. It also runs verification that invokes a silent probe, uses `${EDITOR:-nano}` after prompting, and references a missing `templates/config.example`, which is a reliability issue.
Credentials
The skill reads `~/.openclaw/openclaw-weixin/accounts` files, including context-token and sync metadata, to select a bot account for sending. That is purpose-aligned, but it touches sensitive local account/session metadata and prints full openids in some flows.
Persistence & Privilege
No daemon or cron job is installed automatically, but the documentation encourages optional recurring OpenClaw cron probes every 15 minutes. Installed symlinks and config persist locally until removed.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install wechat-push-skill
  3. After installation, invoke the skill by name or use /wechat-push-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release
Metadata
Slug wechat-push-skill
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is WeChat Proactive Push?

微信主动推送 — 让本地 Agent 主动推送消息到用户手机微信(绕过 24h 客服窗口限制)。当用户提到 微信主动推送、推微信消息、push 微信、给用户发微信、绕过 24h 限制、推送失败排查、推送假成功、ret=-2、errcode=-14、session timeout 时触发。涵盖:openclaw m... It is an AI Agent Skill for Claude Code / OpenClaw, with 43 downloads so far.

How do I install WeChat Proactive Push?

Run "/install wechat-push-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is WeChat Proactive Push free?

Yes, WeChat Proactive Push is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does WeChat Proactive Push support?

WeChat Proactive Push is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created WeChat Proactive Push?

It is built and maintained by Bill Xu (@billllx); the current version is v1.0.0.

💬 Comments