session-dream
Skill182 starsChanged 8 months agoMITView on GitHub
End-of-session memory distillation — extracts key decisions, eliminated approaches, new discoveries, and current blockers from the current conversation and writes them to MEMORY.md topic files. Based on Claude Code's autoDream background consolidation service. Activate when the user says "dream", "/dream", "save session memories", "distill this session", "what should I remember from this session", or when a long productive session is ending and the user wants to preserve what was learned.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- q2wxec/claude-code-skillword for word, first seen Apr 15, 2026
Other versions1 project uses a version of this.
Word for word · 1
- q2wxec/claude-code-skill★ 16100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository37 other files it gives its agents.
- agent-memory-implementationSkill
- agent-tool-builderSkill
- analyzing-financial-statementsSkill
- business-adventures-analysis-brooksSkill
- clash-cultures-investment-speculation-bogleSkill
- common-sense-index-investing-bogleSkill
- compact-memory-implementationSkill
- contagious-viral-content-bergerSkill
- contract-drafting-and-review-guidance-china-lawSkill
- creating-superfans-hodakSkill
- customers-yachts-wall-street-schwedSkill
- essays-in-persuasion-keynesSkill
- analyzing-financial-reportsSkill
- folded-memory-implementationSkill
- harness-step1-create-agents-mdSkill
- harness-step2-fill-docsSkill
- harness-step3-session-managementSkill
- html-line-svgSkill
- intelligent-investor-grahamSkill
- investing-from-darwinSkill
- jab-jab-right-hook-vaynerchukSkill
- langchain-tool-builderSkill
- most-important-thing-in-investing-howard-marksSkill
- munger-mental-models-worldly-wisdomSkill
- outsiders-ceo-capital-allocation-thorndikeSkill
- perennial-seller-holidaySkill
- query-loop-implementationSkill
- seo-metadata-auditSkill
- show-your-work-kleonSkill
- skill-creatorSkill
- skill-to-workflowSkill
- steal-like-an-artist-kleonSkill
- stock-picking-by-common-stocks-uncommon-profitsSkill
- storybrand-messaging-frameworkSkill
- this-is-marketing-godinSkill
- tool-permission-systemSkill
- war-of-art-pressfieldSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
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
- Distinctive: line 25
Check what memory already exists:
- Very specific: line 26
Read MEMORY.md if it exists (or note that it doesn't)
- Distinctive: line 44
Test setup patterns discovered
- Distinctive: line 58
Check if an existing topic file covers this.
- Distinctive: line 59
If no existing file fits, create a new topic file.
- Very specific: line 87
Add pointers for new topic files: - Title — one-line hook
- Distinctive: line 88
Update pointers for modified files if the description changed
- Distinctive: line 89
Remove any pointers that now point to deleted/superseded content
- Distinctive: line 90
Keep MEMORY.md under 200 lines (lines beyond 200 get truncated)
- Distinctive: line 91
Keep each pointer line under 150 chars
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
session-dream
A manual trigger for the memory distillation that Claude Code's autoDream service does automatically in the background. Where autoDream fires after 5+ sessions and 24+ hours, this skill fires on demand — letting you capture a session's insights before they're lost in compaction.
How autoDream works (the source pattern)
From services/autoDream/consolidationPrompt.ts, the autoDream process has 4 phases:
- Orient — scan what memory already exists, avoid creating duplicates
- Gather signal — identify new information worth persisting (logs, session transcripts, drifted facts)
- Consolidate — write or update topic files, merge rather than duplicate, fix contradictions
- Prune and index — keep MEMORY.md under max lines, one pointer per file, remove stale entries
This skill follows the same 4-phase structure but applies it to the current conversation rather than historical transcripts.
Distillation Process
Phase 1 — Orient
Check what memory already exists:
- Read
MEMORY.mdif it exists (or note that it doesn't) - Scan memory topic files mentioned in the index
- Note which topics are already covered so new entries extend rather than duplicate
Phase 2 — Gather signal from this session
Review the current conversation and identify:
High-value (always distill):
- Architectural decisions with reasoning ("chose X over Y because Z")
- Approaches that failed and why ("tried A, hit wall B, abandoned — don't retry")
- Surprising discoveries about the codebase or APIs
- User preferences stated or demonstrated repeatedly
- Constraints or requirements that weren't in any file
- Corrections to prior assumptions
Medium-value (distill if not easily discoverable):
- Naming conventions used in this session
- Test setup patterns discovered
- Environment-specific quirks
- Current blockers and their root causes
Low-value / skip:
- What files were read
- What commands were run
- Implementation details visible in code
- Step-by-step narration of what was done
Phase 3 — Consolidate to memory files
For each high-value item:
- Check if an existing topic file covers this. If yes, update or append to it.
- If no existing file fits, create a new topic file.
Topic file format:
---
name: [descriptive topic name]
description: [one line — what query would cause this file to be loaded?]
type: feedback | project | user | reference
---
[For feedback/project type, lead with the rule or fact]
**Why:** [the reason this matters — context that makes the rule sensible]
**How to apply:** [when/where this kicks in]Key types:
feedback: User preferences, corrections, confirmed approaches — things that shape HOW to workproject: Facts about the current project — decisions, constraints, current stateuser: Information about the user's background, expertise, goalsreference: Pointers to external resources, tools, docs
Convert relative dates to absolute dates: "yesterday" → "2026-04-15", "last week" → "2026-04-07".
Phase 4 — Prune and index
Update MEMORY.md:
- Add pointers for new topic files:
- [Title](filename.md) — one-line hook - Update pointers for modified files if the description changed
- Remove any pointers that now point to deleted/superseded content
- Keep MEMORY.md under 200 lines (lines beyond 200 get truncated)
- Keep each pointer line under 150 chars
Report
At the end, tell the user:
- How many memory items were written/updated/archived
- Which files were touched
- Any contradictions with existing memory that were resolved
- 1-2 sentence summary of the session's key learnings
Example output
Good memory entry for a feedback type:
**Rule:** For this project, prefer explicit error types over generic Error objects.
**Why:** The error handling middleware needs to distinguish between validation errors (400) and server errors (500) — string matching on error messages is fragile.
**How to apply:** When writing any error-throwing code in the API layer, create or use a typed error class (ValidationError, AuthError, etc.).Good memory entry for a project type:
The payments module uses Stripe's older API (v2019-10-17) pinned in config — do not upgrade without coordinating with the billing team.
**Why:** An upgrade in 2025-Q3 broke webhook signature validation and caused missed payment events. The pin is intentional.
**How to apply:** When touching payments code, verify any Stripe API usage against the v2019-10-17 docs, not the latest.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.

