add-wechat
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Run Nanoclaw GWS-EA setup. Use when the user wants to install, re-run setup, or import v1 data. Triggers on "setup", "setup gws-ea", "install gws-ea", "import v1", or first-time setup requests on this fork.
Sync your private fork with public fork(s). Push sanitized changes to a public fork, or pull community contributions back. Triggers on "sync forks", "sync fork", "push to fork", "pull from fork".
Pull community contributions from the nanoclaw-gws-ea public fork back into this private fork, with preview, selective cherry-pick, and low token usage.
Create and edit Google Docs cleanly. Use before any Docs creation or modification — covers the markdown-draft-then-import workflow, structural editing tools, and verification that formatting renders natively (not as literal characters).
OneCLI Gateway: transparent HTTPS proxy that injects stored credentials into outbound calls. You MUST use this skill when the user asks you to read emails, check calendar, access GitHub repos, create issues, check Stripe payments, or interact with ANY external service or API. Do NOT use browser extensions or OAuth CLI tools. Make HTTP requests directly; the gateway injects credentials automatically.
Look up and manage who people are and how to engage them. Use before any substantive interaction (scheduling, email, meetings, outreach). Covers Google Contacts as CRM, tier definitions (1–5), and contact-management thresholds.
| name | add-wechat |
| description | 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. |
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/index.ts contains import './wechat.js';wechat-ilink-client is listed in package.json dependenciesOtherwise continue. Every step below is safe to re-run.
git fetch origin channels
git show origin/channels:src/channels/wechat.ts > src/channels/wechat.ts
Append to src/channels/index.ts (skip if the line is already present):
import './wechat.js';
pnpm install wechat-ilink-client@0.1.0
pnpm run build
Unlike most channels, WeChat requires no pre-configured API keys. Auth happens via QR code scan from your phone.
Add to .env:
WECHAT_ENABLED=true
Sync to container: mkdir -p data/env && cp .env data/env/env
Restart NanoClaw.
Run from your NanoClaw project root:
source 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:
tail -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.
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.
pnpm 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 creates the messaging_group_agents row with sensible defaults (sender policy request_approval, session mode shared).
With request_approval, the next DM from the 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:
pnpm 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; or solo admin group in non-interactive)--sender-policy public|strict|request_approval — default request_approval (fires an admin approval card on unknown-sender DMs)--session-mode shared|per-thread — default sharedHave 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.