discord-connect
Skill136 starsChanged 3 months agoMITView on GitHub
discord-connect — Connect and configure Hermes on Discord — bot setup, intents, OAuth2 scopes, permissions, and gateway configuration.
- Reads credentials
- Installs packages
We split this skill into the rules it gives an agent
26 rules. About 0 are common, 9 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 57
Always verify prior state before assuming: Don't assume a server exists, permissions are set, or the bot is already invited — ask first.
- Distinctive: line 71
After authorization, restart the Hermes gateway once so it re-discovers guilds/channels.
- Very specific: line 74
Verify Hermes channel discovery: send_message(action='list') or ~/.hermes/channel_directory.json should show a Discord channel.
- Very specific: line 75
Test outbound text first with send_message to the discovered channel.
- Very specific: line 77
If the bot only reacts with ✅ and no response appears, check authorization (DISCORD_ALLOWED_USERS) before deeper Discord debugging.
- Distinctive: line 78
If Hermes still does not expose Discord send targets, treat that as a discovery/visibility problem, not proof that Discord auth failed.
- Very specific: line 84
When the user reports Discord showing integration requires code grant during install:
- Very specific: line 86
Stop changing URL encoding by hand: Do not bounce between +, %20, or hand-edited scopes unless Discord's generator itself produced the link.
- Distinctive: line 87
Ask whether the bot has already been added: If yes, stop troubleshooting the invite link and switch to channel/mention verification.
- Very specific: line 100
Add the user to DISCORD_ALLOWED_USERS in the active Hermes env/config.
- Very specific: line 102
Test with a real mention (@<botname> test) and verify logs show no Unauthorized user warning.
- Very specific: line 114
When a Hermes profile is created for a specialized Discord bot persona (for example support-bot, spanish-tutor, or another training coach):
- Distinctive: line 116
Prefer a dedicated Discord bot token per long-running profile.
- Very specific: line 117
Keep the profile's Discord toolset minimal for the job.
- Distinctive: line 119
Verify profile-specific Discord readiness with:
- Very specific: line 124
Start foreground first for testing (<profile> gateway run), then install/start the profile gateway only after the bot token and …
- Very specific: line 144
If hermes status shows Discord as "not configured" but you set the token, check .env for DISCORD_BOT_TOKEN.
- Distinctive: line 145
After setting the token, always restart the gateway.
- Distinctive: line 150
If Discord shows <botname> is typing while the user believes Hermes is idle, do not assume repeated model calls.
- Very specific: line 152
Check ~/.hermes/logs/gateway.log for repeated inbound message: + response ready: pairs.
- Very specific: line 154
Prefer a durable one-shot typing-pulse fix over merely telling the user to /reset: Discord send_typing() should send one pulse and leave no …
- Very specific: line 155
Verify with focused Discord typing tests, restart ai.hermes.gateway, then watch at least ~45 seconds of logs for idle behavior.
- Very specific: line 161
Verify Hermes can join the voice channel first.
- Very specific: line 162
If voice replies fail with discord.errors.ClientException: ffmpeg was not found, install playback dependencies:
- Distinctive: line 166
Verify from the Hermes venv:
- Very specific: line 182
Test from Discord while the user is in a voice channel: /voice join, then send a normal text/voice prompt and listen for TTS playback.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Discord Connection Guide
Quick Setup Flow
- Create a bot application — go to Discord Developer Portal, create a new application (or use an existing one).
- Generate a bot token — under Bot → Reset Token, copy the token.
- Enable intents — in Bot settings:
- Message Content Intent (required for reading messages)
- Presence Intent (optional, for online status)
- Generate OAuth2 invite URL — use OAuth2 URL Generator and paste into browser.
- Invite to server — pick your guild from the dropdown.
- Configure in Hermes —
hermes gateway setupor manually configure via config.yaml.
Bot Permissions (Minimal)
For Hermes, you only need:
- Send Messages (0x2)
- Read Message History (0x100000)
- View Channel (0x400)
- Use External Emojis (0x1000000)
Nice to have: Embed Links, Add Reactions, Send Text-to-Speech, Manage Messages.
Shortcut: set permissions to 3558496 ("Moderator" preset).
OAuth2 Scopes
bot— essential, lets you invite it to serversapplications.commands— enables slash commands (useful but not strictly required)
Guild Install vs User Install
Guild install is the one that puts the bot into your servers. User install is for apps, not bots. When generating the OAuth2 link, make sure guild is in the scope (usually default).
Gotchas
- Private applications cannot have a default authorization link. Generate manually via OAuth2 URL Generator.
- Message Content Intent must be enabled — without it, the bot reads messages as empty strings and appears silent.
- Presence Intent — optional but useful for seeing when the bot is online/offline.
- Prefer the exact invite URL generated by Discord Developer Portal over improvising OAuth / Code Grant explanations from memory. If the generated link fails, inspect the portal settings rather than guessing about URL semantics.
- Always verify prior state before assuming. Don't assume a server exists, permissions are set, or the bot is already invited — ask first.
- Discord connected is not the same as Discord usable. A successful gateway login only proves the token works. Separately verify that the bot is invited to a guild, can see a text channel, slash commands appear there, and Hermes discovered the channel.
- After adding the bot to a new server, restart the Hermes gateway so
channel_directory.jsonrebuilds against current guild visibility. - If
send_message(action='list')still shows no Discord targets, inspect~/.hermes/channel_directory.json. If it contains"discord": []while the bot is present in the server, treat it as a guild/channel discovery or visibility problem, not an auth failure. - Being connected is not the same as being installed.
Connected as <botname>#xxxxonly proves the token works. It does NOT mean the bot has been added to the user's server. - If the bot is in the server but silent, check channel-level permissions before deeper debugging. Minimum useful perms: View Channel, Send Messages, Read Message History, Use Application Commands; Embed Links preferred.
- Always verify prior state before assuming. Don't assume a server exists, permissions are set, or the bot is already invited — ask first.
Invite/First-Use Verification
Invite/First-Use Verification
- Confirm Hermes shows Discord as configured and the gateway logs show
Connected as .... - Confirm the user has actually authorized the bot into a server — token connectivity alone is insufficient. Bot API
GET /users/@me/guildsshould return at least one guild after install. - After authorization, restart the Hermes gateway once so it re-discovers guilds/channels.
- In Discord, confirm the bot appears in the server member list.
- In a normal text channel, verify channel permissions: View Channel, Send Messages, Read Message History, Use Application Commands.
- Verify Hermes channel discovery:
send_message(action='list')or~/.hermes/channel_directory.jsonshould show a Discord channel. - Test outbound text first with
send_messageto the discovered channel. - Then test a real user mention, e.g.
@<botname> test, especially whenrequire_mention: trueis enabled in Hermes config. - If the bot only reacts with ✅ and no response appears, check authorization (
DISCORD_ALLOWED_USERS) before deeper Discord debugging. - If Hermes still does not expose Discord send targets, treat that as a discovery/visibility problem, not proof that Discord auth failed.
- Always verify prior state before assuming. Don't assume a server exists, permissions are set, or the bot is already invited — ask first.
Common Failure Pattern: integration requires code grant
When the user reports Discord showing integration requires code grant during install:
- Stop changing URL encoding by hand. Do not bounce between
+,%20, or hand-edited scopes unless Discord's generator itself produced the link. - Ask whether the bot has already been added. If yes, stop troubleshooting the invite link and switch to channel/mention verification.
- Prefer the exact link generated by Discord Developer Portal over a manually reconstructed one.
- Verify the setting directly if you have the bot token:
GET /api/v10/oauth2/applications/@mewith bot auth returnsbot_require_code_grant. If true, the owner must disable Bot → Authorization Flow → Requires OAuth2 Code Grant in the Developer Portal and save. Bot tokens cannot patch this endpoint (Bots cannot use this endpoint). - After disabling Code Grant, re-open the invite URL and complete the guild install. If Discord presents hCaptcha, stop and have the user solve it; then continue automation.
- Once the bot is added, verify Hermes-side behavior with a first @mention because
require_mention: trueand user authorization are common follow-on blockers.
Common Failure Pattern: Only ✅ reaction, no text response
A ✅ reaction can mean Hermes received the Discord message but the gateway later dropped it before agent execution. Check gateway logs for Unauthorized user: <id> (<name>) on discord.
Fix path:
- Get the Discord sender ID from logs or recent channel messages.
- Add the user to
DISCORD_ALLOWED_USERSin the active Hermes env/config. If using.envat gateway startup, ensure the value is present there too. - Restart the gateway.
- Test with a real mention (
@<botname> test) and verify logs show noUnauthorized userwarning.
This is separate from channel permissions: outbound send_message can work while inbound user messages are still denied by Hermes authorization.
- If Discord presents hCaptcha at final Authorize, stop and ask the user to complete it. Do not attempt CAPTCHA solving. Continue verification afterward.
- Once the bot is added, verify Hermes-side behavior with a first @mention because
require_mention: trueis a common default. - When the user asks the agent to “handle all of it,” use a safe login handoff: open the Developer Portal, let the user authenticate via QR/passkey/password themselves, then continue. Never type their password or bypass 2FA.
- Once the bot is added, verify Hermes-side behavior with a first @mention because
require_mention: trueis a common default.
Profile-specific Discord gateways
When a Hermes profile is created for a specialized Discord bot persona (for example support-bot, spanish-tutor, or another training coach):
- Prefer a dedicated Discord bot token per long-running profile. Do not leave multiple active gateways sharing the same Discord bot token; it can cause routing, voice joins, slash-command discovery, and session ownership weirdness.
- Keep the profile's Discord toolset minimal for the job. For training profiles, a good baseline is
file,skills,memory,session_search,clarify, and optionaltts. - Disable unrelated surfaces in that profile (
telegram,api_server, etc.) unless explicitly needed, to avoid accidental extra endpoints or port conflicts. - Verify profile-specific Discord readiness with:
<profile> tools list --platform discord
<profile> gateway status --full- Start foreground first for testing (
<profile> gateway run), then install/start the profile gateway only after the bot token and guild/channel permissions are clean.
Hermes Configuration
CRITICAL: Token must be in DISCORD_BOT_TOKEN env var (in .env), not just config.yaml.
The Discord adapter reads the token from DISCORD_BOT_TOKEN environment variable. Setting it only in config.yaml's discord.token is NOT sufficient — the plugin won't pick it up.
# Set the token (writes to .env)
hermes config set DISCORD_BOT_TOKEN YOUR_TOKEN_HERE
# Verify it's there
python3 -c "import os; print('DISCORD_BOT_TOKEN:', 'configured' if os.environ.get('DISCORD_BOT_TOKEN') else 'not set')"
# Restart gateway — the plugin may be stuck in paused state from previous failures
launchctl stop ai.hermes.gateway && launchctl start ai.hermes.gatewayTroubleshooting:
- If
hermes statusshows Discord as "not configured" but you set the token, check.envforDISCORD_BOT_TOKEN. The config.yaml path (discord.token) is NOT checked by the adapter. - After setting the token, always restart the gateway. The plugin can get stuck in its paused state (after 10 consecutive failures) and won't retry on subsequent starts.
- Token format: raw bot token (not base64 encoded). Length ~72 chars, contains
.separators.
Discord idle typing / apparent LLM polling
If Discord shows <botname> is typing while the user believes Hermes is idle, do not assume repeated model calls. First separate true repeated LLM turns from Discord typing/progress transport:
- Check
~/.hermes/logs/gateway.logfor repeatedinbound message:+response ready:pairs. Those indicate actual turns. Memory monitor / cron ticker / platform websocket lines do not. - Inspect the Discord adapter typing lifecycle. A persistent
/channels/{channel_id}/typingrefresh loop can make the bot appear active even when no new prompt is being launched. - Prefer a durable one-shot typing-pulse fix over merely telling the user to
/reset: Discordsend_typing()should send one pulse and leave no background typing task;stop_typing()should remain as stale-task cleanup. - Verify with focused Discord typing tests, restart
ai.hermes.gateway, then watch at least ~45 seconds of logs for idle behavior.
Discord Voice Setup / Troubleshooting
For /voice join / /voice channel to speak in Discord voice channels on macOS:
- Verify Hermes can join the voice channel first; logs should show
VoiceReceiver started. - If voice replies fail with
discord.errors.ClientException: ffmpeg was not found, install playback dependencies:
brew install ffmpeg opus- Verify from the Hermes venv:
command -v ffmpeg
~/.hermes/hermes-agent/venv/bin/python - <<'PY'
import discord, shutil
print('ffmpeg_path', shutil.which('ffmpeg'))
if not discord.opus.is_loaded():
discord.opus.load_opus('/opt/homebrew/lib/libopus.dylib')
print('opus_loaded', discord.opus.is_loaded())
PY- Restart gateway:
launchctl stop ai.hermes.gateway && launchctl start ai.hermes.gateway- Confirm the new startup logs no longer show
Opus codec not found — voice channel playback disabled. - Test from Discord while the user is in a voice channel:
/voice join, then send a normal text/voice prompt and listen for TTS playback.
Troubleshooting
- Bot appears silent — check Message Content Intent is enabled in Bot → Privileged Gateway Intents.
- Bot not responding to messages — verify the bot token in config matches the one from the developer portal.
- Invite succeeded but Hermes still shows no Discord targets — verify slash commands appear in a normal text channel, then inspect
~/.hermes/channel_directory.json. Ifdiscordis empty, restart the gateway and treat it as channel discovery / visibility rather than auth failure. - Discord voice joins but does not speak — install
ffmpegandopus, then restart gateway. The smoking-gun log isAuto voice reply failed: ffmpeg was not found. - Gateway dies on logout — enable linger:
sudo loginctl enable-linger $USER.
Reference Files
See Also
- hermes-agent — broader Hermes configuration reference
- platforms docs — all messaging platform setups
Other versions1 project uses a version of this.
Word for word · 1
- AtlasOmnia/hermes-custom-pack★ 75100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository72 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apple-remindersSkill
- imessageSkill
- macos-app-automationSkill
- macos-storage-managementSkill
- hermes-agentSkill
- hermes-config-editingSkill
- hermes-context-optimizationSkill
- hermes-overnight-autonomySkill
- hermes-plugin-evaluationSkill
- hermes-session-maintenanceSkill
- local-model-selectionSkill
- opencodeSkill
- computer-useSkill
- claude-designSkill
- content-styleSkill
- marketing-collateral-designSkill
- dogfoodSkill
- codebase-inspectionSkill
- github-authSkill
- github-code-reviewSkill
- github-issuesSkill
- github-pre-push-gatesSkill
- github-pr-workflowSkill
- github-readme-maintenanceSkill
- github-repo-managementSkill
- github-workflowsSkill
- local-app-github-publishingSkill
- meal-trackerSkill
- hermes-desktop-pluginsSkill
- hermes-mnemosyneSkill
- hermes-self-evaluationSkill
- hermes-starter-onboardingSkill
- messaging-gateway-troubleshootingSkill
- mnemosyne-maintenanceSkill
- hermes-nightly-self-check-decisionsSkill
- hermes-plugin-developmentSkill
- skill-auditorSkill
- hermes-themesSkill
- notes-automation-workflowsSkill
- daily-note-wrapupSkill
- obsidianSkill
- vault-organizationSkill
- product-competitor-analysisSkill
- destination-trip-planningSkill
- domestic-trip-planningSkill
- google-workspaceSkill
- mapsSkill
- notionSkill
- office-document-reviewSkill
- session-artifact-indexingSkill
- daily-news-digestsSkill
- dynamic-content-extractionSkill
- evidence-based-repliesSkill
- external-model-reviewSkill
- hf-model-card-researchSkill
- local-discoverySkill
- marketplace-purchase-vettingSkill
- site-mappingSkill
- source-verificationSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

