| name | discord-channel-memory |
| description | Automatically reads your Discord channels every 6 hours and builds a rolling memory digest. Solves the problem of losing context when work happens across multiple channels — your agent will always know what's going on everywhere, without wasting tokens loading everything at startup. |
| tags | ["memory","discord","context","productivity"] |
Discord Channel Memory
What This Does
If you run OpenClaw across multiple Discord channels, you've hit this problem: work happens in one channel, you ask about it in another, and your agent has no idea what you're talking about.
This skill fixes that. Every 6 hours, your agent reads your channels, extracts what happened, and saves a rolling memory digest. When you reference something from another channel, your agent checks the digest instead of saying "I don't know."
Two files are written:
memory/channels/digest.md — rolling 7-day window. Always fresh, never bloated. Automatically trims anything older than a week.
memory/channels/digest-archive.md — permanent archive. Every run appended, never deleted. There if you ever need to look back further.
After each run, your agent posts one message to your announcements channel confirming the digest ran.
Quick Start
Step 1 — Configure your channels
Edit the channel list in the cron payload below. Add your Discord channel IDs and how many messages to read from each:
# High-traffic channels (read more)
YOUR_GENERAL_CHANNEL_ID → 50 messages
YOUR_MAIN_PROJECT_CHANNEL_ID → 50 messages
# Medium-traffic channels
YOUR_OTHER_CHANNEL_ID → 30 messages
# Low-traffic channels
YOUR_ARCHIVE_CHANNEL_ID → 20 messages
To find a channel ID in Discord: right-click the channel → Copy Channel ID (developer mode must be on).
Step 2 — Set your workspace path
Replace YOUR_WORKSPACE_PATH with your OpenClaw workspace directory. Default is usually:
- Mac:
/Users/yourname/.openclaw/workspace
- Linux:
/home/yourname/.openclaw/workspace
Step 3 — Add to HEARTBEAT.md
Add this line to your HEARTBEAT.md so your agent knows to check the digest:
## Cross-Channel Context
- If asked about something from another channel, read `memory/channels/digest.md` before saying you don't know
- Read on-demand only — do NOT load at session start
Step 4 — Create the cron
Run this command (replace the placeholders):
openclaw cron add \
--name "discord-channel-memory" \
--cron "0 8,14,20,2 * * *" \
--tz "America/Chicago" \
--session isolated \
--model anthropic/claude-haiku-3-5 \
--timeout-seconds 300 \
--announce \
--channel discord \
--to "channel:YOUR_ANNOUNCEMENTS_CHANNEL_ID" \
--best-effort-deliver \
--message "$(cat <<'MSG'
You are a memory consolidation agent. Read each Discord channel below and write a rolling digest to disk.
CHANNELS TO READ (replace with your actual channel IDs and limits):
- CHANNEL_ID_1 (#general) — read 50 messages
- CHANNEL_ID_2 (#project-alpha) — read 30 messages
- CHANNEL_ID_3 (#ideas) — read 20 messages
WORKSPACE_PATH: YOUR_WORKSPACE_PATH
For each channel:
1. Read messages: message tool (action=read, channel=discord, target=<channel_id>, limit=<N>)
2. Skip if no messages in last 12 hours
3. Extract 3-5 bullets: what was built/decided/in-progress, open questions. No small talk.
FILE MANAGEMENT:
- ROLLING FILE: YOUR_WORKSPACE_PATH/memory/channels/digest.md
- Prepend new entry at TOP
- Trim entries older than 7 days from bottom
- ARCHIVE FILE: YOUR_WORKSPACE_PATH/memory/channels/digest-archive.md
- Append every entry — NEVER delete from this file
ENTRY FORMAT:
## Digest — <YYYY-MM-DD HH:MM>
### #channel-name
- bullet
---
After writing files, post ONE message to Discord channel YOUR_ANNOUNCEMENTS_CHANNEL_ID:
🧠 Memory digest — read [total] messages across [X] active channels. Snapshot saved.
Silent execution. Files + one Discord message only.
MSG
)"
Schedule
Runs at 8 AM, 2 PM, 8 PM, and 2 AM in your timezone. Adjust with --tz "Your/Timezone" and --cron if you want different times.
Cost
Runs on claude-haiku-3-5 — roughly $0.01–0.02 per run, or ~$0.05/day. Negligible.
How Your Agent Uses This
The digest is read on-demand, not at startup. Add the HEARTBEAT.md rule above and your agent will check it whenever context from another channel is needed. This keeps token usage minimal — you're not loading a massive memory file every session, just pulling it when relevant.
Customization
| What | How |
|---|
| Add a channel | Add a new line to the channel list in the cron message |
| Remove a channel | Delete the line |
| Change message count | Edit the number at the end of each channel line |
| Change schedule | Edit --cron expression |
| Change timezone | Edit --tz |
| Keep longer history | Change "7 days" to "14 days" or "30 days" in the trim logic |