weixin-agent-sdk — Claude Code skill: bridge to WeChat
This skill wires any AI backend into WeChat through the weixin-agent-sdk TypeScript framework: QR login plus a message loop.
npx skills add reason-machines/trending-skills --skill weixin-agent-sdk -a claude-codeWhat weixin-agent-sdk does
The skill covers weixin-agent-sdk, a TypeScript framework that bridges an AI backend to WeChat over the Clawbot channel. Messages arrive by long-polling, so no public server is needed. The surface is a single Agent interface with a chat method — plug in OpenAI, Claude, or your own logic.
The flow: call login() once and scan the QR code, credentials land in ~/.openclaw/. Then start(agent) runs the message loop and reconnects when the session expires. Each ChatRequest carries a conversationId, the text, and any attachment as a local path — images, voice, video and files are already downloaded and decrypted. Replies go back as text or as media from a local path or an HTTPS URL.
Node.js 22 or newer is required. Voice notes from WeChat need silk-wasm to convert SILK to WAV; without it that conversion does not happen. If you already run an ACP-compatible agent, skip the code: the weixin-acp package launches it as a subprocess and talks JSON-RPC over stdio. Inside the chat, /echo <message> and /toggle-debug control the bot.
What it helps with
- connect an AI agent to WeChat without a public server
- accept an image or file from chat and hand it to the agent
- keep per-conversation history keyed by conversationId
- run Claude or Codex as a WeChat bot over ACP
- send an image or PDF back to the user
Example prompts for the agent
- Bridge my agent to WeChat with weixin-agent-sdk: set up login and start with an Agent implementation
- Configure weixin-acp for Claude so it answers in WeChat
- Add incoming image support to my WeChat agent and reply with a file
How to install weixin-agent-sdk
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill weixin-agent-sdk -a claude-code2Manually: put the files in place
~/.claude/skills/weixin-agent-sdk/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/weixin-agent-sdk/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill weixin-agent-sdk -a codex2Manually: put the files in place
.agents/skills/weixin-agent-sdk/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill weixin-agent-sdk -a cursor2Manually: put the files in place
.cursor/skills/weixin-agent-sdk/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills weixin-agent-sdk2Manually: put the files in place
.github/skills/weixin-agent-sdk/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill weixin-agent-sdk -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/weixin-agent-sdkManually: put the files in place
.devin/skills/weixin-agent-sdk/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill weixin-agent-sdk -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about weixin-agent-sdk
How do I install weixin-agent-sdk in Claude?
Run npx skills add reason-machines/trending-skills --skill weixin-agent-sdk -a claude-code. The skill lands at ~/.claude/skills/weixin-agent-sdk/SKILL.md.
What does weixin-agent-sdk do?
It connects an AI backend to WeChat through the Clawbot channel. You implement the Agent interface with a chat method; the framework handles incoming messages, attachments and reconnects.
What do I need to run it?
Node.js 22 or newer. Voice messages from WeChat convert from SILK to WAV only when silk-wasm is present.