Your AI agent dreams like you do. Consolidates memory while you sleep. Anthropic is building an auto-dream feature into Claude Code (currently unreleased).
$ npx -y skills add grandamenium/dream-skill --agent claude-code
Your AI agent dreams like you do. Consolidates memory while you sleep.
Anthropic is building an auto-dream feature into Claude Code (currently unreleased). This skill replicates that functionality today - no feature flags, no waiting for rollout. Drop it in and your agent's memory stays clean, current, and contradiction-free.
When you use Claude Code across many sessions, auto-memory accumulates noise: stale facts, contradictions, relative dates that lose meaning. Dream fixes this by running a 4-phase consolidation pass over your memory files - the same way your brain consolidates memories during sleep.
Phase 1 - Orient: Reads your current memory directory to understand what exists.
Phase 2 - Gather Signal: Scans recent session transcripts (JSONL files) for user corrections, preference changes, important decisions, and recurring patterns. Uses targeted grep, not full reads.
Phase 3 - Consolidate: Merges new findings into existing memory. Converts relative dates to absolute. Resolves contradictions. Removes references to nonexistent files. No duplicates.
Phase 4 - Prune & Index: Rebuilds MEMORY.md as a lean index under 200 lines. Removes stale pointers. Demotes verbose entries to topic files.
Includes a native Claude Code Stop hook that checks every time you exit a session:
/dream automatically.Zero overhead when conditions aren't met (~10ms check on exit).
On first install, the skill detects which memory system you're using:
~/.claude/projects/*/memory/) - default./memory/ with daily logs)./MEMORY.md in project root)If nothing is detected, defaults to native Claude Code memory.
git clone https://github.com/grandamenium/dream-skill.git ~/.claude/skills/dream
git clone https://github.com/grandamenium/dream-skill.git /tmp/dream-skill
bash /tmp/dream-skill/install.sh --auto
SKILL.md and should-dream.sh to ~/.claude/skills/dream/chmod +x ~/.claude/skills/dream/should-dream.sh/dream to run it| File | Purpose |
|---|---|
SKILL.md | The skill prompt - 4-phase consolidation instructions with onboarding |
should-dream.sh | Condition checker (24hr timer) |
dream-hook.sh | Stop hook that flags next session for dreaming |
install.sh | One-command installer with --auto flag for hook setup |
test-dream.sh | Creates test fixtures and verifies consolidation results |
/dream
Just use Claude Code normally. The Stop hook checks on every session exit. When 24 hours have passed, your next session automatically runs a dream consolidation in the background.
| Feature | Anthropic (unreleased) | This Skill |
|---|---|---|
| 4-phase consolidation | Yes | Yes |
| Session transcript scanning | Yes | Yes |
| Contradiction resolution | Yes | Yes |
| Date normalization | Yes | Yes |
| Auto-trigger | Built into binary | Stop hook + flag file |
| Memory system detection | Native only | Native + OpenClaw + custom |
| Available now | Behind feature flag | Yes |
MIT
dream-skill is a Claude Code plugin with 1 hand-picked skill, indexed on Flowy in the Agent Memory category. Install it with the command on its page. It includes dream-skill. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it