Skip to content

Commit 5f89735

Browse files
lroolleclaude
andcommitted
docs: scenarios as agent prompts, not CLI commands
The user talks to their agent in natural language. The agent uses the skill internally. Scenarios should show what you SAY to your agent, not what wxclawbot commands to run. The CLI reference section is for the agent and scripts, not for humans. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0e5d0a4 commit 5f89735

2 files changed

Lines changed: 95 additions & 171 deletions

File tree

README.en.md

Lines changed: 48 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -2,81 +2,61 @@
22

33
[简体中文](./README.md) | [npm](https://www.npmjs.com/package/@herai/wxclawbot-cli) | [GitHub](https://github.com/lroolle/wxclawbot-cli) | [ClawHub](https://clawhub.ai/lroolle/wxclawbot-send)
44

5-
Let your OpenClaw AI agent proactively send WeChat messages. Text, images, video, files -- whatever you need.
5+
Let your OpenClaw AI agent proactively send WeChat messages. Text, images, video, files.
66

77
## Why This Exists
88

9-
WeChat's official bot API has one glaring limitation: bots can only *reply*. They can't initiate conversations. It's like hiring an assistant who only speaks when spoken to. Completely useless for reminders, alerts, or anything proactive.
9+
WeChat's bot API only supports replies -- bots can't initiate. This skill fixes that. Your agent can now send messages on its own schedule.
1010

1111
> "Currently doesn't support proactively sending you messages on a schedule"
1212
>
1313
> -- [Lobster's WeChat Integration Tutorial](https://mp.weixin.qq.com/s/nYDQ1obQEHe1WavGpNzasQ)
1414
15-
**This CLI fixes that.** Your OpenClaw agent can now send messages on its own schedule -- timed reminders, monitoring alerts, automated reports. Reuses [openclaw-weixin](https://www.npmjs.com/package/@tencent-weixin/openclaw-weixin) credentials, no extra auth dance.
15+
## How It Works
1616

17-
## What Can It Actually Do?
18-
19-
### Life Reminders (Before Your Body Reminds You the Hard Way)
17+
### 1. Install the skill
2018

2119
```bash
22-
# Every 45 minutes
23-
wxclawbot send --text "Drink water. Don't wait for kidney stones to remind you." --json
24-
25-
# Every hour of sitting
26-
wxclawbot send --text "Your ass has been welded to that chair for 60 minutes. Stand up." --json
27-
28-
# 1 AM and still coding
29-
wxclawbot send --text "Your code quality is receding faster than your hairline. Go to sleep." --json
30-
31-
# Friday 5:55 PM
32-
wxclawbot send --text "5 minutes to freedom. Don't accept new tasks. Don't reply to messages. Prepare to run." --json
33-
34-
# Weekdays 11:15 AM
35-
wxclawbot send --text "Order lunch now or delivery gets backed up until 2 PM. Enjoy hunger-driven development." --json
20+
clawhub install wxclawbot-send
3621
```
3722

38-
### DevOps (Know When Production Is on Fire)
39-
40-
```bash
41-
# CI/CD broke
42-
wxclawbot send --text "CI is down. It was @zhangsan's commit abc1234. Please clean up your mess." --json
43-
44-
# PR sitting unreviewed for 24h
45-
wxclawbot send --text "PR #42 has been sitting there for 24 hours. Review it. Code doesn't merge itself." --json
23+
### 2. Just talk to your agent
4624

47-
# Deploy succeeded
48-
wxclawbot send --text "v2.3.1 is live. Nothing has exploded yet." --json
25+
No code, no cron config, no CLI. The agent handles scheduling and invocation internally.
4926

50-
# Deploy failed
51-
wxclawbot send --text "v2.3.1 blew up. Don't panic. Well, panicking won't help anyway." --json
27+
**Life reminders:**
5228

53-
# Error rate spike
54-
wxclawbot send --text "Production error rate at 15%. Normal is 0.1%. Might want to look at that." --json
55-
56-
# GitHub contributions gap
57-
wxclawbot send --text "Your GitHub contribution graph is turning into a desert. 3 days without commits." --json
58-
```
59-
60-
### Business Operations (Let Robots Do the Boring Stuff)
61-
62-
```bash
63-
# Daily report
64-
wxclawbot send --file ./daily-report.pdf --text "Today's numbers. Attached." --json
29+
> Remind me to drink water every 45 minutes, be blunt about it
30+
>
31+
> Every hour of sitting, tell me to stand up
32+
>
33+
> If I'm still chatting with you after 1 AM, tell me to go to sleep
34+
>
35+
> Friday 5:55 PM, remind me to stop working and leave
36+
>
37+
> Weekdays 11:15, remind me to order lunch before delivery backs up
6538
66-
# SLA breach
67-
wxclawbot send --text "Ticket #1024 has exceeded SLA by 4 hours. Escalating." --json
39+
**DevOps alerts:**
6840

69-
# Security alert
70-
wxclawbot send --text "Suspicious login detected from Ho Chi Minh City. If that's not you, change your password now." --json
41+
> When CI breaks, WeChat me immediately with whose commit caused it
42+
>
43+
> If a PR sits unreviewed for 24 hours, ping me
44+
>
45+
> Notify me on every deploy, success or failure
46+
>
47+
> If production error rate exceeds 1%, alert me via WeChat immediately
7148
72-
# Server alert
73-
wxclawbot send --text "prod-03 disk usage at 95%. Clean it up or enjoy the disk-full show." --json
49+
**Business ops:**
7450

75-
# Screenshots / images
76-
wxclawbot send --file ./monitoring-screenshot.png --text "Dashboard snapshot" --json
77-
```
51+
> Send me yesterday's key metrics summary every morning at 9
52+
>
53+
> Auto-escalate tickets that exceed SLA by 4 hours
54+
>
55+
> Alert me on suspicious logins immediately
56+
>
57+
> Notify me when any server disk exceeds 90%
7858
79-
Combine with cron, GitHub Actions, or your own monitoring scripts. Go wild.
59+
That's it. You talk, the agent works.
8060

8161
## Install
8262

@@ -90,9 +70,9 @@ Or via npm:
9070
npm install -g @herai/wxclawbot-cli
9171
```
9272

93-
Requires Node.js >= 20. This is not negotiable.
73+
Requires Node.js >= 20, openclaw-weixin logged in.
9474

95-
## Usage
75+
## CLI Reference (for agents and scripts)
9676

9777
```bash
9878
wxclawbot send --text "message" --json
@@ -102,45 +82,31 @@ wxclawbot send --to "user@im.wechat" --text "Hello" --json
10282
echo "report ready" | wxclawbot send --json
10383
```
10484

105-
- `--to` defaults to the bound user from your openclaw account. Use `--to` for someone else.
106-
- `--json` -- **always use this**. The non-JSON output format is not stable and you will regret relying on it.
107-
- Supports stdin pipe input for scripting.
108-
109-
Media type auto-detected by extension:
110-
- Image: `.png` `.jpg` `.jpeg` `.gif` `.webp` `.bmp`
111-
- Video: `.mp4` `.mov` `.webm` `.mkv` `.avi`
112-
- File: everything else
85+
- `--to` defaults to the bound user from the openclaw account
86+
- `--json` always use this
87+
- Media type auto-detected: image (.png .jpg .jpeg .gif .webp .bmp), video (.mp4 .mov .webm .mkv .avi), file (everything else)
11388

114-
## Output
89+
Output:
11590

11691
```json
11792
{"ok":true,"to":"user@im.wechat","clientId":"..."}
118-
```
119-
120-
```json
12193
{"ok":false,"error":"ret=-2 (rate limited, try again later)"}
12294
```
12395

124-
**Exit code 0 means the CLI ran successfully. It does NOT mean the message was delivered.** Always check the `ok` field. Yes, this violates the spirit of Unix exit codes. Reality doesn't care about your principles -- network calls and local execution are different things.
125-
126-
## Errors
96+
| ret | meaning | action |
97+
|-----|---------|--------|
98+
| -2 | rate limited | wait 5-10s, retry |
99+
| -14 | session expired | re-login via openclaw |
127100

128-
| ret | meaning | what to do |
129-
|-----|---------|------------|
130-
| -2 | rate limited | Wait 5-10 seconds and retry. Do not `while true` loop this. That makes it worse. |
131-
| -14 | session expired | Re-login via openclaw. Tokens don't last forever. |
132-
133-
Rate limit: **~7 messages / 5 minutes** per bot account, enforced server-side, shared across all clients. No, you can't bypass it with multiple processes. Don't try.
101+
Rate limit: **~7 msgs / 5 min** per bot account, server-side.
134102

135103
## Accounts
136104

137105
```bash
138106
wxclawbot accounts --json
139107
```
140108

141-
Auto-discovers from `~/.openclaw/openclaw-weixin/accounts/`.
142-
143-
Env var override (for CI/CD or containers):
109+
Auto-discovers from `~/.openclaw/openclaw-weixin/accounts/`. Env override:
144110

145111
```bash
146112
export WXCLAW_TOKEN="bot@im.bot:your-token"
@@ -149,8 +115,6 @@ export WXCLAW_BASE_URL="https://ilinkai.weixin.qq.com"
149115

150116
## Programmatic API
151117

152-
Don't want the CLI? Use it as a library:
153-
154118
```typescript
155119
import { WxClawClient } from "@herai/wxclawbot-cli";
156120
import { resolveAccount } from "@herai/wxclawbot-cli/accounts";
@@ -166,15 +130,13 @@ await client.sendText("user@im.wechat", "Hello");
166130
await client.sendFile("user@im.wechat", "./photo.jpg", { text: "Check this" });
167131
```
168132

169-
`resolveAccount()` follows the same discovery logic as the CLI: env vars > local account files.
170-
171133
## Links
172134

173135
- [npm](https://www.npmjs.com/package/@herai/wxclawbot-cli)
174136
- [GitHub](https://github.com/lroolle/wxclawbot-cli)
175137
- [ClawHub](https://clawhub.ai/lroolle/wxclawbot-send) -- `clawhub install wxclawbot-send`
176-
- [WeChat Integration Tutorial](https://mp.weixin.qq.com/s/nYDQ1obQEHe1WavGpNzasQ) -- start here for basic setup
138+
- [WeChat Integration Tutorial](https://mp.weixin.qq.com/s/nYDQ1obQEHe1WavGpNzasQ) -- start here
177139

178140
## License
179141

180-
MIT -- take it and run.
142+
MIT

0 commit comments

Comments
 (0)