Skip to main content
skill CX Codex

discord · civitai — Claude Code skill: what it does, how to install

Posts messages, embeds, and announcements to Discord channels via REST API. Useful for team alerts and release notices during coding sessions.

Apache-2.0 ★ 7,327 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add civitai/civitai --skill discord -a claude-code
Open on GitHub

What discord does

This skill connects your coding agent to Discord using local Node.js scripts (setup.mjs and query.mjs). It can target channels by name or ID, publish rich embeds with customizable fields, manage thread discussions, pins, and emoji reactions. Reading recent channel messages and sending direct messages are also supported.

You need Node.js installed locally. Authentication works either through the proxy URL https://discord-proxy.civitai.com via browser login or directly by adding DISCORD_BOT_TOKEN to .claude/skills/discord/.env. Without an active token or bot credentials, every query command will fail immediately.

What it helps with

  • post release notifications and deployment alerts to Discord channels
  • send formatted rich embeds with custom fields and colors
  • fetch recent message logs from channels or direct messages
  • create discussion threads and toggle reactions on specific posts

Example prompts for the agent

  • Send an announcement to dev-alerts with title Release and green color
  • Fetch the last 20 messages from the dev-general channel
  • Send a direct message to jane asking to review the PR

How to install discord

1Skills CLI (Vercel)

npx skills add civitai/civitai --skill discord -a claude-code

2Manually: put the files in place

~/.claude/skills/discord/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/discord/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about discord

How to install discord in Claude Code?

Run npx skills add civitai/civitai --skill discord -a claude-code. The skill file will be placed in ~/.claude/skills/discord/SKILL.md.

What does the discord skill do?

It lets the AI agent query Discord text channels, send regular and embed announcements, handle reactions, and inspect server members via CLI scripts.

How do I authenticate the skill?

Run node .claude/skills/discord/setup.mjs https://discord-proxy.civitai.com for web login, or copy .env.example to .env and set DISCORD_BOT_TOKEN directly.

Source text

SKILL.md · Apache-2.0
---
name: discord
description: Post announcements and messages to Discord channels. Use when sharing updates, releases, or team communications.
---

# Discord

Post messages and announcements to Discord channels via the REST API. Navigate channels by name, send formatted messages with embeds, manage reactions, threads, and more.

## Setup

Run the setup script to authenticate via Discord:

```bash
node .claude/skills/discord/setup.mjs https://discord-proxy.civitai.com
```

This will:
1. Open your browser for Discord authentication
2. Verify you're in the team server
3. Save your personal API token to `.env`

### Admin Only: Direct Bot Token

If you manage the bot directly and need to bypass the proxy:

1. Copy `.env.example` to `.env` in this skill directory
2. Uncomment and set `DISCORD_BOT_TOKEN`
3. Optionally set `DISCORD_GUILD` for auto-detection

```bash
cp .claude/skills/discord/.env.example .claude/skills/discord/.env
```

## Running Commands

```bash
node .claude/skills/discord/query.mjs <command> [options]
```

### Commands

