Post mortem

From rileyhilliard/claude-essentials · View interactive version

Post mortem is an AI agent skill from the GitHub repository rileyhilliard/claude-essentials. Reviews a completed session, or many sessions, to find what caused friction and turns each finding into a concrete change with a file path (docs, CLAUDE.md, skills, hooks, tests, architecture). Use when the user asks for a post-mortem, retro, or lessons learned, asks what went wrong or what keeps go

How to use this skill

Skill file

Post-Mortem

Review a completed session or task to assess how it went and extract improvements. This covers both "how did we do" evaluation and "what can we learn" investigation.

When to Use

After completing any non-trivial task or session. The goal is continuous improvement:

Investigation Types

Load the relevant reference based on what you're investigating:

| Situation | Load | File |

|-----------|------|------|

| Agent hit friction during execution (wrong files, bad assumptions, unclear conventions) | DX Friction | references/dx-friction.md |

| Documentation (READMEs, comments, API docs) was wrong, incomplete, or misleading | Documentation Gaps | references/documentation-gaps.md |

| Code was hard to understand or things were in unexpected places | Architecture Clarity | references/architecture-clarity.md |

| A bug was fixed but the root cause suggests a process gap | Bug Prevention | references/bug-prevention.md |

| Code works but diverges from best practices, idioms, or established conventions | Anti-Patterns | references/anti-patterns.md |

| Skills, hooks, commands, agents, or .claude/ configs need updating | Tooling Improvements | references/tooling-improvements.md |

Load multiple references when the session spans investigation types.

For a review across many sessions ("what keeps going wrong in this repo?"), build a transcript digest first with python3 ${CLAUDE_SKILL_DIR}/scripts/extract-friction.py --out <scratch dir>/friction, then read the Multi-Session Reviews section of references/dx-friction.md.

Core Process

Every post-mortem follows four steps regardless of investigation type.

1. Reconstruct What Happened

Walk through the session timeline. For each significant step, note:

Don't editorialize yet. Just document the sequence.

2. Assess Execution Quality

Evaluate how the session went overall:

Flag anything that felt harder than it should have been, even if it ultimately succeeded.

3. Identify Systemic Causes

For each friction point, ask: "What would have prevented this?"

Push past the first answer. "I should have read the file more carefully" is a symptom. "The file's name doesn't indicate what it contains" or "there's no convention documented for where this type of code lives" is a systemic cause.

Good root causes point to something fixable:

Bad root causes are just descriptions of what went wrong:

4. Propose Concrete Actions

Every finding should produce one of these:

Each action should have a specific file path and description of the change. Vague actions like "improve documentation" are not useful.

Output Format

Match the length to the findings. Cover the substance without filler sections or a summary that repeats the findings.

## Session Post-Mortem

### What Happened
[Timeline of the session with key decision points]

### Execution Assessment
- **Outcome:** [What was delivered vs what was asked]
- **Efficiency:** [Direct path or detours? Where and why?]
- **What worked well:** [Patterns, skills, or approaches worth repeating]

### Findings

#### Finding 1: [Title]
**What happened:** [The friction or issue, stated factually. 1-2 sentences]
**Root cause:** [The systemic issue underneath. 1-2 sentences]
**Action:** [Specific change with file path. 1-2 sentences]
**Priority:** [High/Medium/Low based on how often this would recur]

#### Finding 2: [Title]
...

### Summary
[1-2 sentences: biggest takeaway and what should change first]
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.