dream — Claude Code skill: memory review and setup
dream reviews an agent’s memory files, merges useful notes, and refreshes their index. Run it periodically to keep stored context organized.
npx skills add sneg55/agent-starter --skill dream -a claude-codeWhat dream does
dream checks the memory directory, reads MEMORY.md, and reviews topic files before adding information. It can also consult logs and search transcripts with grep when a specific detail needs context.
The skill sorts notes into user, feedback, project, and reference categories. It removes outdated or disproved facts, then updates MEMORY.md as an index with a limit of 200 lines and about 25 KB. Code patterns, Git history, and temporary task details are excluded from what it recommends saving.
The agent returns a brief change summary at the end. Transcript searches rely on files in .claude/transcripts/, so that source is usable only when those files are available.
What it helps with
- merge new details into existing memory files
- remove outdated or contradicted notes
- refresh the
MEMORY.mdindex and drop stale pointers - retain useful user feedback and project context
Example prompts for the agent
- Review the memory files and update
MEMORY.md. - Compare recent logs with existing notes, merge duplicates, and remove disproved facts.
- Search the transcripts for context on this topic and keep only details that could help in later sessions.
How to install dream
1Skills CLI (Vercel)
npx skills add sneg55/agent-starter --skill dream -a claude-code2Manually: put the files in place
~/.claude/skills/dream/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/dream/
1Skills CLI (Vercel)
npx skills add sneg55/agent-starter --skill dream -a codex2Manually: put the files in place
.agents/skills/dream/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add sneg55/agent-starter --skill dream -a cursor2Manually: put the files in place
.cursor/skills/dream/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install sneg55/agent-starter dream2Manually: put the files in place
.github/skills/dream/SKILL.md1Skills CLI (Vercel)
npx skills add sneg55/agent-starter --skill dream -a gemini-cli2Platform CLI
gemini skills install https://github.com/sneg55/agent-starter --path skills/dreamManually: put the files in place
.devin/skills/dream/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add sneg55/agent-starter --skill dream -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about dream
How do I install dream in Claude Code?
Run npx skills add sneg55/agent-starter --skill dream -a claude-code. The skill file is at ~/.claude/skills/dream/SKILL.md.
What does the dream skill do?
It reviews memory files, combines useful information, removes stale entries, and keeps MEMORY.md as a concise index.
What kinds of information does dream keep?
It groups notes into user details, feedback, project context, and reference links. It advises leaving out code patterns, Git history, and temporary task details.
Source text
SKILL.md · MIT
---
name: dream
description: Memory consolidation - review, merge, prune, and index memory files. Run periodically to keep memories organized and up-to-date.
user_invocable: true
allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
---
# Dream: Memory Consolidation
You are performing a dream - a reflective pass over your memory files. Synthesize what you've learned recently into durable, well-organized memories so that future sessions can orient quickly.
## Phase 1 - Orient
- `ls` the memory directory to see what already exists
- Read `MEMORY.md` to understand the current index
- Skim existing topic files so you improve them rather than creating duplicates
- If `logs/` or `sessions/` subdirectories exist, review recent entries there
## Phase 2 - Gather recent signal
Look for new information worth persisting. Sources in rough priority order:
1. **Daily logs** (`logs/YYYY/MM/YYYY-MM-DD.md`) if present - these are the append-only stream
2. **Existing memories that drifted** - facts that contradict something you see in the codebase now
3. **Transcript search** - if you need specific context, grep transcripts for narrow terms:
`grep -rn "<narrow term>" .claude/transcripts/ --include="*.jsonl" | tail -50`
Don't exhaustively read transcripts. Look only for things you already suspect matter.
## Phase 3 - Consolidate
For each thing worth remembering, write or update a memory file. Use these type conventions:
| Type | What belongs | Examples |
|------|-------------|----------|
| **user** | User's role, goals, preferences, knowledge | "senior Go dev, new to React" |
| **feedback** | Corrections AND confirmations from user | "don't mock DB in tests", "bundled PR was right call" |
| **project** | Ongoing work context, deadlines, initiatives | "merge freeze 2026-03-05 for mobile release" |
| **reference** | Pointers to external systems | "pipeline bugs in Linear project INGEST" |
Each memory file uses this format:
```markdown
---
name: {{name}}
description: {{one-line description}}
type: {{user, feedback, project, reference}}
---
{{content - for feedback/project: rule, then **Why:** and **How to apply:**}}
```
Focus on:
- Merging new signal into existing topic files rather than creating near-duplicates
- Converting relative dates ("yesterday", "last week") to absolute dates
- Deleting contradicted facts - if today's investigation disproves an old memory, fix it at the source
## Phase 4 - Prune and index
Update `MEMORY.md` so it stays under 200 lines AND under ~25KB. It's an **index**, not a dump:
- Each entry: one line under ~150 chars: `- [Title](file.md) - one-line hook`
- Never write memory content directly into MEMORY.md
- Remove pointers to stale, wrong, or superseded memories
- Shorten verbose entries - move detail to the topic file
- Add pointers to newly important memories
- Resolve contradictions - if two files disagree, fix the wrong one
## What NOT to save
- Code patterns, architecture, file paths - derivable from the project
- Git history - `git log` / `git blame` are authoritative
- Debugging solutions - the fix is in the code
- Anything already in CLAUDE.md
- Ephemeral task details or conversation context
---
Return a brief summary of what you consolidated, updated, or pruned. If nothing changed, say so.
© sneg55 · MIT · sneg55/agent-starter