| Command | Description |
|---------|-------------|
| `guilds` | List all guilds (servers) the bot is in |
| `channels [guild]` | List text channels in a guild |
| `send <channel> "message"` | Send a plain text message |
| `announce <channel> "message"` | Send a formatted announcement embed |
| `me` | Show bot information |
| `users` | List all members in the guild |
| `user <name\|id>` | Get user info and mention format |
| `roles` | List all roles in the guild |
| `role <name\|id>` | Get role info and mention format |
| `messages <channel>` | Get recent messages from a channel |
| `edit <msg_link> "content"` | Edit a message (bot's own only) |
| `delete <msg_link>` | Delete a message |
| `reply <msg_link> "content"` | Reply to a message |
| `rich-embed <channel>` | Send embed with structured fields |
| `react <msg_link> <emoji>` | Add reaction to a message |
| `unreact <msg_link> <emoji>` | Remove reaction from a message |
| `pin <msg_link>` | Pin a message |
| `unpin <msg_link>` | Unpin a message |
| `pins <channel>` | List pinned messages in a channel |
| `thread <channel> --thread "name"` | Create a thread |
| `dm <user> "message"` | Send a direct message to a user |
| `dm-messages <user>` | Read DM history with a user |

### Options

| Flag | Description |
|------|-------------|
| `--json` | Output raw JSON response |
| `--title "text"` | Set embed title |
| `--color <hex>` | Set embed color (default: #1E88E5 blue) |
| `--footer "text"` | Set embed footer text |
| `--url "link"` | Add a URL to the embed title |
| `--limit, -n <N>` | Limit results (users: default 100, messages: default 20) |
| `--field "Name\|Value\|inline"` | Add field to rich embed (repeatable) |
| `--thumbnail "url"` | Add thumbnail image to embed |
| `--image "url"` | Add large image to embed |
| `--thread "name"` | Thread name (for thread command) |

## Examples

### Send Messages

```bash
# Send to channel by name
node .claude/skills/discord/query.mjs send dev-general "Deployment complete!"

# Send to channel by ID
node .claude/skills/discord/query.mjs send 966054537880289330 "Build passed"
```

### Send Announcements

```bash
# Basic announcement with auto-formatting
node .claude/skills/discord/query.mjs announce dev-alerts "New feature deployed!"

# Announcement with custom title and color
node .claude/skills/discord/query.mjs announce deployments "v5.0.1381 released" --title "Release" --color "#00C853"
```

### Rich Embeds with Fields

```bash
# Structured release announcement
node .claude/skills/discord/query.mjs rich-embed dev-general "New release is live!" \
  --title "Release v5.0.1382" \
  --field "Version|5.0.1382|inline" \
  --field "Author|@jane|inline" \
  --field "Changes|3 files modified" \
  --footer "Civitai" \
  --color "#00C853"
```

### Edit Messages

```bash
# Edit using message link
node .claude/skills/discord/query.mjs edit "https://discord.com/channels/955.../966.../123..." "Updated content"

# Edit using channel + message ID
node .claude/skills/discord/query.mjs edit dev-general 1234567890 "Updated content"
```

### Delete Messages

```bash
# Delete using message link
node .claude/skills/discord/query.mjs delete "https://discord.com/channels/955.../966.../123..."

# Delete using channel + message ID
node .claude/skills/discord/query.mjs delete dev-general 1234567890
```

### Reply to Messages

```bash
# Reply using message link
node .claude/skills/discord/query.mjs reply "https://discord.com/channels/955.../966.../123..." "Thanks for the update!"

# Reply using channel + message ID
node .claude/skills/discord/query.mjs reply dev-general 1234567890 "Got it!"
```

### Reactions

```bash
# Add a reaction (use Unicode emoji)
node .claude/skills/discord/query.mjs react "https://discord.com/channels/..." "U+2705"
node .claude/skills/discord/query.mjs react dev-general 1234567890 "U+1F44D"

# Remove a reaction
node .claude/skills/discord/query.mjs unreact "https://discord.com/channels/..." "U+2705"
```

### Pin/Unpin Messages

```bash
# Pin a message
node .claude/skills/discord/query.mjs pin "https://discord.com/channels/..."

# Unpin a message
node .claude/skills/discord/query.mjs unpin "https://discord.com/channels/..."

# List pinned messages
node .claude/skills/discord/query.mjs pins dev-general
```

### Threads

```bash
# Create thread from a message
node .claude/skills/discord/query.mjs thread "https://discord.com/channels/..." --thread "Discussion"

# Create thread in channel (no parent message)
node .claude/skills/discord/query.mjs thread dev-general --thread "New Topic"
```

### Direct Messages

```bash
# Send DM to a user by name
node .claude/skills/discord/query.mjs dm jane "Hey, can you review this PR?"

# Send DM to a user by ID
node .claude/skills/discord/query.mjs dm 123456789012345678 "Quick question about the deployment"

# Read DM history with a user
node .claude/skills/discord/query.mjs dm-messages jane

# Read last 50 DMs
node .claude/skills/discord/query.mjs dm-messages jane --limit 50
```

### Users and Roles

```bash
# List users
node .claude/skills/discord/query.mjs users --limit 50

# Find user to get mention format
node .claude/skills/discord/query.mjs user jane
# Output: Mention: <@123456789012345678>

# List roles
node .claude/skills/discord/query.mjs roles

# Find role to get mention format
node .claude/skills/discord/query.mjs role devs
# Output: Mention: <@&955572624992382996>
```

### Mention Users and Roles

```bash
# Mention a user in a message
node .claude/skills/discord/query.mjs send dev-general "<@123456789012345678> check this PR"

# Mention a role
node .claude/skills/discord/query.mjs announce dev-general "<@&955572624992382996> new release!" --title "Attention Devs"
```

### Read Messages

```bash
# Get last 20 messages (default)
node .claude/skills/discord/query.mjs messages dev-general

# Get last 50 messages
node .claude/skills/discord/query.mjs messages dev-general --limit 50
```

## Message Links

Most commands accept Discord message links directly:
- Format: `https://discord.com/channels/GUILD_ID/CHANNEL_ID/MESSAGE_ID`
- Right-click any message in Discord > "Copy Message Link"

Commands that accept message links: `edit`, `delete`, `reply`, `react`, `unreact`, `pin`, `unpin`, `thread`

## Channel Name Matching

Channel names are matched flexibly:
- Exact match: `dev-general`
- Partial match: `dev-gen` matches `dev-general`
- With or without emoji prefix: `team` matches `team`
- Case insensitive: `DEV-GENERAL` matches `dev-general`

## When to Use

- **Deployments**: Announce releases to `deployments` or `dev-alerts`
- **Bug fixes**: Share fixes with the team in `dev-general`
- **Feature announcements**: Post to relevant channels
- **Team updates**: Share progress in `team` or project-specific channels
- **Automated notifications**: Post from CI/CD or scripts
- **Mentioning users**: Look up user IDs with `user` command, then @mention them
- **Mentioning roles**: Look up role IDs with `role` command, then @mention them
- **Reading context**: Check recent messages with `messages` command
- **Reactions**: Acknowledge messages with emoji reactions
- **Organizing discussions**: Create threads for focused conversations
- **Direct messages**: Send private DMs to team members, read DM history

## Tips

- Use `announce` for important updates (creates rich embed)
- Use `send` for quick messages or automated notifications
- Use `rich-embed` for structured data with multiple fields
- Channel names are cached after first lookup
- Bot must have appropriate permissions in target channel
- Use `--json` for scripting or piping to other tools
- Message links work across all message-targeting commands

## Permissions Required

The bot needs these Discord permissions:
- `View Channels` - to list and find channels
- `Send Messages` - to post messages
- `Embed Links` - for rich announcements
- `Read Message History` - to read channel messages
- `Add Reactions` - to add reactions
- `Manage Messages` - to pin/unpin and delete messages
- `Create Public Threads` - to create threads
- Server Members Intent - enabled in Discord Developer Portal (for listing members)

© civitai · Apache-2.0 · civitai/civitai

Similar skills

All skills for DevOps and infrastructure →

discord by other authors comes first.

discord openclaw Runs Discord messaging through OpenClaw's message tool: send, edit, delete, pin, react, plus interactive buttons. Useful when your agent needs Discord as a channel for replies and notifications. CX Codex +1 3,000installs discord acedatacloud Connects an AI assistant to Discord to inspect servers via OAuth or read and post messages directly from a user account. CX Codex +1 189installs discord imoonkey Connects AI coding assistants to Discord via openweb commands. Useful for reading chat channels and posting messages directly from the terminal. CX Codex +1 ★ 79repo stars discord-channel Crokily discord-channel is a Claude Code skill that configures Discord gateway connectivity for a Pots bot and handles REST API calls, threads, and interactive components. CX Codex +1 ★ 79repo stars discord-bot claude-office-skills discord-bot is a Claude Code skill for building Discord bots that handle moderation, community tasks, notifications, and AI features. It covers bot setup and workflow design. CX Codex +1 5,500installs Kite Discord Bot Builder merlinfuchs The Kite Discord Bot Builder MCP server lets you create and fix Discord bots through conversation with AI. Kite handles hosting, so you don’t need to deploy code manually. CX Codex +1 ★ 332repo stars discord-notifications davila7 discord-notifications posts a Discord message when Claude stops working or a subagent finishes. Useful when you step away from the terminal and want a ping on completion. 217installs discordbot acedatacloud Use your Discord bot to list servers and channels, read recent messages, and post replies. It also supports a single opt-in DM to a user who initiated contact. CX Codex +1 181installs discord-automation davepoon discord-automation automates Discord messaging, roles, webhooks, and reactions using Rube MCP and Composio toolkits. It lets AI coding agents manage Discord channels and bot workflows directly. CX Codex +1 128installs

From the same set11

The whole set →
quick-mockups quick-mockups generates 3 to 5 parallel UI mockups in HTML. Useful when you need to explore layouts, wireframes, and hierarchy variations before writing frontend code. CX Codex +1 1,700installs meilisearch-admin meilisearch-admin — a skill for monitoring Meilisearch: check indexes, tasks, server health, and search settings. Spot indexing errors and diagnose what's wrong with your search. CX Codex +1 132installs postgres-query postgres-query — a skill for Claude Code that executes PostgreSQL queries during debugging and performance analysis. It targets specific database environments with --prod or --dev flags under read-only mode. CX Codex +1 105installs agent-review Route code and prompts to external AI agents for review. Anthropic models use your local subscription via Claude Agent SDK; other models go through OpenRouter API. Useful for security audits, architecture validation, or a second opinion. CX Codex +1 3installs clickhouse-query clickhouse-query runs ad-hoc ClickHouse queries from the chat: metrics, event data, execution plans. Read-only unless you say otherwise. CX Codex +1 ★ 7,327repo stars redis-inspect redis-inspect — a skill that reads keys, values and TTLs across two Redis instances, the main cache and the system cache. Handy when you need to see what the cache holds right now. CX Codex +1 ★ 7,327repo stars postgres-query postgres-query runs PostgreSQL queries, inspects index usage, and analyzes execution plans using read-only connections by default. CX Codex +1 ★ 7,327repo stars browser-automation browser-automation runs browser sessions behind an HTTP server, keeps auth profiles, and supports concurrent users. Useful for repeatable flows and multi-user checks. CX Codex +1 ★ 7,327repo stars

Project sponsors

Companies that keep this analytics open