claude-code-discord

作者 zebbern已验证

A Discord bot that brings Claude Code to your channels so you can chat, run shell/git, and manage branches. Access from any local, VM, or Docker instance with full capebilty of claude code!

205
Stars
36
Forks
TypeScript
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/zebbern/claude-code-discord

快速入门

使用 claude-code-discord 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

claude-code-discord

Run Claude Code from Discord with full SDK integration, agents, rewind, mid-session controls and more.

Found a bug or have an idea for improvement? Submit it via GitHub Issues >⩊<

FeatureDetailsStatus
Use Claude Code AnywhereHost locally (VM / Docker / cloud) and send commands via the Discord API
Thread-per-sessionEach /claude-thread conversation gets its own Discord thread with custom names
Granular sandbox configFull SDK sandbox with network rules, filesystem ACLs, and excluded commands
Local hosting & securityKeep keys and code on your infra while exposing a controlled interface through Discord
Centralized collaborationRun commands and discuss results where your team already communicates
Branch-aware organizationMaps Git branches to channels/categories so feature work stays separated
Mid-session controlsInterrupt, change model, change permissions, stop tasks, and rewind without restarting
MCP server managementView status, toggle, and reconnect MCP servers mid-session
Hooks systemPassive SDK callbacks for tool use, notification, and task completion observability
Full SDK IntegrationBuilt on @anthropic-ai/claude-agent-sdk with native agent support
AskUserQuestionClaude can ask clarifying questions mid-session via Discord buttons
Interactive permission promptsAllow/Deny buttons when Claude wants to use unapproved tools
Role-based access controlRestrict destructive commands (/shell, /git, worktree ops) to specific Discord roles
Channel monitoringWatch a channel for bot/webhook messages and auto-investigate in a thread
Audit trail & accountabilityChannel history provides an easy-to-search record of who ran what and when

v2.5.0 Security hardening, Discord UX (queue, Cancel, compact embeds), Docker SDK-only image. See CHANGELOG.

preview

Quick Start

git clone https://github.com/zebbern/claude-code-discord.git
cd claude-code-discord
cp .env.example .env
# Edit .env: DISCORD_TOKEN, APPLICATION_ID, and ANTHROPIC_API_KEY (required in Docker)
docker compose up -d

Need a Discord bot token first? See Discord Bot Setup.

Installment options (auto setup script or manual installation), see Installation Guide.

Documentation

DocDescription
Discord Bot SetupCreate a Discord app, get your token and application ID, invite the bot
InstallationDocker, one-command setup, manual setup, .env configuration
CommandsFull reference for all 45+ slash commands
FeaturesThinking modes, agents, MCP, rewind, structured output, mid-session controls
ArchitectureProject structure and SDK integration details
DockerDocker Compose, GHCR images, Watchtower auto-updates
UpdatingHow to update (Docker pull, git pull, version check)

Select Newest Model Available

/settings category:claude action:set-model value:opus
/settings category:claude action:set-model value:sonnet
/quick-model model:haiku

Configuration

Create a .env file (or copy .env.example):

# Required
DISCORD_TOKEN=your_bot_token_here
APPLICATION_ID=your_application_id_here

# Optional
ANTHROPIC_API_KEY=sk-ant-...          # Enables dynamic model discovery & refresh
USER_ID=your_discord_user_id          # @mention when Claude finishes a task
CATEGORY_NAME=claude-code             # Discord category for bot channels
WORK_DIR=/path/to/project             # Working directory (default: current dir)

# Access Control (RBAC) — leave blank to keep all commands open
ADMIN_ROLE_IDS=123456789,987654321    # Comma-separated Discord role IDs
ADMIN_USER_IDS=111111111              # Comma-separated Discord user IDs

# Channel Monitoring (optional)
MONITOR_CHANNEL_ID=123456789012345678    # Channel to monitor for alerts from other bots/webhooks/users
MONITOR_BOT_IDS=987654321,111111111      # Comma-separated bot/webhook/user IDs to trigger auto-investigation

