Claude-to-IM Skill
Bridge Claude Code / Codex to IM platforms — chat with AI coding agents from Telegram, Discord, Feishu/Lark, QQ, or WeChat.
中文文档
Want a desktop GUI instead? Check out CodePilot — a full-featured desktop app with visual chat interface, session management, file tree preview, permission controls, and more. This skill was extracted from CodePilot's IM bridge module for users who prefer a lightweight, CLI-only setup.
How It Works
This skill runs a background daemon that connects your IM bots to Claude Code or Codex sessions. Messages from IM are forwarded to the AI coding agent, and responses (including tool use, permission requests, streaming previews) are sent back to your chat.
You (Telegram/Discord/Feishu/QQ/WeChat)
↕ Bot API
Background Daemon (Node.js)
↕ Claude Agent SDK or Codex SDK (configurable via CTI_RUNTIME)
Claude Code / Codex → reads/writes your codebase
Features
- Five IM platforms — Telegram, Discord, Feishu/Lark, QQ, WeChat — enable any combination
- Interactive setup — guided wizard collects tokens with step-by-step instructions
- Permission control — tool calls require explicit approval via inline buttons (Telegram/Discord) or text
/perm commands / quick 1/2/3 replies (Feishu/QQ/WeChat)
- Streaming preview — see Claude's response as it types (Telegram & Discord)
- Session persistence — conversations survive daemon restarts
- Secret protection — tokens stored with
chmod 600, auto-redacted in all logs
- Zero code required — install the skill and run
/claude-to-im setup, or tell Codex claude-to-im setup
Prerequisites
- Node.js >= 20
- Claude Code CLI (for
CTI_RUNTIME=claude or auto) — installed and authenticated (claude command available)
- Codex CLI (for
CTI_RUNTIME=codex or auto) — npm install -g @openai/codex. Auth: run codex auth login, or set OPENAI_API_KEY (optional, for API mode)
Installation
Choose the section that matches the AI agent product you actually use.
Claude Code
Recommended: npx skills
npx skills add op7418/Claude-to-IM-skill
After installation, tell Claude Code:
/claude-to-im setup
If you want WeChat specifically, you can also say:
帮我接微信
Alternative: clone directly into Claude Code skills
git clone https://github.com/op7418/Claude-to-IM-skill.git ~/.claude/skills/claude-to-im
Claude Code discovers it automatically.
Alternative: symlink for development
git clone https://github.com/op7418/Claude-to-IM-skill.git ~/code/Claude-to-IM-skill
mkdir -p ~/.claude/skills
ln -s ~/code/Claude-to-IM-skill ~/.claude/skills/claude-to-im
Codex
Recommended: use the Codex install script
git clone https://github.com/op7418/Claude-to-IM-skill.git ~/code/Claude-to-IM-skill
bash ~/code/Claude-to-IM-skill/scripts/install-codex.sh
For local development with a live checkout:
bash ~/code/Claude-to-IM-skill/scripts/install-codex.sh --link
The install script places the skill under ~/.codex/skills/claude-to-im, installs dependencies, and builds the daemon.
After installation, tell Codex:
claude-to-im setup
If you want WeChat specifically, you can also say:
帮我接微信桥接
Alternative: clone directly into Codex skills
git clone https://github.com/op7418/Claude-to-IM-skill.git ~/.codex/skills/claude-to-im
cd ~/.codex/skills/claude-to-im
npm install
npm run build
Verify installation
Claude Code: Start a new session and type / — you should see claude-to-im in the skill list. Or ask Claude: "What skills are available?"
Codex: Start a new session and say claude-to-im setup, start bridge, or 帮我接微信桥接.
Updating the Skill
Choose the update flow that matches both your AI agent product and your installation method.
Claude Code
If you installed with npx skills, re-run:
npx skills add op7418/Claude-to-IM-skill
If you installed via git clone or symlink:
cd ~/.claude/skills/claude-to-im
git pull
npm install
npm run build
Then tell Claude Code:
/claude-to-im doctor
/claude-to-im start
Codex
If you installed with the Codex install script in copy mode:
rm -rf ~/.codex/skills/claude-to-im
bash ~/code/Claude-to-IM-skill/scripts/install-codex.sh
If you installed with --link or cloned directly into the Codex skills directory:
cd ~/.codex/skills/claude-to-im
git pull
npm install
npm run build
Then tell Codex:
claude-to-im doctor
start bridge
Quick Start
1. Setup
Claude Code
/claude-to-im setup
Codex
claude-to-im setup
The wizard will guide you through: