home / skills / lycfyi / community-agent-plugin / discord-doctor

This skill diagnoses Discord configuration and connectivity issues, guiding you through fixes and validation steps to restore sync and access.

npx playbooks add skill lycfyi/community-agent-plugin --skill discord-doctor

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.9 KB
---
name: discord-doctor
description: "Diagnose Discord configuration and connectivity issues. Use when user reports problems with Discord sync, connection errors, or wants to troubleshoot."
---

# Discord Doctor

Diagnose configuration and connectivity issues with Discord integration.

## When to Use

- User says "Discord not working" or "diagnose Discord"
- User reports connection or authentication errors
- User says "check Discord setup" or "troubleshoot Discord"
- Before asking for help with Discord issues
- When sync or other Discord commands fail unexpectedly

## How to Execute

```bash
python ${CLAUDE_PLUGIN_ROOT}/tools/discord_doctor.py
```

## What It Checks

1. **Environment file** - `.env` exists in cwd
2. **Discord token** - `DISCORD_USER_TOKEN` is set
3. **Token format** - Token appears valid (length, no prefixes)
4. **Authentication** - Token can connect to Discord API
5. **Config file** - `config/agents.yaml` exists and is valid YAML
6. **Server configured** - A default server is selected
7. **Data directory** - `data/` is writable

## Output

Displays results with:
- ✓ for passed checks
- ✗ for failed checks

For each failure, provides a **suggested fix** that the user can run manually.

**Important:** This tool only diagnoses issues - it does not modify any files.

## Example Output

```
discord-doctor results:

  ✓ Environment file (.env found)
  ✓ Discord token (***...abc123)
  ✓ Token format (Format looks valid)
  ✗ Authentication (Token expired)
  ✓ Config file (Valid YAML)
  ✓ Server configured (My Server (1234))
  ✓ Data directory (./data)

Some checks failed. Suggested fixes:

  • Authentication:
    Your token may be expired. Get a fresh token from Discord DevTools.

(Run these steps manually - doctor does not modify files)
```

## Next Steps

After fixing issues:
1. Run `discord-init` to reconfigure if needed
2. Run `discord-sync` to test connectivity

Overview

This skill diagnoses Discord integration and connectivity issues to help you find configuration or authentication problems quickly. It runs a sequence of checks and reports pass/fail results with suggested fixes you can apply manually. Use it when Discord sync, connection, or token issues appear.

How this skill works

The tool inspects the local environment and configuration files, validates the presence and format of the Discord user token, and attempts to authenticate with the Discord API. It also checks agent configuration YAML, ensures a default server is selected, and verifies the data directory is writable. Results show clear pass/fail markers and include concise suggested fixes for any failing checks.

When to use it

  • When a user reports “Discord not working” or asks to diagnose Discord
  • When you see connection, authentication, or sync errors
  • Before requesting external help to collect diagnostic info
  • After changing tokens or configuration files
  • When automated sync commands fail unexpectedly

Best practices

  • Keep a backup of .env and config files before making changes
  • Use official DevTools to obtain a fresh user token if authentication fails
  • Run the diagnosis in the project root so the tool finds .env, config/agents.yaml, and data/
  • Apply suggested fixes manually; the tool does not modify files automatically
  • After fixes, run discord-init then discord-sync to verify resolution

Example use cases

  • User reports token expired: run the skill to confirm authentication failure and get steps to refresh token
  • Intermittent sync failures: diagnose file permissions and server configuration issues
  • New setup verification: confirm .env presence, token format, YAML validity, and data directory writability
  • Pre-troubleshooting checklist: run the skill to gather targeted guidance before filing a support ticket
  • Post-change validation: verify that a replaced token or updated YAML resolved connectivity issues

FAQ

Will the tool change my files automatically?

No. It only diagnoses issues and provides suggested fixes you must apply manually.

What if authentication check fails but token looks valid?

Try obtaining a fresh token via DevTools and replace the token in your .env. Then re-run the diagnosis and authentication check.