Discord Claude Code Bot — Communication skill for Claude Code
A lightweight Discord bot that bridges Discord threads to Claude Code CLI sessions.
How to install Discord Claude Code Bot
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open fredchu/discord-claude-code-bot and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Discord Claude Code Bot does
A lightweight Discord bot that bridges Discord threads to Claude Code CLI sessions.
Alternatives in Communication
- Lark Coding Agent Bridge — Bot that bridges Feishu/Lark messenger with a local Claude Code or Codex CLI 2.4k ★
- Claude Skill Social Post — A Claude Code skill by Hao (駱君昊) that learns your Facebook voice and auto-posts to FB / IG / Threads / X with 625 ★
- Openab — A lightweight, secure, cloud-native ACP harness that bridges Discord and any ACP-compatible coding CLI 321 ★
README
discord-claude-code-bot
A lightweight Discord bot that bridges Discord threads to [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI sessions. Single file, ~1000 lines of TypeScript. Mention the bot in a thread, and it spawns a Claude Code process that persists across messages via `--resume`.
Features
- Thread sessions — each Discord thread maps to a Claude Code session with automatic
--resume - Thread context — fetches recent messages so Claude understands the conversation
- Streaming preview — real-time response preview with tool-use status line while Claude is working
- Interactive buttons — AskUserQuestion permission prompts rendered as Discord buttons
- File attachments — send images, code, PDFs, or any file — auto-downloaded and passed to Claude Code's Read tool
- Code fence splitting — long responses split into Discord-safe chunks without breaking code blocks
- Resume local sessions —
/resume-localpicks up a terminal CC session from Discord (mobile use case);/handbackreturns it - SQLite storage — crash-safe session persistence with WAL mode (auto-migrates from legacy JSON)
- Slash commands —
/new,/model,/cd,/stop,/sessions,/resume-local,/handback,/help - Model switching — swap between opus, sonnet, haiku per thread
- AI disclosure — first reply in each session includes an AI disclosure message
Quick Start
git clone https://github.com/fredchu/discord-claude-code-bot.git
cd discord-claude-code-bot
cp .env.example .env # fill in your values
npm install
npm start
Prerequisites
- Node.js 22+ (uses
--env-fileflag) - Claude Code CLI installed and authenticated
- A Discord bot token (Discord Developer Portal)
- A C++ compiler toolchain for building
better-sqlite3(Xcode CLT on macOS,build-essentialon Linux)
Discord Bot Setup
- Create
Related Skills
Deltachat Claude Code
Delta Chat bot that bridges full Claude Code CLI sessions
Agents In Discord
Bridge Codex CLI,Claude Code and Gemini Cli into Discord threads with slash commands, thread sessions, and opt
IM Claude Bridge
将 Discord/微信消息桥接到本地 Claude Code CLI 的双向通信系统。 A two-way communication system that bridges Discord/WeChat messag
Claude Slack Bridge
Claude Code plugin + always-on Slack bot: receive Slack messages (threads, channels, DMs) in Claude Code sessi
Pi Discord Threads
🧵 Portable Discord thread bridge for durable Pi coding-agent sessions.
Seele
Prompt Claude Code on your own machine from Discord: DMs or threads, live progress, usage, effort, models, ses
Related Agents
Discord Dev
Discord application specialist. Use for any task involving Discord bot development, slash commands, components
Review Thread Verifier
Checks one review-bot comment on a pull request against the actual code and returns valid, invalid or needs-hu
Rival
Second opinion from a different AI model. Bridges to the OpenAI Codex CLI and returns its answer unchanged. Us