“Be more careful next time.”
That’s not a fix. That’s a wish. And wishes don’t prevent the same mistake from happening again.
I’ve been running Claude Code sessions for months now. Things go wrong. Posts publish immediately instead of scheduling. Code gets pushed before sanitization. Files get created in the wrong location.
The pattern was always the same: fix the immediate problem, promise to remember, then eventually repeat the mistake.
The Real Problem
Quick fixes don’t address root causes. Lessons get forgotten because they live in your head, not your system. Without structural changes, the same mistakes recur.
I built a skill that enforces a different approach: don’t just analyze what went wrong — implement the fix during the retrospective itself.
Watch it in action:
The 7-Phase Process
Phase 1: Definition — Capture the facts. What happened? When? What was the impact? No analysis yet, just documentation.
Phase 2: Timeline — Build a chronological sequence. What was the trigger? Where did things diverge from expected? What was the point of no return?
Phase 3: Root Cause — Five Whys analysis. Keep asking why until you hit the fundamental issue, not just the symptom.
Phase 4: Contributing Factors — Multiple things usually contribute. Process gaps, communication issues, missing validation, context carryover from previous sessions.
Phase 5: Classification — What type of fix is needed? A new skill? A guard that requires approval before dangerous actions? Updated documentation? An automated check?
Phase 6: Implementation — This is the critical part. The skill enforces that you actually make the change during the retrospective. Create the guard. Update the documentation. Write the hook.
Phase 7: Verification — How will you know the fix works? Define success criteria and a review date.
Common Patterns
After running this on enough incidents, patterns emerge:
Premature Action — Acting before getting explicit approval. Fix: add approval gates.
Sequence Error — Steps executed in wrong order. Fix: encode dependency chains.
Missing Validation — Bad data passed through. Fix: add validation checkpoints.
Context Carryover — Assumptions from previous sessions causing issues. Fix: verify context at task start.
Scope Creep — Doing more than requested. Fix: ask before expanding scope.
The Anti-Patterns
What doesn’t work:
- Blame assignment — Creates defensiveness, misses systemic issues
- Single-cause thinking — Oversimplifies complex failures
- Recommendations without action — Lessons that stay as recommendations get forgotten
- Vague fixes — “Be more careful” doesn’t encode anything
- Skipping verification — No way to know if the fix actually worked
Real Example
Last week, social media posts published immediately instead of being queued for the next day. Quick fix would be: “remember to check the scheduling.”
The retrospective revealed: the webhook I was using ignores scheduling parameters entirely. The fix wasn’t remembering harder — it was documenting this limitation in the agent itself so future sessions would know to use the web UI for scheduled posts.
That’s the difference. The fix lives in the system, not in my memory.
Get the Skill
The Lessons Learned skill is MIT licensed and available on GitHub:
Repository: https://github.com/aplaceforallmystuff/claude-lessons-learned
Triggers on phrases like “lessons learned”, “what went wrong”, “post-mortem”, or “how do we prevent this”.
Every mistake is an opportunity to make the system stronger. But only if you encode the fix, not just remember it.
