← 返回 Skills 市场
demitrim

Discord Context

作者 demitrim · GitHub ↗ · v0.1.1
cross-platform ✓ 安全检测通过
961
总下载
0
收藏
1
当前安装
4
版本数
在 OpenClaw 中安装
/install discord-context
功能描述
Sync and cache per-thread context for Discord Forum channels. Use when handling /discord-context commands to poll active threads, list cached context, inspec...
使用说明 (SKILL.md)

discord-context

Run node {baseDir}/scripts/discord-context-cli.js \x3Ccommand> ....

Commands

  • poll [--guild \x3Cid>] [--forum \x3Cid>] [--workspace \x3Cpath>]

    • Pull active threads from Discord and refresh cache for new/updated threads.
    • Requires DISCORD_TOKEN plus guild/forum IDs (flags or env vars).
  • context [threadId] [--workspace \x3Cpath>] [--json]

    • Without threadId: list cached threads.
    • With threadId: print cached context and metadata for one thread.
  • link \x3CthreadId> \x3CqmdName> [--workspace \x3Cpath>]

    • Link a thread to memory/\x3CqmdName>.md and refresh cached context text.

Environment

  • DISCORD_TOKEN (required for poll)
  • DISCORD_GUILD_ID (default guild id for poll)
  • DISCORD_FORUM_CHANNEL_ID (default forum id for poll)
  • OPENCLAW_WORKSPACE (defaults to ~/.openclaw/workspace)

Security Rules

  • Never hardcode Discord tokens.
  • Accept only numeric thread/guild/forum IDs.
  • Accept only [a-zA-Z0-9_-]+ for qmdName.
  • Keep all reads/writes inside the workspace memory/ tree.

Paths

  • Cache metadata: memory/discord-cache/thread-\x3Cid>.json
  • Cache text: memory/discord-cache/thread-\x3Cid>-context.txt
  • Source context files: memory/*.md
安全使用建议
This skill appears to do what it says, but review and follow these precautions before installing: 1) Run the skill with a bot token that has minimal permissions (limit to the forum channel and read access). 2) Store DISCORD_TOKEN in a secrets store or environment variable — never commit it. 3) The CLI will read any .md files under the configured workspace/memory directory to match thread names, so ensure you don't keep sensitive secrets there. 4) Confirm your Node runtime supports global fetch (Node 18+) or run with an appropriate Node version. 5) Audit workspace files and the cache directory periodically and rotate tokens if you stop using the skill.
功能分析
Type: OpenClaw Skill Name: discord-context Version: 0.1.1 The OpenClaw AgentSkills skill bundle 'discord-context' is classified as benign. The code (scripts/discord-context-cli.js) demonstrates robust input validation for IDs and filenames, using strict regex patterns (e.g., `isValidId`, `qmdName` regex) to prevent path traversal and injection attacks. File operations are consistently confined to the designated workspace `memory/` directory using `path.join`, adhering to the security rules outlined in SKILL.md. Network communication is limited to the legitimate Discord API, and the `DISCORD_TOKEN` is correctly sourced from environment variables. There is no evidence of prompt injection attempts in SKILL.md, obfuscation, unauthorized data exfiltration, or persistence mechanisms.
能力评估
Purpose & Capability
Name/description ask for syncing Discord forum threads; the package requires node and a DISCORD_TOKEN and includes a CLI that calls Discord's API and writes cache files under an explicit workspace memory directory — these requirements match the stated purpose.
Instruction Scope
SKILL.md instructs running the included CLI and documents required env vars; the CLI only reads/writes files under the workspace 'memory/' tree, enumerates .md files there to match thread names, and calls only Discord API endpoints. There are no instructions to read unrelated system files or to send data to third-party endpoints beyond discord.com.
Install Mechanism
There is no install script or external download; the skill is instruction-only with bundled scripts. It relies on a local node binary, which is reasonable for a Node-based CLI.
Credentials
Only DISCORD_TOKEN is required for polling (plus optional DISCORD_GUILD_ID, DISCORD_FORUM_CHANNEL_ID, and OPENCLAW_WORKSPACE). These env vars are appropriate for a Discord integration and are limited in scope.
Persistence & Privilege
The skill does not request 'always' presence, does not modify other skills or global agent settings, and stores data under its own workspace memory path. It does not request elevated platform privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install discord-context
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /discord-context 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
- No file changes detected; this is a metadata-only version update. - No new features or bug fixes included in this release.
v0.3.0
Security hardening + parser fixes: removed hardcoded paths, strict input validation, robust Discord JSON parsing, portable workspace/env config, fixed CLI runtime bugs
v0.2.0
Fixed: shell injection, requires DISCORD_TOKEN env var, added SECURITY.md
v0.1.0
Initial release with poll, context, and link commands
元数据
Slug discord-context
版本 0.1.1
许可证
累计安装 1
当前安装数 1
历史版本数 4
常见问题

Discord Context 是什么?

Sync and cache per-thread context for Discord Forum channels. Use when handling /discord-context commands to poll active threads, list cached context, inspec... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 961 次。

如何安装 Discord Context?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install discord-context」即可一键安装,无需额外配置。

Discord Context 是免费的吗?

是的,Discord Context 完全免费(开源免费),可自由下载、安装和使用。

Discord Context 支持哪些平台?

Discord Context 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Discord Context?

由 demitrim(@demitrim)开发并维护,当前版本 v0.1.1。

💬 留言讨论