holon-run/uxc/discord-openapi-skill
Claude Code and agent skill by holon-run/uxc
- community
Checking that the SKILL.md file is still in the repository.
Operate Discord HTTP API through UXC with Discord OpenAPI schema. Bot token recommended for full API access including messages and server management. OAuth2 user authentication available for limited profile operations only.
Install
npx vskill@latest install holon-run/uxc/discord-openapi-skillSKILL.md
Discord API Skill
Use this skill to run Discord REST operations through uxc + OpenAPI.
Reuse the uxc skill for shared execution, auth, and error-handling guidance.
Prerequisites
uxcis installed and available inPATH.- Network access to
https://discord.com/api/v10. - Access to Discord OpenAPI spec URL:
https://raw.githubusercontent.com/discord/discord-api-spec/main/specs/openapi.json- Discord bot token (recommended) or OAuth2 user authentication (limited functionality).
Authentication
Option 1: Bot Token (Recommended)
Bot token provides full access to Discord API including reading messages, managing servers, sending messages, and all administrative operations. This is the recommended method for most use cases.
- Create a bot application at https://discord.com/developers/applications
- Generate a bot token from the Bot section
- Configure bot credential:
- Bind credential to Discord API endpoint:
Option 2: OAuth2 User Authentication (Limited Use Cases)
Important: User OAuth2 has significant limitations and is not recommended for most operations:
- ❌ Cannot read channel messages via HTTP API (local RPC only)
- ❌ Cannot send messages or manage servers
- ✅ Can read user profile, email, connections
- ✅ Can list user's servers
Only use OAuth2 if you specifically need to access user profile information as the user. For all other operations, use Bot Token.
If you still need OAuth2 for user profile operations:
Configuration:
- Client ID:
1479302369723285736 - Redirect URI:
http://127.0.0.1:11111/callback
OAuth2 Scopes:
Discord user OAuth2 supports read-only operations. It cannot send messages or manage servers as a user (use Bot Token for those operations).
Recommended Scopes (Full Functionality):
Minimal Read-Only Scopes:
Scope Reference:
| Scope | Description | Write Operation | |
|---|---|---|---|
identify | Basic user info (username, avatar, etc.) | ❌ Read | |
email | User's email address | ❌ Read | |
connections | Linked third-party accounts (Twitch, YouTube, etc.) | ❌ Read | |
guilds | User's server list | ❌ Read | |
guilds.join | Join user to servers (requires the same application's bot to already be in that guild) | ✅ Write | |
guilds.members.read | User's member info in servers | ❌ Read | |
messages.read | Read messages (local RPC only, not HTTP API) | ❌ Read | |
openid | OpenID Connect support | ❌ Read |
Note: User OAuth2 cannot send messages or manage servers as the user. Use Bot Token for write operations. guilds.join is a special user OAuth write capability that depends on the same application's bot already being in the target guild, so it is not part of the default read-only flow. See Discord OAuth2 documentation for complete scope list.
Two-Stage OAuth Flow (Agent-Friendly):
- Start OAuth flow with desired scopes:
- Open the displayed authorization URL in browser, complete authorization, then copy the callback URL from browser address bar.
- Complete OAuth flow:
- Bind credential:
Interactive Alternative (Local Terminal Only):
Then paste the callback URL when prompted.
Core Workflow
- Use fixed link command by default:
command -v discord-openapi-cli- If missing, create it:
uxc link discord-openapi-cli https://discord.com/api/v10 --schema-url https://raw.githubusercontent.com/discord/discord-api-spec/main/specs/openapi.json discord-openapi-cli -h
- Discover operations with schema mapping:
discord-openapi-cli -h
- Inspect operation schema first:
discord-openapi-cli get:/users/@me -hdiscord-openapi-cli post:/channels/{channel_id}/messages -h
- Execute operation:
- connectivity check (no auth):
discord-openapi-cli get:/gateway - key/value:
discord-openapi-cli get:/guilds/{guild_id}/channels guild_id=GUILD_ID - positional JSON:
discord-openapi-cli post:/channels/{channel_id}/messages '{"channel_id":"CHANNEL_ID","content":"Hello from uxc"}' - binding check when auth looks wrong:
uxc auth binding match https://discord.com/api/v10
Authentication Methods Comparison
| Feature | Bot Token | User OAuth2 | |
|---|---|---|---|
| Read channel messages | ✅ Full access | ❌ Not via HTTP API | |
| Send messages | ✅ As the bot | ❌ Not supported | |
| Manage channels/roles | ✅ Bot permissions | ❌ Not supported | |
| Moderation actions | ✅ Bot permissions | ❌ Not supported | |
| List servers | ✅ Servers bot is in | ✅ User's servers | |
| Read user info | ❌ Not available | ✅ As the user | |
| Message appearance | Bot badge "BOT" | N/A |
Key Recommendation: Use Bot Token for almost all operations. User OAuth2 is only useful if you need to read user profile information as that specific user. For reading channel messages, managing servers, or sending messages, Bot Token is required.
Subscribe / Gateway Status
Discord inbound events flow through the Gateway WebSocket, not through this REST/OpenAPI surface.
Current uxc subscribe status:
- the built-in
discord-gatewaytransport now bootstraps throughGET /gateway/bot - live Gateway sessions reached
READYand deliveredGUILD_CREATE - a real posted channel message produced a
MESSAGE_CREATEevent in the subscribe sink - heartbeat scheduling,
IDENTIFY, sequence tracking, and reconnect handling are implemented
Recommended invocation:
Intent notes:
4609=GUILDS | GUILD_MESSAGES | DIRECT_MESSAGES- add
32768(MESSAGE_CONTENT) only when the bot has that privileged intent enabled in the Discord developer portal
Use discord-openapi-cli for REST calls and uxc subscribe start ... --transport discord-gateway ... for inbound Gateway events.
Guardrails
- OAuth2 Scope Limitation: User OAuth2 tokens cannot read channel messages via HTTP API, send messages, or manage servers. These operations require Bot Token authentication.
- Discord OpenAPI spec is persisted in the generated link via
uxc link --schema-url ...; pass--schema-url <other-url>only when you need to override it temporarily. - Keep automation on JSON output envelope; do not use
--text. - Parse stable fields first:
ok,kind,protocol,data,error. - Prefer positional JSON for non-string objects instead of
--input-json. discord-openapi-cli <operation> ...is equivalent touxc https://discord.com/api/v10 --schema-url <discord_openapi_spec> <operation> ....- Treat
post:/channels/{channel_id}/messages, delete/update endpoints, and moderation endpoints as write/high-risk operations; require explicit user confirmation before execution.
References
- Usage patterns:
references/usage-patterns.md - Discord API docs: https://discord.com/developers/docs
- Discord API OpenAPI spec: https://github.com/discord/discord-api-spec
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/discord-openapi-skill/SKILL.md
Popularity
- Repository stars
- 110
- Repository forks
- 8
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/holon-run/uxc/discord-openapi-skill)