Token导航 LogoToken导航

Agent Skill · 研究检索

agent-discord(Agent Discord 搜索)

用于处理 Discord 服务器、频道、消息、成员和机器人交互。它适合让 Agent 辅助查询社区对话、整理频道内容、发布通知或管理基础协作流程。使用时需要确认 bot 权限、频道可见范围和服务器规则;涉及删除消息、管理成员、批量通知或读取私密频道时,应先获得明确授权并控制操作范围。

agent-discord 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 38,680。

总安装 1,527周安装 63GitHub Stars 69下载 499核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agent-discord(Agent Discord 搜索)
来源仓库:https://github.com/devxoul/agent-messenger
仓库路径:skills/agent-discord
安装命令:
npx skills add https://github.com/devxoul/agent-messenger --skill agent-discord
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/devxoul/agent-messenger --skill agent-discord

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

agent-discord 用于与 Discord 服务器交互,支持消息发送、频道列表和成员查询。适合辅助社区对话管理、通知发布或协作流程自动化处理。凭据自动提取自桌面客户端,无需手动输入 token。操作前应确认 bot 权限范围和服务器规则,避免越权访问私密频道或删除消息。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/agent-discord

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/devxoul/agent-messenger --skill agent-discord;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

agent-discord 怎么安装?

在终端执行 npx skills add https://github.com/devxoul/agent-messenger --skill agent-discord。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

agent-discord 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

agent-discord 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

agent-discord 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

agent-discord 用的人多吗?

公开数据是累计安装 1,527 次,近一周安装 63 次,下载 499 次,GitHub 69 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

agent-discord 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
agent-discord

Agent Discord 搜索 · 本页

1,52769操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Agent Discord

A TypeScript CLI tool that enables AI agents and humans to interact with Discord servers through a simple command interface. Features seamless token extraction from the Discord desktop app (with browser fallback) and multi-server support.

Quick Start

# Get server snapshot (credentials are extracted automatically)
agent-discord snapshot

# Send a message
agent-discord message send <channel-id> "Hello from AI agent!"

# List channels
agent-discord channel list

Authentication

Credentials are extracted automatically from the Discord desktop app (or Chromium browser as fallback) on first use. No manual setup required — just run any command and authentication happens silently in the background.

