agentleFS
alanalvestechalanalvestech/hitank/skills/discord/SKILL.md

discord

Skill38 starsChanged 8 months agoMITView on GitHub

Manage Discord servers, channels, messages and members via Bot API

34 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use taskflow-inbox-triage, voice-call and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AtomicBot-aiSkill

    taskflow-inbox-triage

    Also in 6 projects that use this

  • seedprodSkill

    voice-call

    Start voice calls via the OpenClaw voice-call plugin.

    Also in 17 projects that use this

  • seedprodSkill

    session-logs

    Search and analyze your own session logs (older/parent conversations) using jq.

    Also in 17 projects that use this

  • hkyutongSkill

    openclaw-release-maintainer

    Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.

    Also in 4 projects that use this

  • AtomicBot-aiSkill

    taskflow

    Also in 6 projects that use this

  • +7 more from seedprod

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 31 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the output is OK, proceed to the Flow section.

    line 38
  2. Very specific:

    If the output is SETUP_NEEDED, guide the user step by step.

    line 40
  3. Distinctive:

    If the script outputs an error, the token is invalid.

    line 62
  4. Distinctive:

    Avoid Markdown tables in outbound Discord messages

    line 149

“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/discord

Connect to Discord to manage servers, send messages, read channels, react, pin, create threads and more. Pure Ruby, zero gems — stdlib only.

Structure

scripts/
├── auth.rb            # Bot token auth + discord_request helper (required by all scripts)
├── check_setup.rb     # Check if token exists (outputs OK or SETUP_NEEDED)
├── save_token.rb      # Save and validate a bot token
├── guilds.rb          # List servers the bot is in
├── channels.rb        # List channels in a server
├── messages.rb        # Read messages from a channel
├── send_message.rb    # Send a message to a channel
├── edit_message.rb    # Edit a message
├── delete_message.rb  # Delete a message
├── react.rb           # Add a reaction to a message
├── pin.rb             # Pin a message
├── members.rb         # List members in a server
├── roles.rb           # List roles in a server
└── thread_create.rb   # Create a thread from a message

Setup (check before using)

ruby ~/.claude/skills/discord/scripts/check_setup.rb

If the output is OK, proceed to the Flow section.

If the output is SETUP_NEEDED, guide the user step by step. Present ONE step at a time, wait for the user to confirm before moving to the next.

Step 1 — Ask the user to create a Discord bot and get the token:

You need a Discord Bot token. Go to the Discord Developer Portal: https://discord.com/developers/applications

  1. Click New Application, give it a name
  2. Go to Bot in the left menu
  3. Click Reset Token and copy the token
  4. Under Privileged Gateway Intents, enable Server Members Intent and Message Content Intent
  5. Go to OAuth2 > URL Generator, select scope bot, then select permissions: Read Messages/View Channels, Send Messages, Manage Messages, Read Message History, Add Reactions
  6. Copy the generated URL and open it to invite the bot to your server

Paste the bot token here.

Step 2 — When the user pastes the token, save it:

ruby ~/.claude/skills/discord/scripts/save_token.rb 'PASTED_TOKEN'

If the script outputs an error, the token is invalid. Ask the user to double-check and try again.

If setup is not complete, DO NOT proceed to the Flow. Complete all steps first.

Flow

The argument $ARGUMENTS may contain a server name or channel reference.

Step 1: List servers

ruby ~/.claude/skills/discord/scripts/guilds.rb

Present the servers. If there is only one, use it automatically. Otherwise ask which server to work with.

Step 2: List channels

ruby ~/.claude/skills/discord/scripts/channels.rb GUILD_ID
ruby ~/.claude/skills/discord/scripts/channels.rb GUILD_ID --type 0

Show text channels (type 0) by default. Ask which channel to work with.

Step 3: Actions

Read messages:

ruby ~/.claude/skills/discord/scripts/messages.rb CHANNEL_ID
ruby ~/.claude/skills/discord/scripts/messages.rb CHANNEL_ID --limit 50

Send a message (requires user confirmation):

Show the message content first, then ask to confirm before sending.

ruby ~/.claude/skills/discord/scripts/send_message.rb CHANNEL_ID "Hello from HiTank!"

Edit a message (requires user confirmation):

ruby ~/.claude/skills/discord/scripts/edit_message.rb CHANNEL_ID MESSAGE_ID "Updated content"

Delete a message (requires user confirmation):

Show the message first, then ask: "Do you want to delete this message?" Only execute after a "yes".

ruby ~/.claude/skills/discord/scripts/delete_message.rb CHANNEL_ID MESSAGE_ID

React to a message (requires user confirmation):

ruby ~/.claude/skills/discord/scripts/react.rb CHANNEL_ID MESSAGE_ID "✅"

Pin a message (requires user confirmation):

ruby ~/.claude/skills/discord/scripts/pin.rb CHANNEL_ID MESSAGE_ID

Create a thread (requires user confirmation):

ruby ~/.claude/skills/discord/scripts/thread_create.rb CHANNEL_ID MESSAGE_ID "Thread Name"

List members:

ruby ~/.claude/skills/discord/scripts/members.rb GUILD_ID
ruby ~/.claude/skills/discord/scripts/members.rb GUILD_ID --limit 100

List roles:

ruby ~/.claude/skills/discord/scripts/roles.rb GUILD_ID

Notes

  • Pure Ruby, zero gems — stdlib only (json, net/http, uri, fileutils)
  • Auth via Bot token (Authorization: Bot TOKEN)
  • Token file: ~/.config/discord/token (outside the repo, never commit)
  • Sending, editing, deleting messages, reacting, pinning, and creating threads require explicit user confirmation
  • Mention users as <@USER_ID> in message content
  • Avoid Markdown tables in outbound Discord messages
  • Rate limit: Discord uses per-route rate limits — check X-RateLimit-* headers
  • Base URL: https://discord.com/api/v10

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.