You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Smart evaluation - only records when genuinely useful insights exist
Structured reflections - dated entries with context, insights, and challenges
Project or user level - saves to .claude/REFLECTIONS.local.md at appropriate scope
Git-friendly - .local.md suffix indicates file should not be committed
Non-invasive - always asks before making changes
"No insights needed" is valid - won't force unnecessary entries
File Structure
Reflections are saved to .claude/REFLECTIONS.local.md with this format:
## 2024-01-28 - Task Summary**Context:** Brief description of what was being worked on
**Key Insights:**- Specific, actionable insight
**What Worked:**- Effective approach or pattern
**Challenges Encountered:**- Challenge and how it was resolved
This skill should be used when the user confirms a task is complete (e.g., "thanks", "that works", "done", "perfect"), when a significant piece of work has been finished, or when the conversation has reached a natural conclusion point. Critically reviews the conversation to identify what worked, where challenges occurred, and any misunderstandings. Captures key insights in a structured REFLECTIONS.local.md file.
Session Reflection
This skill reviews completed tasks to improve future interactions by capturing insights in .claude/REFLECTIONS.local.md.
Trigger Confirmation
Before reflecting, confirm with the user via AskUserQuestion:
question: "Task complete! Would you like me to reflect on our session?"
header: "Reflect"
options:
- label: "Yes, reflect"
description: "Review what worked and what could be improved"
- label: "Skip"
description: "End without reflection"
If the user chooses "Skip", thank them and end. Otherwise, proceed with the reflection process.
Reflection Process
1. Analyze the Conversation
Review the entire conversation to identify:
What worked well:
Approaches that led to quick solutions
Clear communication patterns
Effective tool usage
Good assumptions made
Where we got stuck:
Points where multiple attempts were needed
Misinterpretations of requirements
Technical blockers encountered
Inefficient approaches taken before finding the right one
Key learnings:
Requirements that needed clarification
Assumptions that turned out to be wrong
Context that was missing initially
Patterns or conventions discovered
Workflow preferences established
2. Evaluate if Reflection is Warranted
Critically assess whether the session produced insights worth recording:
Recording IS warranted when:
A recurring pattern was identified that would help in future sessions
Project-specific conventions were discovered that aren't documented
A significant misunderstanding occurred that clear context could prevent
Workflow preferences were established that should persist
Useful approaches or solutions were found after initial struggles
Recording is NOT warranted when:
The issue was a one-off situation unlikely to recur
The learning is too generic or obvious
No significant challenges occurred - the session went smoothly
Nothing new was learned that would help future sessions
If no reflection is needed, summarize briefly and end:
"Reflection complete. The session went smoothly and no insights need to be recorded."
3. If Recording Is Warranted
Confirm where to save the reflection via AskUserQuestion:
question: "I have insights worth recording. Where should I save them?"
header: "Save to"
options:
- label: "Project reflections (Recommended)"
description: "Save to ./.claude/REFLECTIONS.local.md for this project"
- label: "User reflections"
description: "Save to ~/.claude/REFLECTIONS.local.md for all projects"
- label: "Just show me"
description: "Show reflection without saving"
4. Check for REFLECTIONS.local.md Reference in CLAUDE.md
Before writing to REFLECTIONS.local.md, check if the appropriate CLAUDE.md file already references it:
For project-level reflections:
Check if ./CLAUDE.md exists
If it exists, check if it contains a reference to .claude/REFLECTIONS.local.md
If no reference exists, add one
For user-level reflections:
Check if ~/.claude/CLAUDE.md exists
If it exists, check if it contains a reference to REFLECTIONS.local.md
If no reference exists, add one
Reference to add (if missing):
- See `.claude/REFLECTIONS.local.md` for accumulated insights and learnings from past sessions.
This reference should be added once at the end of the CLAUDE.md file, or under a relevant existing section if one fits naturally.
5. Structure the Reflection Entry
Each reflection entry in REFLECTIONS.local.md should follow this format:
## [DATE] - [Brief Topic/Task Summary]**Context:**[1-2 sentences about what was being worked on]**Key Insights:**-[Specific, actionable insight 1]-[Specific, actionable insight 2]**What Worked:**-[Effective approach or pattern]**Challenges Encountered:**-[Challenge and how it was resolved]---
6. Write to REFLECTIONS.local.md
If the file doesn't exist: Create it with a header and the first entry:
# Reflections> This file is excluded from version control (*.local.md) and contains personal insights from Claude Code sessions.
This file contains accumulated insights and learnings from Claude Code sessions. These reflections help improve future interactions by documenting patterns, conventions, and lessons learned.
---## [DATE] - [Topic]
...
If the file exists: Append the new entry at the end of the file, maintaining the existing structure.