On macOS, the system may prompt for your Keychain password the first time (required to decrypt Discord's stored token). This is a one-time prompt.

IMPORTANT: Always use agent-discord auth extract to obtain tokens. The CLI extracts from the desktop app first, falling back to Chromium browsers if the app isn't installed.

Multi-Server Support

# List all available servers
agent-discord server list

# Switch to a different server
agent-discord server switch <server-id>

# Show current server
agent-discord server current

# Check auth status
agent-discord auth status

Memory

The agent maintains a ~/.config/agent-messenger/MEMORY.md file as persistent memory across sessions. This is agent-managed — the CLI does not read or write this file. Use the Read and Write tools to manage your memory file.

Reading Memory

At the start of every task, read ~/.config/agent-messenger/MEMORY.md using the Read tool to load any previously discovered server IDs, channel IDs, user IDs, and preferences.

  • If the file doesn't exist yet, that's fine — proceed without it and create it when you first have useful information to store.
  • If the file can't be read (permissions, missing directory), proceed without memory — don't error out.

Writing Memory

After discovering useful information, update ~/.config/agent-messenger/MEMORY.md using the Write tool. Write triggers include:

  • After discovering server IDs and names (from server list, snapshot, etc.)
  • After discovering useful channel IDs and names (from channel list, snapshot, etc.)
  • After discovering user IDs and names (from user list, user me, etc.)
  • After the user gives you an alias or preference ("call this the dev server", "my main channel is X")
  • After discovering channel structure (categories, voice channels)

When writing, include the complete file content — the Write tool overwrites the entire file.

What to Store

  • Server IDs with names
  • Channel IDs with names and categories
  • User IDs with display names
  • User-given aliases ("dev server", "announcements channel")
  • Commonly used thread IDs
  • Any user preference expressed during interaction

What NOT to Store

Never store tokens, credentials, or any sensitive data. Never store full message content (just IDs and channel context). Never store file upload contents.

Handling Stale Data

If a memorized ID returns an error (channel not found, server not found), remove it from MEMORY.md. Don't blindly trust memorized data — verify when something seems off. Prefer re-listing over using a memorized ID that might be stale.

Format / Example

# Agent Messenger Memory

## Discord Servers

- `1234567890123456` — Acme Dev (default)
- `9876543210987654` — Open Source Community

## Channels (Acme Dev)

- `1111111111111111` — #general (General category)
- `2222222222222222` — #engineering (Engineering category)
- `3333333333333333` — #deploys (Engineering category)

## Users (Acme Dev)

- `4444444444444444` — Alice (server owner)
- `5555555555555555` — Bob

## Aliases

- "dev server" → `1234567890123456` (Acme Dev)
- "deploys" → `3333333333333333` (#deploys in Acme Dev)

## Notes

- User prefers --pretty output for snapshots
- Main server is "Acme Dev"
Memory lets you skip repeated channel list and server list calls. When you already know an ID from a previous session, use it directly.

Commands

Auth Commands

# Extract token from Discord desktop app or browser (usually automatic)
agent-discord auth extract
agent-discord auth extract --debug

# Check auth status
agent-discord auth status

# Logout from Discord
agent-discord auth logout

Whoami Command

# Show current authenticated user
agent-discord whoami
agent-discord whoami --pretty

Output includes the authenticated user's identity information.

Message Commands

# Send a message
agent-discord message send <channel-id> <content>
agent-discord message send 1234567890123456789 "Hello world"

# List messages
agent-discord message list <channel-id>
agent-discord message list 1234567890123456789 --limit 50

# Get a single message by ID
agent-discord message get <channel-id> <message-id>
agent-discord message get 1234567890123456789 9876543210987654321

# Delete a message
agent-discord message delete <channel-id> <message-id> --force

# Acknowledge/mark a message as read
agent-discord message ack <channel-id> <message-id>

# Search messages in current server
agent-discord message search <query>
agent-discord message search "project update" --limit 10
agent-discord message search "hello" --channel <channel-id> --author <user-id>

Channel Commands

# List channels in current server (text channels only)
agent-discord channel list

# Get channel info
agent-discord channel info <channel-id>
agent-discord channel info 1234567890123456789

# Get channel history (alias for message list)
agent-discord channel history <channel-id> --limit 100

Server Commands

# List all servers
agent-discord server list

# Get server info
agent-discord server info <server-id>

# Switch active server
agent-discord server switch <server-id>

# Show current server
agent-discord server current

User Commands

# List server members
agent-discord user list

# Get user info
agent-discord user info <user-id>

# Get current user
agent-discord user me

DM Commands

# List DM channels
agent-discord dm list

# Create a DM channel with a user
agent-discord dm create <user-id>

Mention Commands

# List recent mentions
agent-discord mention list
agent-discord mention list --limit 50
agent-discord mention list --guild <server-id>

Friend Commands

# List all relationships (friends, blocked, pending requests)
agent-discord friend list
agent-discord friend list --pretty

Note Commands

# Get note for a user
agent-discord note get <user-id>

# Set note for a user
agent-discord note set <user-id> "Note content"

Profile Commands

# Get detailed user profile
agent-discord profile get <user-id>

Member Commands

# Search guild members
agent-discord member search <guild-id> <query>
agent-discord member search 1234567890123456789 "john" --limit 20

Thread Commands

# Create a thread in a channel
agent-discord thread create <channel-id> <name>
agent-discord thread create 1234567890123456789 "Discussion" --auto-archive-duration 1440

# Archive a thread
agent-discord thread archive <thread-id>

Reaction Commands

# Add reaction (use emoji name without colons)
agent-discord reaction add <channel-id> <message-id> <emoji>
agent-discord reaction add 1234567890123456789 9876543210987654321 thumbsup

# Remove reaction
agent-discord reaction remove <channel-id> <message-id> <emoji>

# List reactions on a message
agent-discord reaction list <channel-id> <message-id>

File Commands

# Upload file
agent-discord file upload <channel-id> <path>
agent-discord file upload 1234567890123456789 ./report.pdf

# List files in channel
agent-discord file list <channel-id>

# Get file info
agent-discord file info <channel-id> <file-id>

Snapshot Command

Get server overview for AI agents (brief by default):

# Brief snapshot (default) — fast, minimal API calls
agent-discord snapshot

# Full snapshot — includes messages and members (slow, large output)
agent-discord snapshot --full

# Filtered full snapshots
agent-discord snapshot --full --channels-only
agent-discord snapshot --full --users-only

# Limit messages per channel (only with --full)
agent-discord snapshot --full --limit 10

Default returns brief JSON with:

  • Server metadata (id, name)
  • Channels (id, name) — text channels only
  • Hint for next commands

With --full, returns comprehensive JSON with:

  • Server metadata (id, name)
  • Channels (id, name, type, topic)
  • Recent messages (id, content, author, timestamp)
  • Members (id, username, global_name)

Output Format

JSON (Default)

All commands output JSON by default for AI consumption:

{
  "id": "1234567890123456789",
  "content": "Hello world",
  "author": "username",
  "timestamp": "2024-01-15T10:30:00.000Z"
}

Pretty (Human-Readable)

Use --pretty flag for formatted output:

agent-discord channel list --pretty

Key Differences from Slack

FeatureDiscordSlack
Server terminologyServerWorkspace
Channel identifiersSnowflake IDsChannel name or ID
Message identifiersSnowflake IDsTimestamps (ts)
ThreadsThread ID fieldThread timestamp
Mentions<@user_id><@USER_ID>

Important: Discord uses Snowflake IDs (large numbers like 1234567890123456789) for all identifiers. You cannot use channel names directly - use channel list to find IDs first.

Common Patterns

See references/common-patterns.md for typical AI agent workflows.

Templates

See templates/ directory for runnable examples:

  • post-message.sh - Send messages with error handling
  • monitor-channel.sh - Monitor channel for new messages
  • server-summary.sh - Generate server summary

Error Handling

All commands return consistent error format:

{
  "error": "Not authenticated. Run \"auth extract\" first."
}

Common errors:

  • Not authenticated: No valid token (auto-extraction failed — see Troubleshooting)
  • No current server set: Run server switch <id> first
  • Message not found: Invalid message ID
  • Unknown Channel: Invalid channel ID

Configuration

Credentials stored in ~/.config/agent-messenger/discord-credentials.json (0600 permissions). See references/authentication.md for format and security details.

SDK: Programmatic Usage

DiscordClient is available as a TypeScript SDK for building scripts and automations.

Setup

import { DiscordClient } from 'agent-messenger/discord'

const client = await new DiscordClient().login()

Or with manual credential management:

import { DiscordClient, DiscordCredentialManager } from 'agent-messenger/discord'

const manager = new DiscordCredentialManager()
const token = await manager.getToken()
if (!token) {
  throw new Error('Discord token not found. Run auth extract first.')
}
const client = await new DiscordClient().login({ token })

Example

// Send a message
const msg = await client.sendMessage(channelId, 'Hello from SDK!')

// React to it
await client.addReaction(channelId, msg.id, '👋')

// Search messages
const { results } = await client.searchMessages(serverId, 'deployment', {
  sortBy: 'timestamp',
  sortOrder: 'desc',
  limit: 5,
})

// Create a thread
const thread = await client.createThread(channelId, 'Discussion Topic')
await client.sendMessage(thread.id, 'First message in thread')

Real-Time Events (SDK)

DiscordListener connects to Discord's Gateway WebSocket for instant event streaming:

import { DiscordClient, DiscordListener, DiscordIntent } from 'agent-messenger/discord'

const client = await new DiscordClient().login()
const listener = new DiscordListener(client, {
  intents: DiscordIntent.Guilds | DiscordIntent.GuildMessages | DiscordIntent.MessageContent,
})

listener.on('message_create', (event) => {
  console.log(`${event.author.username}: ${event.content}`)
})

listener.on('error', (err) => console.error(err))

await listener.start()
// listener.stop()

Available events: message_create, message_update, message_delete, message_reaction_add, message_reaction_remove, guild_member_add, guild_member_remove, typing_start, presence_update, channel_create, channel_update, channel_delete, discord_event (catch-all), connected, disconnected, error.

Note: MessageContent, GuildMembers, and GuildPresences are privileged intents — pass them explicitly via options.intents.

Full API Reference

See the Discord SDK documentation for complete method signatures, types, schemas, and examples.

Limitations

  • No voice channel support
  • No server management (create/delete channels, roles)
  • No slash commands
  • No webhook support
  • Plain text messages only (no embeds in v1)
  • User tokens only (no bot tokens)

Troubleshooting

agent-discord: command not found

agent-discord is NOT the npm package name. The npm package is agent-messenger.

If the package is installed globally, use agent-discord directly:

agent-discord server list

If the package is NOT installed, use npx -y by default. Do NOT ask the user which package runner to use — just run it:

npx -y agent-messenger discord server list
bunx agent-messenger discord server list
pnpm dlx agent-messenger discord server list
If you already know the user's preferred package runner (e.g., bunx, pnpm dlx), use that instead.

NEVER run npx agent-discord, bunx agent-discord, or pnpm dlx agent-discord — it will fail or install a wrong package since agent-discord is not the npm package name.

For other troubleshooting (auth extraction, token issues, permissions), see references/authentication.md.

References

平台分布

Codex

33.83%
按下载量换算169

Claude

30.89%
按下载量换算154

Cursor

16.79%
按下载量换算84

Gemini CLI

10.07%
按下载量换算50

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills