Skip to content

Guide · Agent skill

How to use the Add WeChat Channel agent skill (add-wechat)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The add-wechat skill adds personal WeChat as a messaging channel for NanoClaw, an agent host. Once set up, people who message your WeChat account can talk to your agent. This guide explains what the skill does, how to install it, how to log in with a QR code, and how to connect chats to an agent group.

Add WeChat Channelnanocoai/nanoclaw · MIT

Quick start

  1. 1Get the skill files. Download the ZIP from this page and unzip it into ~/.claude/skills/ or your project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills.
  2. 2Ask the agent to install. Request the WeChat channel install. The agent copies the adapter, appends the import line, and installs wechat-ilink-client@0.1.0.
  3. 3Build and test. Run pnpm run build and the registration test. Both must pass before continuing.
  4. 4Enable and restart. Set WECHAT_ENABLED=true in .env and restart the NanoClaw service.
  5. 5Scan the QR code. Open the QR URL from the logs or data/wechat/qr.txt and approve the login in WeChat on your phone.
  6. 6Wire the chat. Message the bot from another account, then run wire-dm.ts and choose the agent group. Send another message to test.

What the add-wechat skill does

Agent skills are folders of instructions and scripts that an agent can load to learn a specific task. This one teaches a NanoClaw agent to receive and send WeChat messages for a personal WeChat account.

The skill uses Tencent's iLink Bot API, which the source describes as the first-party API for personal WeChat bots, distinct from WeCom and Official Accounts. It connects with long-polling, so no public webhook URL is needed.

  • Copies a WeChat adapter into NanoClaw from the channels branch
  • Installs the pinned npm package wechat-ilink-client@0.1.0
  • Logs in by scanning a QR code with your phone
  • Provides wire-dm.ts to connect incoming WeChat chats to an agent group

Requirements before you install

You need a running NanoClaw project, Node.js 20 or later, and pnpm. You also need a personal WeChat account with the mobile app and a phone to scan the login code.

The wire script needs the NanoClaw host service running, because it talks to the host over a Unix socket and has no offline mode.

  • NanoClaw project with pnpm and Node.js 20 or later
  • A personal WeChat account and phone
  • Running NanoClaw host service for the wire script

How to install the skill

Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps you can instead upload it under Settings → Capabilities → Skills.

After the files are in place, ask your agent to perform the install. The skill then copies the adapter, appends one import line to src/channels/index.ts, installs the pinned library, and runs the build and test.

  • Copies src/channels/wechat.ts and src/channels/wechat-registration.test.ts from the channels branch
  • Appends import './wechat.js'; to src/channels/index.ts if not already present
  • Runs pnpm run build and pnpm exec vitest run src/channels/wechat-registration.test.ts
pnpm exec vitest run src/channels/wechat-registration.test.ts

Enable the channel and scan the QR code

Add WECHAT_ENABLED=true to your .env file, then restart NanoClaw. The adapter prints a QR URL to the logs and saves it to data/wechat/qr.txt. Open that URL in a browser to see the QR code.

Scan it from WeChat using the built-in scanner, then approve the authorization on your phone. Credentials are saved to data/wechat/auth.json. Do not commit this file, because it grants access to your WeChat account.

  • Open WeChat, tap the top-right + and choose Scan
  • Approve the authorization on your phone
  • Keep data/wechat/auth.json private
tail -f logs/nanoclaw.log | grep WeChat

Wire your first direct message

A successful login is not enough. The adapter must be wired to an agent group before it responds. First, have a different WeChat account send a message to the bot account. This creates a messaging group entry automatically.

Then run the wire script. It lists unwired WeChat messaging groups, asks which agent group to use, and creates the wiring. Non-interactive flags let you set the platform ID and agent group directly.

  • --platform-id <id>: wire a specific messaging group (default: most recent unwired)
  • --agent-group <id>: target agent group (default: prompt)
  • --sender-policy public|strict|request_approval: override the sender policy
  • --session-mode shared|per-thread: default is shared
pnpm exec tsx .claude/skills/add-wechat/scripts/wire-dm.ts

How to trigger the skill with natural requests

You do not need special syntax. Ask the agent in plain language, such as asking it to add WeChat as a channel to your NanoClaw project. The agent should then follow the skill's steps, pausing where your input is needed, such as scanning the QR code.

Once the channel is live, test by having the sender message the bot again. The agent should reply.

  • Example request: add WeChat as a channel to this NanoClaw project
  • Example request: wire my WeChat contact to the main agent group
  • Example request: my WeChat session expired, help me log in again

Safety, operations and troubleshooting

The skill runs scripts and uses the network. Only one NanoClaw instance should use a given auth file at a time. If the logs show WeChat: session expired, delete data/wechat/auth.json, restart, and scan again. Deleting data/wechat/sync-buf.txt replays recent history on next start, so avoid that in normal operation.

The source states this uses the official Tencent API, but it still advises against spamming, since normal rate limits apply. To remove the skill, REMOVE.md deletes the adapter, the import line, the package, and data/wechat. It leaves your messaging groups and conversation history in place.

  • Do not run multiple instances on the same auth.json
  • Re-scan the QR code when the session expires
  • Do not spam; normal rate limits still apply
  • Use strict sender policy to limit who can reach the agent
rm -rf data/wechat

What people use it for

  • Give a personal WeChat contact access to a NanoClaw agent for questions
  • Route a WeChat DM to a specific agent group for a focused task
  • Limit access with a strict sender policy so only chosen users reach the agent
  • Remove the integration cleanly later using REMOVE.md

Frequently asked questions

Is the add-wechat skill free?

The source describes the skill as free, with no PadLocal token required. It is published under the MIT licence. The source does not state any costs for the Tencent API itself.

What do I need to install add-wechat?

You need a NanoClaw project, pnpm, Node.js 20 or later, a personal WeChat account, and a phone to scan the login QR code. The wire script also needs the NanoClaw host service running.

Does this work with WeChat Official Accounts or WeCom?

No. The source says this skill uses the personal iLink Bot API and is different from WeCom or Official Account integration.

Do I need a public webhook URL?

No. The adapter uses long-polling to hold a persistent connection to Tencent's iLink API, so no webhook URL is needed.

Why does my WeChat bot say session expired?

Delete data/wechat/auth.json, restart NanoClaw, and scan the QR code again. Do not run multiple instances on the same auth file.

Is it safe to use with a personal account?

The source says it uses the official Tencent API, so bans for bot automation are not a risk it identifies, but it advises avoiding spam. Keep auth.json private, since it grants access to your account.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits developers who already run NanoClaw and are comfortable with config files, services and logs. If you want non-technical setup, WeChat business or Official Account integration, or a shared account, pick a different approach.

Download the skill