4.2 KiB
Remember Skill
Review session memories and update the local project memory file (CLAUDE.local.md) with learnings.
CRITICAL: Use the AskUserQuestion Tool
Never ask questions via plain text output. Use the AskUserQuestion tool for ALL confirmations.
WRONG: ``` Should I create CLAUDE.local.md with this entry?
- Yes, create it
- No, skip ```
CORRECT: ``` ```
Printing a question as text instead of using AskUserQuestion means the task has failed.
CRITICAL: Evidence Threshold (2+ Sessions Required)
Only extract themes and patterns that appear in 2 or more sessions. Do not propose entries based on a single session unless the user has explicitly requested that specific item in their arguments.
- A pattern seen once is not yet a pattern - it could be a one-off
- Wait until consistent behavior appears across multiple sessions
- The only exception: explicit user request to remember something specific
Task Steps
-
Review Session Memory Files: Read the session memory files listed below (under "Session Memory Files to Review") - these have been modified since the last /remember run.
-
Analyze for Patterns: Identify recurring elements (must appear in 2+ sessions):
- Patterns and preferences
- Project-specific conventions
- Important decisions
- User preferences
- Common mistakes to avoid
- Workflow patterns
-
Review Existing Memory Files: Read CLAUDE.local.md and CLAUDE.md to identify:
- Outdated information
- Misleading or incorrect instructions
- Information contradicted by recent sessions
- Redundant or duplicate entries
-
Propose Updates: Based on 2+ session evidence OR explicit user instruction, propose updates. Never propose entries from a single session unless explicitly requested.
-
Propose Removals: For outdated or misleading information in CLAUDE.local.md or CLAUDE.md, propose removal with explanation based on session evidence.
-
Get User Confirmation: Use AskUserQuestion to confirm both additions AND removals. Only make user-approved changes.
File Locations
- Session memories: `~/.claude/projects/{sanitized-project-path}/{session-id}/session-memory/summary.md`
- Local memory file: `CLAUDE.local.md` in project root
- Project config: `lastProjectMemoryUpdate` field stores last run timestamp
Guidelines
Evidence Threshold (CRITICAL):
- Patterns must appear in 2+ sessions before proposing
- Only exception: explicit user instruction in arguments
- Note how many sessions contained each pattern when proposing
User Confirmation:
- Always use AskUserQuestion before ANY changes
- Ask about each proposed addition separately (one entry per question, not batched)
- Show exactly what will be added or removed
- Never make silent changes
Be Conservative:
- Prefer fewer, high-quality additions
- Avoid temporary or changeable details
- Focus on stable patterns and preferences
Format:
- Keep entries concise and actionable
- Group related entries under clear headings
- Use bullet points for easy scanning
AskUserQuestion Format
Ask about each proposed entry separately (one entry per question). Do not batch multiple entries into a single question.
``` AskUserQuestion({ questions: [{ question: "Add to CLAUDE.local.md: 'Prefer bun over npm for all commands'?", header: "Add memory", options: [ { label: "Yes, add it", description: "Add this entry to CLAUDE.local.md" }, { label: "No, skip", description: "Don't add this entry" }, { label: "Edit first", description: "Let me modify the entry before adding" } ], multiSelect: false }], metadata: { source: "remember" } }) ```
Workflow
- Read session memory files listed below
- Analyze for recurring patterns (2+ sessions)
- Read existing CLAUDE.local.md and CLAUDE.md
- Identify patterns worth remembering
- Identify outdated information to remove
- Use AskUserQuestion to confirm each proposed change
- Make approved changes
- Report summary of changes made (or that none were needed)