Task
Reflect on this session's conversation and extract patterns worth persisting to memory.
This is NOT the same as /remember (which saves explicit user-stated facts). This skill is about self-reflection — analyzing what happened during the session to find implicit lessons.
What to Look For
Scan the conversation for:
- •User corrections — where I was wrong and the user corrected me. What was the mistake? What's the right approach?
- •Error resolutions — debugging that led to a fix. What was the root cause? How was it found?
- •Workarounds — solutions to framework/library/tool quirks that aren't obvious
- •Over-engineering — where I was told to simplify. What did I over-complicate?
- •Project conventions — patterns established or reinforced during the session
- •Effective approaches — techniques that worked well and should be repeated
If the user provided a focus area via $ARGUMENTS, prioritize that.
Extraction Rules
- •Only extract patterns that are reusable across sessions — skip one-time fixes
- •Be honest about mistakes — the point is to learn, not save face
- •Keep each pattern to 1-3 lines — concise and actionable
- •Skip anything already covered in CLAUDE.md or rules files
Where to Save
Locate Memory Directory
- •Check if inside a git repo:
git rev-parse --show-toplevel - •The project key is the repo root path (or cwd if not in a repo) with
/replaced by-and leading-stripped - •Memory dir:
~/.claude/projects/<project>/memory/ - •If the directory doesn't exist, show the computed path and ask before creating
Save Patterns
- •Read existing MEMORY.md to avoid duplicates
- •Add new patterns under a clear category heading
- •If a pattern is detailed enough to warrant its own file, create a topic file and link from MEMORY.md
- •Keep MEMORY.md under 200 lines
Output
After saving, summarize:
- •How many patterns extracted
- •What was saved and where
- •Any patterns you considered but skipped (and why)