Wechat Channel Agents — Development skill for Claude Code
wechat channel for agents, such as claude code, codex.
How to install Wechat Channel Agents
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open legendtkl/wechat-channel-agents and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Wechat Channel Agents does
wechat channel for agents, such as claude code, codex.
Alternatives in Development
- Understand Anything — Graphs that teach graphs that impress 80.7k ★
- OpenAI Codex CLI — (Rust implementation) 67.8k ★
- Career-Ops For Codex — Read CLAUDE.md for all project instructions, routing, and behavioral rules 32.5k ★
README
WeChat Channel Agents
微信 bot 桥接服务,支持一个或多个微信 bot 账号,并在每个 bot 中同时接入 **Claude Code** 和 **Codex** 两个 AI agent,用户可通过命令实时切换。
功能特性
- 双 Agent 支持 — 同一个微信 bot 同时接入 Claude Code(Anthropic)和 Codex(OpenAI)
- 多账号支持 — 支持多个微信 bot 账号同时在线,消息从接入账号原路回复
- 实时切换 — 发送
/claude或/codex即可切换 agent,切换时保留另一端的会话状态 - 会话持久化 — 每个「bot 账号 + 微信用户」独立维护双 agent session,重启后可恢复
- 安全防护 — 内置危险命令拦截(rm -rf、sudo 等),支持用户白名单
- 媒体支持 — 支持图片、文件、视频的上传下载(CDN 加解密)
- 长文分片 — 自动将超长回复按 4000 字符分片发送
快速开始
前置条件
- Node.js >= 22
- 微信账号(需 >= 8.0.50 版本,支持 iLink Bot)
- Claude Code 服务端(ANTHROPIC_BASE_URL)
- Codex 配置(~/.codex/config.toml)
安装
git clone https://github.com/legendtkl/wechat-channel-agents.git
cd wechat-channel-agents
npm install
配置
- 复制配置模板:
cp config.example.json config.json
cp .env.example .env
- 编辑
.env,填入 Claude Code 凭证:
ANTHROPIC_BASE_URL=http://your-server:13654/
ANTHROPIC_AUTH_TOKEN=sk-xxx
- 按需修改
config.json:
{
"defaultAgent": "claude",
"wechat": {
"baseUrl": "https://ilinkai.weixin.qq.com",
"botType": "3"
},
"codex": {
"sandboxMode": "danger-full-access",
"workingDirectory": "/path/to/your/project"
},
"stateDir": "~/.wechat-agents",
"allowedUsers": [],
"adminUsers": ["your_wechat_user_id"],
"logLevel": "INFO"
}
启动
npm run dev
终端会显示二维码,用微信扫码登录。登录成功后即可在微信中与 bot 对话。
如需在运行中新增更多 bot 账号,可使用管理员命令 `/login`,终端会再次显示二维码并将新账号接入当前服务。
使用方式
| 命令 | 说明 |
|---|---|
/claude |
切换到 Claude Code |
/codex |
切换到 Codex |
/reset |
重置当前 agent 会话 |
/status |
查看当前 agent 类型和会话信息 |
/help |
显示所有可用命令 |
/cwd |
修改工作目录 |
/login |
管理员新增一个 bot 账号,终端扫码后接入 |
/logout |
管理员登出所有 bot 账号,清除本地凭证并停止服务 |
| 普通文本 | 发送给当前 agent 处理 |
默认使用 Claude Code。切换 agent 时,另一端的会话不会丢失,可随时切回继续。 多账号模式下,每个「bot 账号 + 微信用户」拥有独立的 agent 会话和 `contextToken`,不会在不同 bot 账号之间串上下文。
Related Skills
Wechat Agent Channel
Use WeChat to route messages to Claude Code or Codex.
Claude Code Wechat Channel
Claude Code Channel plugin for WeChat — bridge WeChat messages into Claude Code sessions via the official Claw
BadWeWrite
损友风公众号写作 skill:用不正经的语言输出高质量文章。最佳损友人设(归谬/反讽/拆台/贴脸开大),支持 Claude Code / Codex / OpenClaw / WorkBuddy。Irreverent W
Wechat Writting 2026
A writing skill that distills senior medical-aesthetics editorial judgment into prompt-level constraints. Thre
Dsh Harness Updater
Claude Code / Codex CLI update detection, prompting, and one-click channel updates for DeepSeek Harness
Dsh Subagent Code Agents
Multi-channel coding-agent subagents for DeepSeek Harness: Codex, Claude Code, Grok Build and configurable ACP
Related Agents
Omd Codex Image
Channel-aware image materializer. Reads spec blocks in HTML/MD/JSX and materializes them through Codex's nativ
ChatGPT On Wechat
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长,比OpenClaw更轻量和便捷。同时支持微信、飞书、钉钉、企微、QQ、公众号、网页