discord-context
v0.1.1Sync and cache per-thread context for Discord Forum channels. Use when handling /discord-context commands to poll active threads, list cached context, inspect a thread cache, or link a thread to a memory QMD file.
Installation
Please help me install the skill `discord-context` from SkillHub official store.
npx skills add demitrim/discord-context
discord-context
Run node {baseDir}/scripts/discord-context-cli.js <command> ....
Commands
poll [--guild <id>] [--forum <id>] [--workspace <path>]- Pull active threads from Discord and refresh cache for new/updated threads.
-
Requires
DISCORD_TOKENplus guild/forum IDs (flags or env vars). -
context [threadId] [--workspace <path>] [--json] - Without
threadId: list cached threads. -
With
threadId: print cached context and metadata for one thread. -
link <threadId> <qmdName> [--workspace <path>] - Link a thread to
memory/<qmdName>.mdand refresh cached context text.
Environment
DISCORD_TOKEN(required forpoll)DISCORD_GUILD_ID(default guild id forpoll)DISCORD_FORUM_CHANNEL_ID(default forum id forpoll)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_-]+forqmdName. - Keep all reads/writes inside the workspace
memory/tree.
Paths
- Cache metadata:
memory/discord-cache/thread-<id>.json - Cache text:
memory/discord-cache/thread-<id>-context.txt - Source context files:
memory/*.md