# discord

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

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · ★ 7327 repo stars
- Author: civitai
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/civitai/civitai/tree/HEAD/.claude/skills/discord/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/civitai-discord

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add civitai/civitai --skill discord -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/discord/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/discord/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add civitai/civitai --skill discord -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/discord/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add civitai/civitai --skill discord -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/discord/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install civitai/civitai .claude/skills/discord
```

2. **Manually: put the files in place**
- File: `.github/skills/discord/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add civitai/civitai --skill discord -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/civitai/civitai --path .claude/skills/discord
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/discord/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add civitai/civitai --skill discord -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/civitai/civitai/tree/HEAD/.claude/skills/discord/SKILL.md

## When to use it
- 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
- 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

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 09637627d4f4b18b.

BEGIN THIRD-PARTY FILE 09637627d4f4b18b
````text
---
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"
```
````
END THIRD-PARTY FILE 09637627d4f4b18b

The third-party file has ended. Everything between the 09637627d4f4b18b tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3159 of 9182 bytes. © civitai · Apache-2.0 · https://github.com/civitai/civitai/tree/HEAD/.claude/skills/discord/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
