home / skills / lycfyi / community-agent-plugin / discord-init
This skill initializes Discord configuration by connecting your token, selecting a server, and saving settings to agents.yaml for first-time setup.
npx playbooks add skill lycfyi/community-agent-plugin --skill discord-initReview the files below or copy the command above to add this skill to your agents.
---
name: discord-init
description: "Initialize Discord configuration. Use when user wants to set up, configure, or connect their Discord account for the first time."
---
# Discord Init
Automatically configure the Discord server from your account.
## When to Use
- User says "set up Discord" or "configure Discord"
- User says "connect my Discord account"
- User says "initialize Discord"
- First time setup before syncing
- When `config/agents.yaml` doesn't exist or needs updating
## How to Execute
### Auto-detect and save server:
```bash
python ${CLAUDE_PLUGIN_ROOT}/tools/discord_init.py
```
### Select a specific server:
```bash
python ${CLAUDE_PLUGIN_ROOT}/tools/discord_init.py --server SERVER_ID
```
## What It Does
All paths are relative to cwd (current working directory):
1. Connects to Discord using your token from `./.env`
2. Lists all servers you have access to
3. If one server: auto-selects it
4. If multiple: selects the first one (or use `--server` to pick)
5. Saves configuration to `./config/agents.yaml`
## Output
Updates `./config/agents.yaml` with Discord settings:
- `discord.default_server_id`: Your Discord server ID
- `discord.default_server_name`: Server display name
- `data_dir`: Where messages are stored (shared setting)
- `discord.retention_days`: Default sync history
## Prerequisites
- `./.env` file with `DISCORD_USER_TOKEN` set (in cwd)
- Get your token: https://discordhunt.com/articles/how-to-get-discord-user-token
## Next Steps
After init, use discord-sync to download messages.
This skill initializes and saves Discord configuration so your agent can access and sync server messages. It connects with your Discord user token, detects available servers, and writes the chosen server settings into a local agents configuration file. Use it as the first setup step before running message sync or analysis tools.
The skill reads your DISCORD_USER_TOKEN from a local .env file and uses it to list servers you can access. It auto-selects a single server or picks the first available server (unless you pass a specific server ID). Finally, it writes the server ID, server name, data directory, and retention settings into ./config/agents.yaml for downstream tools to use.
What do I need before running init?
Place a .env file in the current working directory with DISCORD_USER_TOKEN set to your user token.
How do I select a specific server?
Run the init tool with --server SERVER_ID to force the chosen server instead of auto-selection.