Xpersona
微

微信 ClawBot 插件安装

CLAWHUB · Unverified

Install and connect the WeChat ClawBot (微信ClawBot) channel plugin for OpenClaw. Patches qrcode-terminal to output scannable image URLs instead of ASCII QR co... Skill: 微信 ClawBot 插件安装 Owner: shaojiankui Summary: Install and connect the WeChat ClawBot (微信ClawBot) channel plugin for OpenClaw. Patches qrcode-terminal to output scannable image URLs instead of ASCII QR co... Tags: latest:5.0.1 Version history: v5.0.1 | 2026-03-24T05:07:38.286Z | user 增加 ClawBot 字样 v5.0.0 | 2026-03-24T05:05:23.171Z | user 中文重写,突出 accountId 不匹配问题 v4.0.1 | 2026-03-24T05:01:17.649Z | user Fix sed com

62
Rank
84
Safety
1.4k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.4K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s170hgfre3f9fsef6w4qbne3sx83g54t:weixin-setup
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-shaojiankui-weixin-setup/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

41,586 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: openclaw-weixin-setup
description: "Install and connect the WeChat ClawBot (微信ClawBot) channel plugin for OpenClaw. Patches qrcode-terminal to output scannable image URLs instead of ASCII QR codes, which break in non-monospace surfaces like webchat, Discord, Feishu. Use when the user asks to set up WeChat, connect WeChat, install the WeChat plugin, scan WeChat QR code, link WeChat to OpenClaw, or says 微信ClawBot, 微信插件, 连接微信, 微信扫码. Triggers on phrases like connect WeChat, install WeChat plugin, 微信, 微信扫码登录."
---

# 微信 ClawBot 插件安装与连接

English: Install, connect, and troubleshoot the WeChat ClawBot channel plugin for OpenClaw.

## 前置条件

- OpenClaw 已安装并运行(`openclaw` CLI 可用)
- 手机上有微信账号,用于扫码
- Node.js / npm(用于 patch)

## 流程

### 第 1 步:安装插件

```bash
npx -y @tencent-weixin/openclaw-weixin-cli@latest install
```

### 第 2 步:Patch qrcode-terminal(webchat/Discord/Feishu 必需)

插件使用 `qrcode-terminal` 输出 ASCII 二维码,在等宽终端里正常,但在 webchat、Discord、Feishu 等界面里**无法扫描**。

需要 patch 为图片 URL 输出:

```bash
QR_MAIN=$(find /home/node/.openclaw/extensions/openclaw-weixin/node_modules/qrcode-terminal/lib/main.js -type f 2>/dev/null | head -1)

if [ -f "$QR_MAIN" ]; then
  sed -i '/var qrcode = new QRCode(-1, this.error);/c\
        // Patched: output image URL instead of ASCII\
        var encoded = encodeURIComponent(input);\
        var imageUrl = "https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=" + encoded;\
        var output = "\\n📷 扫码链接(复制到浏览器打开或微信扫一扫):\\n" + imageUrl + "\\n";\
        if (cb) cb(output); else console.log(output);\
        return;\n' "$QR_MAIN"
  echo "✅ 已 patch $QR_MAIN"
else
  echo "ERROR: qrcode-terminal 未找到,请先安装微信插件"
fi
```

⚠️ **重要:** 插件更新后 patch 会丢失,需要重新执行。

### 第 3 步:登录扫码

```bash
openclaw channels login --channel openclaw-weixin --verbose
```

会输出一个 QR 图片链接。在浏览器打开,用微信扫码完成连接。

### 第 4 步:验证连接

```bash
openclaw status 2>&1 | grep -i "openclaw-weixin"
```

期望输出:`openclaw-weixin │ ON │ OK`

### 第 5 步:⚠️ 修复 accountId 不匹配(常见问题)

扫码登录成功后,插件注册的 accountId 和 config 里的可能不一致,**导致收不到消息**。

排查方法:

1. 查看 config:`openclaw config get channels.openclaw-weixin`
2. 查看实际注册:`cat /home/node/.openclaw/state/openclaw-weixin/accounts.json`
3. 如果不一致,更新 config 并 reload:

```bash
# 把 NEW_ACCOUNT_ID 替换为 accounts.json 里的值
openclaw config set channels.openclaw-weixin.accountId "NEW_ACCOUNT_ID"

# Reload gateway
kill -USR1 $(pgrep -f openclaw-gateway)
```

## 添加更多微信账号

```bash
openclaw channels login --channel openclaw-weixin
```

每次扫码创建一个新账号,可同时在线多个。

## 会话隔离(可选)

按微信账号隔离会话上下文:

```bash
openclaw config set agents.mode per-channel-per-peer
```

## 常见问题

| 问题 | 解决方案 |
|------|----------|
| 二维码在聊天中无法扫描 | 执行 patch(第 2 步)或用真实终端 |
| 二维码过期 | 重新运行 `openclaw channels login --channel openclaw-weixin` |
| 插件未加载 | 检查 `openclaw status`,确认已启用 |
| 发消息没回复 | ⚠️ 检查 accountId 不匹配(第 5 步) |
| 连接断开 | 重新运行登录命令重新认证 |
| 插件更新后 patch 失效 | 重新执行 qrcode-terminal patch(第 2 步) |

_meta.json

{
  "ownerId": "kn73sc03e9d0cxp6qe3p1njyk983fqtw",
  "slug": "weixin-setup",
  "version": "5.0.1",
  "publishedAt": 1774328858286
}

skill-card.md

## Description:

Install and connect the WeChat ClawBot channel plugin for OpenClaw, including a qrcode-terminal patch that emits scannable QR image URLs for chat surfaces where ASCII QR codes are unreliable.

This skill is ready for commercial/non-commercial use.

## Publisher:

[shaojiankui](https://clawhub.ai/user/shaojiankui)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and operators use this skill to install, connect, verify, and troubleshoot the WeChat ClawBot channel in OpenClaw. It is intended for workflows where WeChat login, QR-code scanning, accountId repair, and optional per-account session isolation need step-by-step command guidance.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The workflow exposes WeChat login QR contents to a third-party QR service.

Mitigation: Prefer local QR rendering that keeps QR contents inside the controlled OpenClaw environment.

Risk: The patch persistently rewrites the installed qrcode-terminal dependency.

Mitigation: Review the patch before use, keep the generated backup, and be prepared to restore the backup or reinstall the plugin after testing.

Risk: The install command uses the latest plugin release instead of a pinned version.

Mitigation: Prefer a version-pinned installer when reproducibility or change control matters.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/shaojiankui/skills/weixin-setup)
- [Third-party QR image service used by the patch](https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, configuration, guidance]

**Output Format:** [Markdown with inline bash code blocks]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Includes operational setup, verification, troubleshooting, and patch guidance for an existing OpenClaw installation.]

## Skill Version(s):

5.0.1 (source: server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to 微信 ClawBot 插件安装 and adjacent AI workflows.