Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Retrieve messages from Discord channels via the Discord API. Use this skill when the user wants to read, search, or analyze messages from a Discord channel.
.claude/skills/evolution-foundation-discord-get-messages/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 127% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 180% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-02 | ✓→✗ | ▼ Worse | 89% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 111% | 0% |
Retrieve messages from Discord channels using the Discord API v10. This skill supports pagination, filtering by message count, and retrieving message history.
Use this skill when the user wants to:
DISCORD_BOT_TOKEN environment variable must be setWhen the user requests to retrieve Discord messages:
DISCORD_BOT_TOKEN is set in environmentlimit: Number of messages to retrieve (default: 50, max: 100)before: Get messages before this message ID (for pagination)after: Get messages after this message IDaround: Get messages around this message IDUse the following curl command structure:
bash curl -X GET "https://discord.com/api/v10/channels/{CHANNEL_ID}/messages?limit=50" \ -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"
Replace:
{CHANNEL_ID} with the actual channel IDlimit=50 with desired message count (1-100)bash?limit=10 # Get 10 most recent messages (default: 50, max: 100)
bash?before=1234567890123456789&limit=50 # Get 50 messages before this message ID
bash?after=1234567890123456789&limit=50 # Get 50 messages after this message ID
bash?around=1234567890123456789&limit=50 # Get 50 messages around this message ID
Each message returned contains:
json{ "id": "1234567890123456789", "channel_id": "123456789012345678", "author": { "id": "987654321098765432", "username": "Username", "discriminator": "0000", "avatar": "avatar_hash" }, "content": "Message text content", "timestamp": "2025-10-20T12:00:00.000000+00:00", "edited_timestamp": null, "tts": false, "mention_everyone": false, "mentions": [], "mention_roles": [], "attachments": [], "embeds": [], "reactions": [], "pinned": false, "type": 0 }
[2025-10-20 12:00] Username: Message content here
[2025-10-20 11:55] OtherUser: Another messageMessage ID: 1234567890123456789
Author: Username#0000 (987654321098765432)
Timestamp: 2025-10-20T12:00:00.000000+00:00
Content: Message text content here
Attachments: image.png (https://cdn.discordapp.com/...)After retrieving messages, filter by author ID or username:
bash# Get messages then filter in output curl ... | jq '.[] | select(.author.username == "TargetUser")'
Search for specific keywords in message content:
bash# Get messages then search content curl ... | jq '.[] | select(.content | contains("keyword"))'
Exclude system messages and embeds:
bash# Filter message type 0 (default text messages) curl ... | jq '.[] | select(.type == 0)'
To retrieve more than 100 messages:
?limit=100?before={oldest_id}&limit=100Example:
bash# First batch curl "https://discord.com/api/v10/channels/{CHANNEL_ID}/messages?limit=100" \ -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" # Get oldest message ID from response (e.g., 1234567890123456789) # Next batch curl "https://discord.com/api/v10/channels/{CHANNEL_ID}/messages?before=1234567890123456789&limit=100" \ -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"
401 Unauthorized
DISCORD_BOT_TOKEN is set correctly403 Forbidden
404 Not Found
400 Bad Request
limit parameter to reduce response sizeSee examples.md for detailed usage scenarios.
GET /channels/{channel.id}/messages| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | pass→pass | 6,346 | 4,430 | -30% | 1 | 1 | 0% | 1,305 | 2,752 | +111% | 0 | 0 | — |
case-01 | fail→fail | 7,450 | 6,201 | -17% | 1 | 1 | 0% | 1,422 | 2,214 | +56% | 0 | 0 | — |
case-02 | pass→fail | 6,710 | 7,673 | +14% | 1 | 1 | 0% | 1,219 | 2,308 | +89% | 0 | 0 | — |
case-03 | fail→pass | 7,225 | 6,471 | -10% | 1 | 1 | 0% | 1,395 | 3,164 | +127% | 0 | 0 | — |
case-04 | pass→pass | 10,138 | 4,655 | -54% | 1 | 1 | 0% | 2,126 | 2,772 | +30% | 0 | 0 | — |
case-05 | pass→pass | 9,870 | 5,215 | -47% | 1 | 1 | 0% | 2,136 | 2,951 | +38% | 0 | 0 | — |
case-07 | fail→pass | 4,526 | 2,131 | -53% | 1 | 1 | 0% | 818 | 2,287 | +180% | 0 | 0 | — |
case-08 | pass→pass | 3,273 | 2,257 | -31% | 1 | 1 | 0% | 595 | 2,304 | +287% | 0 | 0 | — |
case-09 | pass→pass | 4,694 | 3,076 | -34% | 1 | 1 | 0% | 891 | 2,533 | +184% | 0 | 0 | — |
case-10 | pass→pass | 9,459 | 5,281 | -44% | 1 | 1 | 0% | 1,826 | 3,000 | +64% | 0 | 0 | — |
case-11 | pass→pass | 9,902 | 4,135 | -58% | 1 | 1 | 0% | 1,901 | 2,643 | +39% | 0 | 0 | — |
case-12 | pass→pass | 5,505 | 4,257 | -23% | 1 | 1 | 0% | 1,158 | 2,682 | +132% | 0 | 0 | — |
case-13 | pass→pass | 7,729 | 2,166 | -72% | 1 | 1 | 0% | 1,266 | 2,238 | +77% | 0 | 0 | — |
case-14 | pass→pass | 9,037 | 3,553 | -61% | 1 | 1 | 0% | 1,550 | 2,515 | +62% | 0 | 0 | — |
case-15 | fail→pass | 9,550 | 3,630 | -62% | 1 | 1 | 0% | 1,749 | 2,536 | +45% | 0 | 0 | — |
case-16 | pass→pass | 9,056 | 2,982 | -67% | 1 | 1 | 0% | 1,644 | 2,485 | +51% | 0 | 0 | — |
case-17 | pass→pass | 12,483 | 1,851 | -85% | 1 | 1 | 0% | 2,156 | 2,075 | -4% | 0 | 0 | — |
case-18 | pass→pass | 4,112 | 2,218 | -46% | 1 | 1 | 0% | 666 | 2,248 | +238% | 0 | 0 | — |
case-19 | pass→pass | 3,716 | 2,027 | -45% | 1 | 1 | 0% | 607 | 2,119 | +249% | 0 | 0 | — |
case-20 | pass→pass | 5,046 | 3,553 | -30% | 1 | 1 | 0% | 942 | 2,462 | +161% | 0 | 0 | — |
case-21 | pass→pass | 14,925 | 4,157 | -72% | 1 | 1 | 0% | 2,731 | 2,608 | -5% | 0 | 0 | — |
case-22 | pass→pass | 7,473 | 2,377 | -68% | 1 | 1 | 0% | 1,081 | 2,106 | +95% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +9 percentage points is the difference between those two pass rates over the 20 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.