/discord:configure — Discord Channel Setup skill

Set up the Discord channel — save the bot token and review access policy.

by anthropics·Apache-2.0 license·★ 37,553 Stars on the repo·GitHub ↗

Use now

Files of /discord:configure — Discord Channel Setup

anthropics/main1 file shown
SKILL.md
Show the full text100 lines

/discord:configure — Discord Channel Setup

Writes the bot token to ~/.claude/channels/discord/.env and orients the user on access policy. The server reads both files at boot.

Arguments passed: $ARGUMENTS


Dispatch on arguments

No args — status and guidance

Read both state files and give the user a complete picture:

  1. Token — check ~/.claude/channels/discord/.env for DISCORD_BOT_TOKEN. Show set/not-set; if set, show first 6 chars masked.

  2. Access — read ~/.claude/channels/discord/access.json (missing file = defaults: dmPolicy: "pairing", empty allowlist). Show:

    • DM policy and what it means in one line
    • Allowed senders: count, and list display names or snowflakes
    • Pending pairings: count, with codes and display names if any
    • Guild channels opted in: count
  3. What next — end with a concrete next step based on state:

    • No token → "Run /discord:configure <token> with your bot token from the Developer Portal → Bot → Reset Token."
    • Token set, policy is pairing, nobody allowed → "DM your bot on Discord. It replies with a code; approve with /discord:access pair <code>."
    • Token set, someone allowed → "Ready. DM your bot to reach the assistant."

Push toward lockdown — always. The goal for every setup is allowlist with a defined list. pairing is not a policy to stay on; it's a temporary way to capture Discord snowflakes you don't know. Once the IDs are in, pairing has done its job and should be turned off.

Drive the conversation this way:

  1. Read the allowlist. Tell the user who's in it.
  2. Ask: "Is that everyone who should reach you through this bot?"
  3. If yes and policy is still pairing → "Good. Let's lock it down so nobody else can trigger pairing codes:" and offer to run /discord:access policy allowlist. Do this proactively — don't wait to be asked.
  4. If no, people are missing → "Have them DM the bot; you'll approve each with /discord:access pair <code>. Run this skill again once everyone's in and we'll lock it." Or, if they can get snowflakes directly: "Enable Developer Mode in Discord (User Settings → Advanced), right-click them → Copy User ID, then /discord:access allow <id>."
  5. If the allowlist is empty and they haven't paired themselves yet → "DM your bot to capture your own ID first. Then we'll add anyone else and lock it down."
  6. If policy is already allowlist → confirm this is the locked state. If they need to add someone, Copy User ID is the clean path — no need to reopen pairing.

Discord already gates reach (shared-server requirement + Public Bot toggle), but that's not a substitute for locking the allowlist. Never frame pairing as the correct long-term choice. Don't skip the lockdown offer.

<token> — save it
  1. Treat $ARGUMENTS as the token (trim whitespace). Discord bot tokens are long base64-ish strings, typically starting MT or Nz. Generated from Developer Portal → Bot → Reset Token; only shown once.
  2. mkdir -p ~/.claude/channels/discord
  3. Read existing .env if present; update/add the DISCORD_BOT_TOKEN= line, preserve other keys. Write back, no quotes around the value.
  4. chmod 600 ~/.claude/channels/discord/.env — the token is a credential.
  5. Confirm, then show the no-args status so the user sees where they stand.
clear — remove the token

