Claude Skill
photon-hq/qclaw-wechat-client
A reverse-engineered TypeScript client for QClaw's WeChat Access API. Build automation agents and tools with WeChat integration. Open-source, lightweight, and community-driven.
Overview
Repository
Install this Skill
npm install qclaw-wechat-clientRegistry
npm install qclaw-wechat-clientpnpm add qclaw-wechat-client
Summary
A reverse-engineered TypeScript client for QClaw's WeChat Access API, enabling programmatic interaction with WeChat through the QClaw platform. Designed for developers building automation agents and tools that require WeChat integration.
为QClaw的微信访问API逆向工程实现的TypeScript客户端。
Key features
- Reverse-engineered QClaw WeChat Access API client
- Written in TypeScript for type safety and maintainability
- Designed for agent and automation use cases
- Open-source with community contributions
- Lightweight and focused on core API interactions
Use cases
- Building WeChat automation bots and agents
- Integrating WeChat messaging into custom workflows
- Developing tools for WeChat account management
- Creating prototypes that require WeChat API access
- Educational projects exploring reverse-engineered APIs
README excerpt
# qclaw-wechat-client [中文文档](./README.zh-CN.md) > [!WARNING] > This project is being unmaintained. It is recommended to switch to [WeChat's official iLink protocol](https://github.com/photon-hq/wechat-ilink-client). 该项目已不再维护。我们推荐使用[微信团队官方的iLink协议](https://github.com/photon-hq/wechat-ilink-client)(基于微信ClawBot)。 Reverse-engineered TypeScript client for QClaw's WeChat Access API. QClaw (管家 OpenClaw) is a Tencent Electron desktop app that wraps an OpenClaw AI Gateway service. It authenticates exclusively through WeChat OAuth2 QR-code login and communicates with Tencent backend servers via a jprx gateway protocol. This library implements that protocol as a standalone TypeScript module. ## Origin Extracted from `QClaw.app` -> `Contents/Resources/app.asar` (unencrypted). The API service class (`tS` / `openclawApiService`) was found in the bundled renderer at `out/renderer/assets/platform-QEsQ5tXh.js`. ## Install ```bash npm install qclaw-wechat-client # or pnpm add qclaw-wechat-client ``` ## Development ```bash pnpm install # install dependencies pnpm build # bundle with tsdown pnpm typecheck # type-check only ``` ## Quick start ```typescript import { QClawClient } from "qclaw-wechat-client"; import type { WxLoginStateData, WxLoginData } from "qclaw-wechat-client"; const client = new QClawClient({ env: "production" }); // Step 1 - get login state (CSRF token) const stateRes = await client.getWxLoginState({ guid: "machine-id" }); const state = QClawClient.unwrap<WxLoginStateData>(stateRes)?.state; // Step 2 - show QR code to user const qrUrl = client.buildWxLoginUrl(state!); console.log("Scan this:", qrUrl); // Step 3 - exchange auth code (from WeChat redirect) for session const loginRes = await client.wxLogin({ guid: "machine-id", code: authCode,