← Back to Skills Marketplace
demitrim

Discord Context

by demitrim · GitHub ↗ · v0.1.1
cross-platform ✓ Security Clean
961
Downloads
0
Stars
1
Active Installs
4
Versions
Install in OpenClaw
/install discord-context
Description
Sync and cache per-thread context for Discord Forum channels. Use when handling /discord-context commands to poll active threads, list cached context, inspec...
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install discord-context
  3. After installation, invoke the skill by name or use /discord-context
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Slug discord-context
Version 0.1.1
License
All-time Installs 1
Active Installs 1
Total Versions 4
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 961 downloads so far.

How do I install Discord Context?

Run "/install discord-context" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Discord Context free?

Yes, Discord Context is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Discord Context support?

Discord Context is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Discord Context?

It is built and maintained by demitrim (@demitrim); the current version is v0.1.1.

💬 Comments