dream
Skill0 starsChanged 2 months agoMITView on GitHub
Memory consolidation for Claude Code auto-memory (claude-mem). Merges duplicate memory files, resolves contradictions, converts relative dates to absolute, prunes stale entries, and shrinks MEMORY.md index under the 24.4KB load limit. Replicates Anthropic's Dream feature. Use when user says "/dream", "consolidate memory", "clean memory", "memory bloated", or when MEMORY.md is truncated / over the load limit.
40 other projects use a version of this.
Adopted by
Most recently taken up by
- srinator22/New-Projecttheir own version, first seen Nov 8, 2026
- Melvynx/ai-maxxing-skillstheir own version, first seen Nov 8, 2026
- fjwood69/moritheir own version, first seen Nov 8, 2026
- alexandrosandre/agentic-engineeringtheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- matteo-pacini/skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use ingest, resume and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JaimeGBASkillingest
Digest an external source (article, paper, transcript, URL, book chapter) and integrate its content into the knowledge base
Also in 4 projects that use this
genomewalkerSkillresume
Resume a thread by loading its ~800-token context capsule
Also in 3 projects that use this
MicrosoftSkillinit
Also in 4 projects that use this
Hugging FaceSkillsimplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
Also in 3 projects that use this
SentrySkilldeslop
Strip AI-generated noise from the diff before pushing — extra comments a human wouldn't write, defensive try/catch in trusted code paths, casts to any, inline imports in Python, and other style inconsistencies with the surrounding file. Use this immediately before commit so the diff stays clean.
Also in 3 projects that use this
AnthropicSkillstart
Set up your bio-research environment and explore available tools. Use when first getting oriented with the plugin, checking which literature, drug-discovery, or visualization MCP servers are connected, or surveying available analysis skills before starting a new project.
Also in 3 projects that use this
Other versions40 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 40
- Noizefield/audio-plugin-coder★ 334same name
- grandamenium/dream-skill★ 136same name
- sneg55/agent-starter★ 76same name
- oprogramadorreal/optimus-claude★ 75same name
- tranhieutt/software_development_department★ 71same name
- maxvaega/awesome-skills★ 40same name
- seldonframe/seldonframe★ 40same name
- hyperb1iss/hyperskills★ 36same name
- fjwood69/mori★ 32same name
- Melvynx/ai-maxxing-skills★ 32same name
30 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- agent-harness-constructionSkill
- claudex-loopSkill
- click-path-auditSkill
- context-budgetSkill
- councilSkill
- deploy-projectSkill
- loop-design-checkSkill
- rebootSkill
- regex-vs-llm-structured-textSkill
- rules-distillSkill
- scrapling-officialSkill
- session-auditSkill
- shinen-designSkill
- skillspectorSkill
- skill-stocktakeSkill
- token-budgetSkill
- vault-indexSkill
- vault-ingestSkill
- vault-lintSkill
- vault-querySkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 39 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Read $MEMDIR/MEMORY.md (the index)
- Very specific: line 47
Read the last ~5 session transcripts: ~/.claude/projects/<slug>/*.jsonl (newest by mtime)
- Distinctive: line 67
Fix: all relative dates → absolute (today = run date)
- Distinctive: line 76
Never: delete a topic file whose fact is still live just to save bytes — trim the index line instead.
“Common” is measured: kept by at least 6 in 10 of the 39 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dream — Memory consolidation
Replicate Anthropic's Dream feature. Consolidate the auto-memory so Claude gets smarter the longer it runs, not noisier.
Scope
DEFAULT → current project's memory dir
all → every project memory dir under ~/.claude/projects/*/memory/
<slug> → a specific project, e.g. /dream -Users-you-Code-myprojectMemory lives per-project (no user-global memory.md in this setup):
MEMDIR="$HOME/.claude/projects/<project-slug>/memory"Resolve current project slug from cwd: replace / with - in the absolute path
(e.g. /Users/you/Code/myproject → -Users-you-Code-myproject).
The hard constraint
MEMORY.md is loaded into context every session. The harness truncates it past a
~24.4KB byte limit (NOT a line count).
Truncation already observed: "MEMORY.md is 34.3KB (limit: 24.4KB) — only part of it was loaded."
Primary win = get MEMORY.md under 24KB by shortening over-long index lines and moving
detail into topic files. Each index entry: one line, under ~150 chars.
Procedure — 4 steps
1. Read existing memory
- Read
$MEMDIR/MEMORY.md(the index) - List
$MEMDIR/*.mdtopic files; read any whose index line is suspect (duplicate/stale/contradiction candidates) — don't blind-read all if the dir is huge
2. Ground-truth against recent sessions
- Read the last ~5 session transcripts:
~/.claude/projects/<slug>/*.jsonl(newest by mtime) - Skim for: facts that changed, decisions reversed, projects gone dormant, paths that moved
- Goal: does memory match what the user actually does now?
3. Identify issues (report before changing)
Classify every problem found:
| Type | Example | Action |
| Near-duplicate | two files same topic | merge into one, keep richest |
| Contradiction | "use X" vs "never X" | keep the newer (check transcript dates), delete old |
| Stale | project marked active but dormant 60d+ | prune or mark paused |
| Relative date | "by next Friday" | convert to absolute (e.g. 2026-06-26) |
| Wrong-bucket | code convention / path in memory | remove (derivable from repo) |
| Verbose index line | >150 chars in MEMORY.md | trim; push detail to topic file |
| Dead pointer | index points to missing file | fix or remove |
4. Consolidate
- Merge duplicate topic files; update/remove their index lines
- Resolve contradictions (newer wins; cite transcript evidence in the kept file)
- Fix all relative dates → absolute (today = run date)
- Prune stale/wrong-bucket files (delete file + index line)
- Trim MEMORY.md index: every line one-liner <150 chars, detail lives in topic
.md - Re-check byte size:
wc -c "$MEMDIR/MEMORY.md"must be < 24400 bytes. If still over, keep trimming the longest index lines.
Safety
- Self-edit prompt: editing files inside
.claude/triggers a settings-edit permission ask even on bypass — expected, allow it. - Never invent facts to "fill gaps" — consolidate only what exists.
- Never delete a topic file whose fact is still live just to save bytes — trim the index line instead.
- Show the issue list (step 3) to the user before destructive merges/prunes if running interactively. In autonomous/cron runs, proceed and report.
- Back up first:
cp -r "$MEMDIR" "$MEMDIR.bak-$(date +%Y%m%d-%H%M)"then prune the .bak after the user confirms.
Output (terse)
Dream — <project-slug>
MEMORY.md: 34.3KB → 22.1KB (under 24.4KB limit ✓)
- merged: N files
- contradictions resolved: N
- dates fixed: N
- pruned: N
- index lines trimmed: N
Backup: memory.bak-YYYYMMDD-HHMMFrequency
On-the-margin play — run when MEMORY.md nears the limit, or monthly. Optional cron:
0 9 1 * * cd <your-main-project> && claude --no-interactive "/dream"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