# Proxy (optional — respected automatically if set)
# HTTP_PROXY=http://proxy:8080
# HTTPS_PROXY=http://proxy:8080
# NO_PROXY=localhost,127.0.0.1
VariableRequiredDescription
DISCORD_TOKENYesBot token from the Discord Developer Portal
APPLICATION_IDYesApplication ID from the Developer Portal
ANTHROPIC_API_KEYNoEnables dynamic model discovery; refreshes hourly
USER_IDNoYour Discord user ID — bot @mentions you when tasks finish
CATEGORY_NAMENoDiscord category name for channels (default: claude-code)
WORK_DIRNoWorking directory for Claude operations (default: current dir)
ADMIN_ROLE_IDSNoComma-separated role IDs for RBAC (shell, git, system, admin)
ADMIN_USER_IDSNoComma-separated user IDs for RBAC — grants access regardless of roles
MONITOR_CHANNEL_IDNoDiscord channel ID to watch for bot/webhook messages
MONITOR_BOT_IDSNoComma-separated bot/webhook user IDs that trigger auto-investigation
HTTP_PROXYNoHTTP proxy URL (also reads http_proxy)
HTTPS_PROXYNoHTTPS proxy URL (also reads https_proxy)
NO_PROXYNoComma-separated hosts to bypass proxy

CLI flags override environment variables. Environment variables override .env file values.

Startup Options

# Standard start
deno task start

# Development mode (hot reload)
deno task dev

# Direct with environment variables
deno run --allow-all index.ts

# With optional flags
deno run --allow-all index.ts --category myproject --user-id YOUR_DISCORD_ID
FlagEnv VariableDescription
--category <name>CATEGORY_NAMEDiscord category name for channels (default: claude-code)
--user-id <id>USER_IDYour Discord user ID for mentions when tasks finish

CLI flags override environment variables. Environment variables override .env file values.

Channel Monitoring

Automatically investigate alerts from other bots or webhooks. When a monitored bot posts in the configured channel, the bot batches messages over a 30-second debounce window, creates a thread on the alert message, and streams Claude's investigation there.

Setup

  1. Enable the Message Content intent — In the Developer Portal, go to your app → Bot → enable Message Content Intent. The bot needs this to read messages from other bots.

  2. Get the channel ID — Right-click the channel in Discord (Developer Mode must be on) and copy the ID. Set MONITOR_CHANNEL_ID in .env.

  3. Get the bot/webhook user IDs — The easiest way is to look at a message from the bot in the channel, right-click the author, and copy the ID. For webhooks, check the webhook's user ID in the channel's integration settings. Set MONITOR_BOT_IDS as a comma-separated list.

  4. Bot permissions — Ensure the bot has these permissions in the monitored channel:

    • Read Messages
    • Create Public Threads
    • Send Messages in Threads

常见问题

What is claude-code-discord?

claude-code-discord is an open-source devops skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by zebbern. A Discord bot that brings Claude Code to your channels so you can chat, run shell/git, and manage branches. Access from any local, VM, or Docker instance with full capebilty of claude code!. It has 205 GitHub stars.

Is claude-code-discord safe to use?

Yes. claude-code-discord passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install claude-code-discord?

Clone the repository with "git clone https://github.com/zebbern/claude-code-discord" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is claude-code-discord written in?

claude-code-discord is primarily written in TypeScript. It is open-source under zebbern on GitHub, so you can review or fork the full source.

Are there alternatives to claude-code-discord?

Yes. SkillsLLM lists many other DevOps skills you can browse and compare side by side. Open the DevOps category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-code-discord against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

xonsh

by xonsh

🐚 Python-powered shell. Full-featured, cross-platform and AI-friendly.

9,613735Python
DevOps
查看详情

ralphex

by umputun

Extended Ralph loop for autonomous AI-driven plan execution

1,445118Go
DevOps
查看详情

libretto

by saffron-health

The AI toolkit for building reliable browser automations

87767TypeScript
DevOps
查看详情

kubernetes-skill

by LukasNiessen

Kubernetes Skill for Claude Code and Codex. LLMs hallucinate a lot with K8s - KubeShark fixes this. It eliminates hallucinations and grounds your Kubernetes, Helm etc official best practices.

38171
DevOps
查看详情

terrashark

by LukasNiessen

Terraform Skill for Claude Code and Codex. LLMs hallucinate a lot with Terraform - TerraShark fixes this. It eliminates hallucinations, is designed for modular and secure code and grounds your IaC in the official Hashicorp Terraform best practices.

30723
DevOps
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情