Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Add WeChat (personal) channel integration via Tencent's official iLink Bot API. Uses long-polling and QR scan — no webhook, no ToS risk, no paid token.
.claude/skills/nanocoai-add-wechat/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 211% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 64% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 27% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 87% | 0% |
Adds WeChat support via iLink Bot API — the first-party Tencent API for personal WeChat bots (different from WeCom / Official Account).
Why this is different from wechaty/PadLocal:
NanoClaw doesn't ship channels in trunk. This skill copies the WeChat adapter in from the channels branch.
Skip to Credentials if all of these are already in place:
src/channels/wechat.ts existssrc/channels/wechat-registration.test.ts existssrc/channels/index.ts contains import './wechat.js';wechat-ilink-client is listed in package.json dependenciesOtherwise continue. Every step below is safe to re-run.
bashgit fetch origin channels
bashgit show origin/channels:src/channels/wechat.ts > src/channels/wechat.ts git show origin/channels:src/channels/wechat-registration.test.ts > src/channels/wechat-registration.test.ts
Append to src/channels/index.ts (skip if the line is already present):
typescriptimport './wechat.js';
bashpnpm install wechat-ilink-client@0.1.0
bashpnpm run build pnpm exec vitest run src/channels/wechat-registration.test.ts
Both must be clean before proceeding. wechat-registration.test.ts is the one integration test: it imports the real channel barrel and asserts the registry contains wechat. It goes red if the import './wechat.js'; line is deleted or drifts, if the barrel fails to evaluate (so the channel genuinely would not register), or if wechat-ilink-client isn't installed (the import throws) — so it also implicitly verifies the dependency from step 4. Importing is safe: the adapter opens its long-poll connection only in setup() (at host startup), never at import.
End-to-end message delivery against a real WeChat account is verified manually once the service is running — see Credentials and Wire your first DM above.
Unlike most channels, WeChat requires no pre-configured API keys. Auth happens via QR code scan from your phone.
Add to .env:
bashWECHAT_ENABLED=true
Restart NanoClaw.
Run from your NanoClaw project root:
bashsource setup/lib/install-slug.sh systemctl --user restart $(systemd_unit) # Linux # or launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
The adapter will print a QR URL to the logs and save it to data/wechat/qr.txt:
bashtail -f logs/nanoclaw.log | grep WeChat # or cat data/wechat/qr.txt
Open the URL in a browser (it renders a QR code), then:
data/wechat/auth.json — do not commit this fileThe bot is now connected as your WeChat account.
A successful QR login alone isn't enough — the adapter still needs to be wired to an agent group before it can respond.
Prerequisite: the host service must be running. The wire script creates the wiring through ncl, which talks to the running host over a Unix socket — there is no offline mode.
Have a different WeChat account send a message to the bot account. This auto-creates a messaging_groups row with the sender's platform_id and the unknown_sender_policy the WeChat adapter declares.
bashpnpm exec tsx .claude/skills/add-wechat/scripts/wire-dm.ts
Interactive flow: the script lists all unwired WeChat messaging groups, asks which agent group to wire it to, and runs ncl wirings create — engage mode/pattern and priority come from the WeChat adapter's declared channel defaults, so a wiring created here matches one created by /manage-channels or the approval-card flow.
With request_approval as the sender policy, the next DM from a stranger fires an approval card to the admin — admin taps Approve/Deny, approved users are added as members and their queued message replays through the agent.
Non-interactive:
bashpnpm exec tsx .claude/skills/add-wechat/scripts/wire-dm.ts \ --platform-id wechat:wxid_xxxxx \ --agent-group ag-xxxxx \ --non-interactive
Flags:
--platform-id <id> — wire a specific messaging group (default: most recent unwired)--agent-group <id> — target agent group (default: prompt; auto-picked when only one exists)--sender-policy public|strict|request_approval — override the messaging group's unknown_sender_policy (default: leave whatever the WeChat adapter declared when the row was auto-created)--session-mode shared|per-thread — default sharedEquivalent raw ncl invocation (host must be running):
bashncl wirings create --messaging-group-id <mg-id> --agent-group-id <ag-id> --session-mode shared
Have the sender message the bot again — the agent should respond.
data/wechat/auth.json.WeChat: session expired in logs, delete data/wechat/auth.json and restart — you'll be asked to re-scan.data/wechat/sync-buf.txt holds the long-poll cursor. Deleting it replays recent history on next start; don't delete it in normal operation.If you're in the middle of /setup, return to the setup flow now.
Otherwise, restart the service to pick up the new channel and wiring.
wechatWeChat inbound platformId=wechat:<id>. Use wechat:<user_id> for DMs, wechat:<group_id> for rooms.init-first-agent.ts --admin-user-id) is saved to data/wechat/auth.json as operatorUserId after the QR scan. Read it with cat data/wechat/auth.json | jq -r .operatorUserId and prefix with wechat: (i.e. wechat:<operatorUserId>).shared session mode per messaging group (DM or room). Use strict sender policy if you want only specific users to reach the agent; public opens it to anyone who messages the bot.wire-dm.ts helper (see the "Wire your first DM" section above) if running this skill standalone. If running as part of bash nanoclaw.sh, init-first-agent.ts handles wiring — just pass the platform-id and admin-user-id captured above.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-17 | pass→pass | 11,932 | 66,099 | +454% | 1 | 1 | 0% | 1,711 | 2,980 | +74% | 0 | 0 | — |
case-01 | fail→pass | 27,050 | 5,737 | -79% | 1 | 1 | 0% | 1,094 | 3,400 | +211% | 0 | 0 | — |
case-02 | fail→pass | 9,983 | 2,826 | -72% | 1 | 1 | 0% | 1,626 | 2,664 | +64% | 0 | 0 | — |
case-03 | fail→pass | 14,920 | 4,741 | -68% | 1 | 1 | 0% | 2,337 | 2,978 | +27% | 0 | 0 | — |
case-04 | fail→pass | 14,871 | 6,486 | -56% | 1 | 1 | 0% | 2,891 | 3,119 | +8% | 0 | 0 | — |
case-05 | fail→pass | 7,880 | 65,903 | +736% | 1 | 1 | 0% | 1,622 | 3,028 | +87% | 0 | 0 | — |
case-06 | fail→fail | 13,487 | 8,860 | -34% | 1 | 1 | 0% | 2,222 | 3,729 | +68% | 0 | 0 | — |
case-07 | fail→pass | 7,790 | 2,266 | -71% | 1 | 1 | 0% | 1,399 | 2,360 | +69% | 0 | 0 | — |
case-08 | fail→pass | 7,665 | 1,851 | -76% | 1 | 1 | 0% | 1,412 | 2,388 | +69% | 0 | 0 | — |
case-09 | fail→pass | 12,038 | 1,885 | -84% | 1 | 1 | 0% | 1,986 | 2,376 | +20% | 0 | 0 | — |
case-10 | fail→fail | 10,419 | 2,137 | -79% | 1 | 1 | 0% | 1,653 | 2,365 | +43% | 0 | 0 | — |
case-11 | fail→pass | 8,349 | 1,927 | -77% | 1 | 1 | 0% | 1,353 | 2,346 | +73% | 0 | 0 | — |
case-12 | pass→pass | 14,722 | 2,807 | -81% | 1 | 1 | 0% | 2,227 | 2,472 | +11% | 0 | 0 | — |
case-13 | fail→pass | 12,833 | 53,441 | +316% | 1 | 1 | 0% | 1,933 | 2,529 | +31% | 0 | 0 | — |
case-14 | fail→pass | 11,638 | 2,532 | -78% | 1 | 1 | 0% | 1,895 | 2,494 | +32% | 0 | 0 | — |
case-15 | fail→pass | 7,030 | 3,168 | -55% | 1 | 1 | 0% | 1,138 | 2,457 | +116% | 0 | 0 | — |
case-16 | pass→pass | 12,192 | 1,834 | -85% | 1 | 1 | 0% | 1,937 | 2,332 | +20% | 0 | 0 | — |
case-18 | fail→pass | 12,972 | 4,287 | -67% | 1 | 1 | 0% | 2,092 | 2,752 | +32% | 0 | 0 | — |
case-19 | fail→pass | 3,434 | 1,586 | -54% | 1 | 1 | 0% | 489 | 2,256 | +361% | 0 | 0 | — |
case-20 | fail→fail | 8,054 | 2,817 | -65% | 1 | 1 | 0% | 1,491 | 2,536 | +70% | 0 | 0 | — |
case-21 | pass→pass | 14,073 | 2,144 | -85% | 1 | 1 | 0% | 2,213 | 2,394 | +8% | 0 | 0 | — |
case-22 | fail→pass | 12,360 | 2,336 | -81% | 1 | 1 | 0% | 2,026 | 2,412 | +19% | 0 | 0 | — |
case-23 | pass→pass | 7,925 | 3,605 | -55% | 1 | 1 | 0% | 1,335 | 2,598 | +95% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 22 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +65 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.