Install
openclaw skills install wechat-forward按需将当前对话内容转发到用户自己的微信。仅在用户明确要求"把这个发微信"时才执行, 将最近的消息内容通过 wxclawbot CLI 推送到用户微信,用于手机端查看。 Trigger ONLY when explicit: 发微信, 推送到微信, 发到微信, forward to wechat, 发给我微信, 帮...
openclaw skills install wechat-forward这个技能解决的是:用户在 Webchat 聊天时,偶尔想切换到手机微信上查看对话内容。
用户说"把这个发微信"
↓
Agent 将当前消息整理后
↓
wxclawbot CLI 发送到用户微信
↓
用户手机微信收到消息
用户明确说出或写道:
| 触发词 | 示例 |
|---|---|
| 发微信 | "把这个发微信" |
| 发到微信 | "把这段发到微信" |
| forward to wechat | "forward this to wechat" |
| 发消息 | "给我微信发个消息" |
| 场景 | 理由 |
|---|---|
| 定时任务 | 未授权,不主动推 |
| 每日自动总结 | 同左 |
| 告警通知 | 除非用户设置过 |
| 内容生成(没提微信) | 只有明确说"微信"才触发 |
将当前消息整理后发送:
wxclawbot send --text "消息内容" --json
如需同时发送文件:
wxclawbot send --file /path/to/file --text "说明" --json
成功时:{"ok":true,"to":"user@im.wechat","clientId":"..."}
失败时:检查 errorKind(timeout/connection/dns/tls)和 retryable 字段
ret=-2 时等 60-120 秒重试当用户说"把这个发微信"时:
原则:让用户手机上一眼能看懂,不啰嗦、不丢重点。
已安装 wxclawbot CLI 并登录微信账号(openclaw-weixin 已配置即可)。
验证方法:
wxclawbot accounts --json
| 现象 | 原因 | 处理 |
|---|---|---|
ok:false, ret=-2 | 频率限制 | 等 60-120 秒重试 |
ok:false, ret=-14 | 会话过期 | 重新登录微信 |
| No account found | 凭证缺失 | 检查 accounts 目录 |
ok:true 但用户没收到 | Context token 过期 | 用户给机器人发条消息刷新 |