Thanks for your interest in contributing! Here's how to get started.
git clone https://github.com/chadingTV/claudecode-discord.git
cd claudecode-discord
npm install
cp .env.example .env # Fill in your Discord bot token and settings
npm run dev # Start in dev mode (tsx, auto-reload)- Node.js 20+
- A Discord bot token (create one here)
- Claude Code installed and authenticated (
claudeCLI working)
src/
├── index.ts # Entry point
├── bot/
│ ├── client.ts # Discord bot setup
│ ├── commands/ # Slash commands
│ └── handlers/ # Message & interaction handlers
├── claude/
│ ├── session-manager.ts # Core: Agent SDK session lifecycle
│ └── output-formatter.ts # Discord embed/button formatting
├── db/ # SQLite persistence
├── security/ # Whitelist, rate limit, path validation
└── utils/ # Config (zod schema)
- TypeScript strict mode — no
anyunless absolutely necessary - ESM —
import/export, norequire() - Zod for all runtime validation (env vars, configs)
- Error handling — every async operation needs try-catch with meaningful error messages
- Fork the repo and create a branch from
main - Make your changes
- Run tests:
npm test - Run build:
npm run build - Submit a PR with a clear description of what and why
Use conventional format:
feat: add /cost command for session billing
fix: session resume failing after bot restart
docs: update Windows setup guide
- Keep PRs focused — one feature or fix per PR
- Update relevant docs if behavior changes
- Add tests for new features when possible
Look for issues labeled good first issue. These are scoped tasks suitable for first-time contributors.
Use the Bug Report template. Include:
- Steps to reproduce
- Expected vs actual behavior
- Your OS and Node.js version
Use the Feature Request template.
By contributing, you agree that your contributions will be licensed under the MIT License.