
Dream Memory
- 61 installs
- 231 repo stars
- Updated July 10, 2026
- learnprompt/cc-harness-skills
Helps with ai & agent building tasks.
About
dream-memory is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- dream-memory
- AI & Agent Building
- AI-coding skill
Dream Memory by the numbers
- 61 all-time installs (skills.sh)
- +2 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #6,375 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/learnprompt/cc-harness-skills --skill dream-memoryAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 61 |
|---|---|
| repo stars | ★ 231 |
| Last updated | July 10, 2026 |
| Repository | learnprompt/cc-harness-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
Dream Memory
Use this skill when you want a deliberate memory-consolidation pass instead of storing more raw notes.
This bundle is intentionally portable. It borrows the workflow shape from Claude Code's dream system, but it does not depend on Claude Code internals.
Use It For
- nightly or manual memory cleanup
- merging overlapping memory notes
- normalizing relative dates into absolute dates
- pruning stale or contradicted memories
- keeping
MEMORY.mdsmall and index-like
Avoid It For
- saving a single new memory from the current turn
- persisting code facts that should be re-read from source
- replacing plans, task boards, or issue trackers
Quick Start
Inspect a memory directory before running the consolidation prompt:
python3 {baseDir}/scripts/dream_memory.py --memory-root /path/to/memory --transcripts-dir /path/to/transcriptsThen use the portable prompt in references/prompt-template.md.
Workflow
1. Inspect MEMORY.md, topic files, and recent logs or transcripts. 2. Identify durable facts worth keeping. 3. Merge into topic files instead of creating near-duplicates. 4. Remove stale or contradicted memory. 5. Rewrite MEMORY.md as a concise index.
Rules
MEMORY.mdis an index, not a content dump.- Prefer topic merges over new file creation.
- Convert relative dates to absolute dates.
- Do not store code-state facts that can drift.
Supporting Files
- Prompt template: references/prompt-template.md
- Source notes: references/source-notes.md
- Helper script:
python3 {baseDir}/scripts/dream_memory.py ...
CC Dream Memory
dream-memory is a portable memory-consolidation skill for coding agents.
It turns recent logs, session transcripts, and existing memory files into a shorter, more stable long-term memory set. The workflow is inspired by the public CC dream-style memory pass, but rewritten to avoid private runtime dependencies.
Best For
- nightly memory cleanup
- merging duplicate memory notes
- converting relative dates to absolute dates
- keeping
MEMORY.mdshort and prompt-friendly
Included Files
SKILL.mdreferences/prompt-template.mdreferences/source-notes.mdscripts/dream_memory.py
Quick Start
python3 ./scripts/dream_memory.py \
--memory-root /path/to/memory \
--transcripts-dir /path/to/transcriptsThen apply the workflow in SKILL.md with the prompt template in references/prompt-template.md.
Host Fit
- Claude Code: strong fit
- Codex: strong fit
- OpenClaw: strong fit
Portable Prompt Template
Use this prompt as a host-agnostic dream pass.
You are running a reflective memory-consolidation pass.
Goal:
- turn recent logs, session notes, and existing memory files into durable topic memories
- merge duplicates
- prune stale or contradicted memory
- keep MEMORY.md short, index-like, and easy to load into future prompts
Inputs:
- memory root: <memory_root>
- transcript or log root: <transcript_root>
- current memory report: <memory_report>
Rules:
- inspect MEMORY.md first
- update existing topic files before creating new ones
- convert relative dates to absolute dates
- never store code-state facts that should be re-read from source
- keep MEMORY.md as one-line pointers, not content
Phases:
1. Orient: inspect index and existing topic files
2. Gather: review only the recent logs or targeted transcript matches
3. Consolidate: update topic files with durable facts
4. Prune and index: shorten hooks, remove stale pointers, and keep the index small
Return:
1. memories updated
2. memories pruned
3. index changes
4. anything intentionally left unchangedSource Notes
This skill was derived from these Claude Code areas:
src/services/autoDream/autoDream.tssrc/services/autoDream/consolidationPrompt.tssrc/memdir/memdir.ts
Portable extraction decisions:
- keep the workflow and gating ideas
- drop Anthropic-specific feature flags and analytics
- replace host-specific task wiring with a plain helper script plus a portable prompt
#!/usr/bin/env python3
"""Inspect a memory directory before or after a dream-style consolidation pass."""
from __future__ import annotations
import argparse
import json
from pathlib import Path
from typing import Any
def build_report(memory_root: Path, transcripts_dir: Path | None, recent: int) -> dict[str, Any]:
index_path = memory_root / "MEMORY.md"
index_text = index_path.read_text(encoding="utf-8") if index_path.exists() else ""
index_lines = index_text.splitlines()
topic_files = sorted(
[p for p in memory_root.glob("*.md") if p.name != "MEMORY.md"],
key=lambda p: p.stat().st_mtime,
reverse=True,
)
recent_sources: list[str] = []
for pattern in ("logs/**/*.md", "sessions/**/*.md"):
recent_sources.extend(
str(p.relative_to(memory_root))
for p in sorted(memory_root.glob(pattern), key=lambda p: p.stat().st_mtime, reverse=True)[:recent]
)
if transcripts_dir and transcripts_dir.exists():
recent_sources.extend(
str(p)
for p in sorted(transcripts_dir.glob("**/*.jsonl"), key=lambda p: p.stat().st_mtime, reverse=True)[:recent]
)
return {
"memory_root": str(memory_root),
"index": {
"path": str(index_path),
"exists": index_path.exists(),
"line_count": len(index_lines),
"byte_count": len(index_text.encode("utf-8")),
"over_line_cap": len(index_lines) > 200,
"over_byte_cap": len(index_text.encode("utf-8")) > 25_000,
},
"topic_files": [
{
"name": p.name,
"path": str(p),
"size_bytes": p.stat().st_size,
}
for p in topic_files[:recent]
],
"recent_sources": recent_sources[:recent],
}
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--memory-root", required=True)
parser.add_argument("--transcripts-dir")
parser.add_argument("--recent", type=int, default=10)
parser.add_argument("--json", action="store_true")
args = parser.parse_args()
report = build_report(
Path(args.memory_root).expanduser(),
Path(args.transcripts_dir).expanduser() if args.transcripts_dir else None,
args.recent,
)
if args.json:
print(json.dumps(report, indent=2, ensure_ascii=False))
return 0
print(f"memory_root: {report['memory_root']}")
print("index:")
for key, value in report["index"].items():
print(f" {key}: {value}")
print("topic_files:")
for item in report["topic_files"]:
print(f" - {item['name']} ({item['size_bytes']} bytes)")
print("recent_sources:")
for item in report["recent_sources"]:
print(f" - {item}")
return 0
if __name__ == "__main__":
raise SystemExit(main())