# Add Wechat

Add WeChat (personal) channel integration via Tencent's official iLink Bot API.

- Repository: https://github.com/nanocoai/nanoclaw (31069 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add nanocoai/nanoclaw --skill add-wechat -g -a claude-code -y`
Codex: `npx skills add nanocoai/nanoclaw --skill add-wechat -g -a codex -y`
Cursor: `npx skills add nanocoai/nanoclaw --skill add-wechat -g -a cursor -y`
Gemini CLI: `npx skills add nanocoai/nanoclaw --skill add-wechat -g -a gemini-cli -y`

## 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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Add WeChat Channel

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:**

- Official Tencent API, no ToS violation, no ban risk
- Free, no PadLocal token required
- No public webhook URL needed, uses long-poll
- Works with any personal WeChat account

## Prerequisites

- A **personal WeChat account** with the mobile app installed
- A phone to scan the QR code for login
- Node.js >= 20 (already required by NanoClaw)

## Install

NanoClaw doesn't ship channels in trunk. This skill copies the WeChat adapter in from the `channels` branch.

### 1. Copy the adapter and its registration test

Fetch the `channels` branch from the configured remote that carries it, then
overwrite the skill-owned files with the canonical registry copies:

```nc:copy from-branch:channels
src/channels/wechat.ts
src/channels/wechat-registration.test.ts
```

### 2. Append the self-registration import

Append to `src/channels/index.ts` (skip if the line is already present):

```nc:append to:src/channels/index.ts
import './wechat.js';
```

### 3. Install the library (pinned)

```nc:dep
wechat-ilink-client@0.1.0
```

### 4. Build and validate

```nc:run effect:build
pnpm run build
```
```nc:run effect:test
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.

The rest: https://github.com/nanocoai/nanoclaw/blob/HEAD/.claude/skills/add-wechat/SKILL.md
