This skill should be used when the user asks to 'run a retrospective', 'review this session', 'extract learnings', 'what did we learn', 'analyze our conversation', 'session review', or wants to reflect on work done during the conversation.
When users ask to run a retrospective or analyze a session, this skill guides structured reflection to extract learnings, identify patterns, and create reusable rules or knowledge entries from mistakes, good decisions, debugging insights, and architectural choices made during the conversation.
/plugin marketplace add FrancisVarga/coconut-claude-code-plugins/plugin install coconut-rules@coconut-claude-code-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Guide for analyzing development sessions to extract learnings, identify patterns, and improve future work through structured reflection.
Retrospectives transform implicit session knowledge into explicit, reusable rules and knowledge entries. Extract value from:
| Depth | Analysis Scope | Time | Use Case |
|---|---|---|---|
quick | Major events only | ~2 min | Short sessions, obvious learnings |
deep | Patterns + context | ~5 min | Standard sessions |
ultrathink | Full reflection | ~10 min | Complex sessions, debugging-heavy |
Analyze session events across five categories:
1. Mistakes (M)
2. Good Decisions (G)
3. Patterns (P)
4. Debugging Insights (D)
5. Architectural Decisions (A)
Scan conversation for significant events:
Identify:
- Error messages and their resolutions
- Multiple attempts at same task
- Tool failures and recoveries
- User corrections or clarifications
- Successful implementations
- Refactoring or rework
For each significant event, assign category (M/G/P/D/A) and assess:
Event: [Brief description]
Category: [M/G/P/D/A]
Impact: [High/Medium/Low]
Actionable: [Yes/No]
Transform events into structured learnings:
## Learning: [Title]
**Category**: [M/G/P/D/A]
**Context**: [When this applies]
**Learning**: [What was learned]
**Action**: [Rule to add | KG entry | No action]
For each actionable learning:
If Rule candidate:
If KG entry candidate:
Present findings grouped by action type:
## Retrospective Results
### Session Summary
- Duration: [X messages/events analyzed]
- Key events: [Count by category]
### Rules to Add
| Rule | Placement | Rationale |
|------|-----------|-----------|
| [rule text] | [CLAUDE.md/.claude/rules/X.md] | [why] |
### Rules to Update
| Current | Proposed | File |
|---------|----------|------|
| [old] | [new] | [path] |
### Knowledge Graph Entries
| Type | Content | Tags |
|------|---------|------|
| [decision/pattern/convention] | [text] | [tags] |
### Skipped Items
- [Item] - [Reason: too specific/already covered/low impact]
Evaluate each proposed change:
Include if:
Exclude if:
Store retrospective results in KG:
# Add decision
/coconut-knowledge-graph:add "decision-name" --type decision --content "[text]"
# Add pattern
/coconut-knowledge-graph:add "pattern-name" --type convention --content "[text]"
Create rules via:
# Add to rules
/coconut-rules:add-rule "[rule text]"
Save retrospective summary to .claude/retrospectives/YYYY-MM-DD.md:
# Retrospective: [Date]
## Session Focus
[What was worked on]
## Key Learnings
[Bullet points]
## Changes Made
- Rules: [list]
- KG entries: [list]
## Notes
[Additional context]
Mistake detected
↓
Identify root cause (not symptom)
↓
Determine if preventable by rule
↓
Draft rule (<50 words)
↓
Place: Security/critical → CLAUDE.md
Domain-specific → .claude/rules/[domain].md
Decision made during session
↓
Document alternatives considered
↓
Record rationale
↓
Tag with relevant contexts
↓
Add to knowledge graph
| Command | Purpose |
|---|---|
/coconut-rules:retrospective | Run full retrospective analysis |
/coconut-rules:retrospective --depth quick | Quick analysis |
/coconut-rules:add-rule | Add individual rule |
/coconut-knowledge-graph:add | Add KG entry |