Claude Dream banner
mengazaa mengazaa

Claude Dream

AI community

Description

Memory consolidation skill for Claude Code — like REM sleep for your AI memory

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

/dream — Memory Consolidation for Claude Code

A Claude Code skill that consolidates your project memory files — like how your brain consolidates memories during REM sleep.

Inspired by Anthropic's unreleased [Auto-dream feature](https://github.com/Piebald-AI/claude-code-system-prompts/blob/main/system-prompts/agent-prompt-dream-memory-consolidation.md), adapted for any Claude Code project.

What it does

Claude Code remembers things about your project in `MEMORY.md` and memory topic files. Over time, these accumulate duplicates, stale entries, and messy metadata. `/dream` cleans it all up in 4 phases:

  1. Orient — Scan existing memory files, understand current state
  2. Gather Signal — Find duplicates, stale entries, missing metadata
  3. Consolidate — Merge duplicates, fix metadata, resolve contradictions
  4. Prune & Index — Keep MEMORY.md under 200 lines, organized by topic

Install

Option 1: Copy files manually

# Create skill directory
mkdir -p ~/.claude/skills/dream

# Copy the skill file
cp SKILL.md ~/.claude/skills/dream/SKILL.md

# Copy the slash command
cp dream.md ~/.claude/commands/dream.md

Option 2: One-liner

mkdir -p ~/.claude/skills/dream ~/.claude/commands && curl -sL https://raw.githubusercontent.com/mengazaa/claude-dream/main/SKILL.md -o ~/.claude/skills/dream/SKILL.md && curl -sL https://raw.githubusercontent.com/mengazaa/claude-dream/main/dream.md -o ~/.claude/commands/dream.md

Usage

In Claude Code, type:

/dream          # Full 4-phase consolidation
/dream --scan   # Read-only audit (see problems without fixing)
/dream --quick  # Light pass (just merge duplicates + update index)

Optional: Nightly Auto-Dream

Set up a cron job to run `/dream --quick` every night:

# Create the script
cat > ~/.claude/scripts/nightly-dream.sh << 'EOF'
#!/bin/bash
LOGDIR="/tmp/claude-dream"
mkdir -p "$LOGDIR"
LOGFILE="$LOGDIR/dream-$(date +%Y-%m-%d).log"

cd /path/to/your/project  # <--