A Claude Code skill that mines your own conversation history to find mistakes, corrections, and stated preferences — then automatically writes memory rules to fix them.
Inspired by Anthropic's unreleased auto-dream feature. Extended with a friction mining phase that turns your past frustrations into structured, persistent feedback.
Claude Code stores every conversation as a .jsonl file in ~/.claude/projects/. This skill scans those logs for signals that a human would normally just forget:
- Direct corrections ("no, actually…", "wrong", "that's not what I wanted")
- Explicit rule declarations ("from now on always…", "never do X again")
- Repeated frustrations across sessions (same mistake, different day)
- Moments where you re-explained something you'd already said
It cross-references those signals against your existing memory files, discards noise, and writes new feedback_*.md rules — or reinforces existing rules that are still being violated.
- 676 conversations scanned
- 145 friction signals identified
- 90 praise signals captured (to protect what's working)
- 4 new feedback rules written automatically
- 2 existing rules reinforced (still being violated)
The strongest pattern found: Claude kept ignoring its own skills toolkit. Real quotes surfaced from past sessions:
"This has been happening over and over again."
"It took us so many steps — I thought we'd invested in making a skill, but you obviously never used it."
"NO WRONG, use the skill for bootstrapping."
Then it wrote a new memory rule reinforcing that behavior — which loads in every future session.
1. Claude makes a mistake
2. You correct it ("no," "wrong," "from now on...")
3. /dream scans those logs and finds the pattern
4. A new feedback_*.md rule is written
5. Future sessions load that rule — mistake doesn't recur
Not AGI. Log parsing + structured memory writing. But the practical effect is an AI that improves from your actual usage history, not just training data.
curl -fsSL https://raw.githubusercontent.com/richardbowman/claude-code-dream/main/install.sh | bashThat's it. The installer:
- Copies
SKILL.mdto~/.claude/skills/dream/ - Adds the trigger line to your
~/.claude/CLAUDE.mdskills table (if you have one)
Then start a new Claude Code session and run:
/dream
If you prefer not to pipe to bash:
git clone https://github.com/richardbowman/claude-code-dream
cd claude-code-dream
bash install.shOr fully manual — copy SKILL.md to ~/.claude/skills/dream/SKILL.md and add this line to your skills table in ~/.claude/CLAUDE.md:
| Consolidate memory, mine conversation logs for friction/feedback, run /dream | `dream` |
The skill runs 6 phases:
- ORIENT — reads
~/.claude/dream-last-runand all existing memory files - FRICTION SCAN — Python script extracts user messages matching ~25 friction patterns across all
.jsonllogs since the last run; also captures prior assistant context so Claude understands what triggered each correction - PATTERN ANALYSIS — Claude reasons through the signals: cross-references against existing rules, discards noise, clusters new patterns
- MEMORY UPDATE — writes new
feedback_*.mdfiles, reinforces violated rules, updatesMEMORY.mdindex - SESSION REPORT — saves a dated session report to your Obsidian vault (
~/.claude/dream-obsidian-vault), a custom directory (~/.claude/dream-report-dir), or~/.claude/dream-reports/as a fallback - STAMP — writes completion timestamp to
~/.claude/dream-last-run
New rules are written in this format, matching the standard Claude Code memory convention:
---
name: Run commands autonomously
description: User wants Claude to run shell commands directly rather than suggesting they run them
type: feedback
---
Just run commands — don't suggest the user run them in their terminal.
**Why:** User explicitly asked to stop being prompted to run commands Claude can execute itself.
**How to apply:** Whenever a shell command is needed, run it with the Bash tool directly.- Claude Code v2.1.59+
- Python 3 (stdlib only, no extra packages)
- No other dependencies
Friction mining phase by @richardbowman.
Memory consolidation approach inspired by grandamenium/dream-skill.