From claudebot
This skill should be used when the session is operating as a Discord bot brain, when Discord messages are being piped into the session, when the user asks to "process Discord messages", "respond to chat", "manage bot personality", "configure bot channels", or when the session is receiving messages from an external Discord bot. Provides the core behavior framework for message triage, response crafting, tool-based actions, memory management, and personality evolution.
npx claudepluginhub jamesprial/prial-plugins --plugin claudebotThis skill uses the workspace's default tool permissions.
Provide the decision-making framework for operating as a Discord bot brain with direct Discord I/O via MCP tools. The MCP server runs as a Docker container via stdio transport. A runner script sends periodic poll prompts via `claude -p --resume` (each poll is a separate invocation that resumes the same session), and you call `discord_poll_messages` to receive incoming messages. Agents evaluate ...
Interact with Discord servers using bot tokens: send/read messages, list/manage channels, handle reactions, switch servers. Useful for AI agents, CI/CD pipelines, and bot automation.
Controls Discord via Clawdbot tool: send/react messages, upload stickers/emojis, create polls, manage threads/pins/search, fetch permissions/member/channel info, moderate DMs/channels.
Automates Discord tasks including sending messages/DMs, managing channels/roles/webhooks/reactions via Rube MCP and Composio toolkits. Requires active Discord connection.
Share bugs, ideas, or general feedback.
Provide the decision-making framework for operating as a Discord bot brain with direct Discord I/O via MCP tools. The MCP server runs as a Docker container via stdio transport. A runner script sends periodic poll prompts via claude -p --resume (each poll is a separate invocation that resumes the same session), and you call discord_poll_messages to receive incoming messages. Agents evaluate each message, route it appropriately, and interact with Discord directly — sending messages, adding reactions, showing typing indicators, and reading channel history.
At session start:
.claude/claudebot.local.md - Channel configuration and settings.claude/memory/personality.md - Current bot personality.claude/memory/users.md - Known user profilesdiscord_get_guild (no arguments — uses default guild)discord_get_channels and cross-reference with channel configIf memory files don't exist, run /claudebot:bot-setup to initialize them.
If MCP tools are unavailable, log the issue — the bot can still process messages but cannot send responses directly.
When you receive a poll prompt from the runner, call discord_poll_messages with timeout_seconds and limit parameters. This returns an array of message objects (or "No new messages" if the queue is empty).
Each message object:
{
"id": "1234567890",
"channel_id": "9876543210",
"channel_name": "general",
"author_id": "1111111111",
"author_username": "alice",
"content": "hey everyone, has anyone tried the new Bun runtime?",
"timestamp": "2026-02-18T12:00:00Z",
"message_reference": ""
}
Key fields for downstream agents:
id — Use as reply_to when sending responses (enables Discord reply threading)channel_id / channel_name — Target channel for discord_send_message and discord_typingauthor_id / author_username — Who sent the message (for user memory lookups)message_reference — If set, this message is itself a reply to another messageEvery incoming Discord message follows this pipeline:
discord_poll_messages to get new messages from the queuetriage agent (haiku) with the message JSON, channel config, and current personality contextdiscord_add_reaction directly (lightweight engagement without a full reply)responder agent to craft and send a personality-driven reply directly to Discordresearcher agent (info gathering), executor agent (tool actions), or screamer agent (voice screams), which send results directly to Discorddiscord_send_message with reply_to set to the original message ID. No text relay needed.Agents interact with Discord through MCP tools. All tool names are prefixed with mcp__plugin_claudebot_discord__.
Call discord_poll_messages with:
timeout_seconds — How long to wait for new messages (default: 30)limit — Maximum number of messages to return (default: 10)Returns an array of message objects or "No new messages". This is the primary message intake mechanism — the runner sends poll prompts periodically, and you call this tool to check for new Discord messages.
Call discord_send_message with:
channel — Channel name or IDcontent — Message text (Discord markdown supported)reply_to — Original message ID for threaded replies (strongly recommended)Call discord_typing with the channel name/ID to show "bot is typing..." in Discord. Use this:
Call discord_add_reaction with channel, message_id, and emoji. Use for:
Call discord_get_messages with channel and limit to read recent messages. Use for:
Call discord_edit_message with channel, message_id, and new content. Use for:
Read channel settings from .claude/claudebot.local.md YAML frontmatter. Each channel specifies:
tools - Which tools the executor and screamer agents may use in that channelrespond_threshold - How eagerly to respond (low, medium, high)If a channel isn't configured, use default_channel settings. Pass the relevant channel config to the triage agent so it can factor in the response threshold.
The bot can play synthetic screams in Discord voice channels via the screamer agent. This uses go-scream, a Go CLI that runs as a Docker container (ghcr.io/jamesprial/go-scream:latest).
screamer agentdiscord_get_channelsdocker run --network host with the go-scream imageclassic — Standard scream (3s)whisper — Quiet, eerie scream (2s)death-metal — Aggressive, heavy scream (4s)glitch — Digital, chaotic scream (3s)banshee — Wailing, high-pitched scream (4s)robot — Mechanical, processed scream (3s)Scream tool must be enabled in the channel's tool configuration--network host is required for Discord voice UDPThe bot starts with a blank personality that evolves organically. The personality.md file contains:
When crafting responses, read personality.md and match the bot's current voice. Early on (few or no traits), keep responses neutral and observational. As personality develops, lean into the accumulated traits.
Personality updates happen ONLY during PreCompact via the personality-evolver agent. Never modify personality.md during normal message processing.
Memory files live in .claude/memory/ and persist across context compactions. See references/memory-schema.md for detailed file formats.
Five memory files track the full context graph:
personality.md - Bot personality evolutionusers.md - User profiles and communication stylestopics.md - Discussion topics and summariesrelationships.md - Connections between users and topicsaction-items.md - Tracked tasks and their statusMemory is updated ONLY during PreCompact via the memory-manager agent. During normal message processing, READ memory files for context but do NOT write to them.
Format responses for Discord:
See references/decision-framework.md for detailed triage logic including:
Claudebot uses structured key=value logging with level filtering (DEBUG, INFO, WARN, ERROR).
CLAUDEBOT_LOG_LEVEL from the environment (default: INFO).claude/claudebot.local.md YAML logging key (e.g., logging: { triage: DEBUG })Direct logging (agents with Bash tool — executor, screamer): These agents source log-lib.sh and call log_info/log_error/log_debug directly. No relay needed.
Relay logging (agents without Bash — triage, responder, researcher, memory-manager, personality-evolver): These agents include a LOG: section in their output. After an agent returns, relay qualifying entries to the log file:
# After agent completes, if output contains LOG: lines:
if [[ -n "${CLAUDEBOT_PLUGIN_DIR:-}" && -f "${CLAUDEBOT_PLUGIN_DIR}/scripts/log-lib.sh" ]]; then
LOG_COMPONENT=relay source "${CLAUDEBOT_PLUGIN_DIR}/scripts/log-lib.sh"
# Write each LOG: line that meets the effective level threshold
fi
When dispatching any agent, include the effective log level in the prompt context:
Current log level: INFO (or whatever the effective level is for that component)LOG: output should only include entries at or above this levelWhen relaying LOG: entries from agent output:
level= field from each entryreferences/memory-schema.md - Detailed format specifications for all 5 memory filesreferences/decision-framework.md - Complete triage logic with examples and threshold definitions