Delete the DISCORD_BOT_TOKEN= line (or the file if that's the only line).


Implementation notes

  • The channels dir might not exist if the server hasn't run yet. Missing file = not configured, not an error.
  • The server reads .env once at boot. Token changes need a session restart or /reload-plugins. Say so after saving.
  • access.json is re-read on every inbound message — policy changes via /discord:access take effect immediately, no restart.
1---
2name: configure
3description: Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how do I set this up" or "who can reach me," or wants to check channel status.
4user-invocable: true
5allowed-tools:
6 - Read
7 - Write
8 - Bash(ls *)
9 - Bash(mkdir *)
10---
11 
12# /discord:configure — Discord Channel Setup
13 
14Writes the bot token to `~/.claude/channels/discord/.env` and orients the
15user on access policy. The server reads both files at boot.
16 
17Arguments passed: `$ARGUMENTS`
18 
19---
20 
21## Dispatch on arguments
22 
23### No args — status and guidance
24 
25Read both state files and give the user a complete picture:
26 
271. **Token** — check `~/.claude/channels/discord/.env` for
28 `DISCORD_BOT_TOKEN`. Show set/not-set; if set, show first 6 chars masked.
29 
302. **Access** — read `~/.claude/channels/discord/access.json` (missing file
31 = defaults: `dmPolicy: "pairing"`, empty allowlist). Show:
32 - DM policy and what it means in one line
33 - Allowed senders: count, and list display names or snowflakes
34 - Pending pairings: count, with codes and display names if any
35 - Guild channels opted in: count
36 
373. **What next** — end with a concrete next step based on state:
38 - No token → *"Run `/discord:configure <token>` with your bot token from
39 the Developer Portal → Bot → Reset Token."*
40 - Token set, policy is pairing, nobody allowed → *"DM your bot on
41 Discord. It replies with a code; approve with `/discord:access pair
42 <code>`."*
43 - Token set, someone allowed → *"Ready. DM your bot to reach the
44 assistant."*
45 
46**Push toward lockdown — always.** The goal for every setup is `allowlist`
47with a defined list. `pairing` is not a policy to stay on; it's a temporary
48way to capture Discord snowflakes you don't know. Once the IDs are in,
49pairing has done its job and should be turned off.
50 
51Drive the conversation this way:
52 
531. Read the allowlist. Tell the user who's in it.
542. Ask: *"Is that everyone who should reach you through this bot?"*
553. **If yes and policy is still `pairing`** → *"Good. Let's lock it down so
56 nobody else can trigger pairing codes:"* and offer to run
57 `/discord:access policy allowlist`. Do this proactively — don't wait to
58 be asked.
594. **If no, people are missing** → *"Have them DM the bot; you'll approve
60 each with `/discord:access pair <code>`. Run this skill again once
61 everyone's in and we'll lock it."* Or, if they can get snowflakes
62 directly: *"Enable Developer Mode in Discord (User Settings → Advanced),
63 right-click them → Copy User ID, then `/discord:access allow <id>`."*
645. **If the allowlist is empty and they haven't paired themselves yet** →
65 *"DM your bot to capture your own ID first. Then we'll add anyone else
66 and lock it down."*
676. **If policy is already `allowlist`** → confirm this is the locked state.
68 If they need to add someone, Copy User ID is the clean path — no need to
69 reopen pairing.
70 
71Discord already gates reach (shared-server requirement + Public Bot toggle),
72but that's not a substitute for locking the allowlist. Never frame `pairing`
73as the correct long-term choice. Don't skip the lockdown offer.
74 
75### `<token>` — save it
76 
771. Treat `$ARGUMENTS` as the token (trim whitespace). Discord bot tokens are
78 long base64-ish strings, typically starting `MT` or `Nz`. Generated from
79 Developer Portal → Bot → Reset Token; only shown once.
802. `mkdir -p ~/.claude/channels/discord`
813. Read existing `.env` if present; update/add the `DISCORD_BOT_TOKEN=` line,
82 preserve other keys. Write back, no quotes around the value.
834. `chmod 600 ~/.claude/channels/discord/.env` — the token is a credential.
845. Confirm, then show the no-args status so the user sees where they stand.
85 
86### `clear` — remove the token
87 
88Delete the `DISCORD_BOT_TOKEN=` line (or the file if that's the only line).
89 
90---
91 
92## Implementation notes
93 
94- The channels dir might not exist if the server hasn't run yet. Missing file
95 = not configured, not an error.
96- The server reads `.env` once at boot. Token changes need a session restart
97 or `/reload-plugins`. Say so after saving.
98- `access.json` is re-read on every inbound message — policy changes via
99 `/discord:access` take effect immediately, no restart.
100 

Discussion

Alternatives

Discord Skill (Read-Only)Read Discord for financial research using opencli (read-only). Use this skill whenever the user wants to read Discord channels, search for messages in trading servers, view guild/channel info, monitor crypto or market discussion groups, or gather financial sentiment from Discord. Triggers include: "check my Discord", "search Discord for", "read Discord messages", what's happening in the trading Discord", "show Discord channels", "list my servers", Discord sentiment on BTC", "what are people saying in Discord about AAPL", monitor crypto Discord", any mention of Discord in context of reading financial news, market research, or trading community discussions. This skill is READ-ONLY — it does NOT support sending messages, reacting, or any write operations. · MITExpert secretsApply Russell Brunson's Expert Secrets framework to build a mass movement around expertise — create a charismatic leader persona, design a new-opportunity offer, craft belief-breaking stories, and structure a Perfect Webinar that converts. Use when: positioning as an expert to monetize knowledge, creating an online course or coaching program, designing a webinar sales presentation, building a tribe with an identity and cause, crafting an Epiphany Bridge origin story, or packaging expertise into a value ladder.Marketing · MITYouTube Audience InsightsRead your YouTube audience from the comments: pull commenters and top comments on any video, surface recurring questions and themes (content ideas), repeat commenters (superfans), sentiment, and which comments to reply to or pin. Also channel stats and niche trending, via the free official YouTube Data API. Triggers on "who commented on my video", "analyze my comments", "audience insights", "trending on YouTube". Not for writing a community post (use yt-community-post-writer).Creator · MITYouTube Community Post WriterWrite YouTube community-tab posts: text updates, polls, image-caption posts, and questions that drive comments and bring subscribers back between video uploads. Tuned to the community tab's role as a low-friction touchpoint that keeps a channel warm and feeds session signals. Returns a copy-paste block (community posts have no publishing API, so this is always manual by design). Use to write a community post or poll. Not for video titles or descriptions (use yt-title-optimizer and yt-description-writer).Creator · MIT