agentleFS
flonatflonat/flonat-research/skills/postmortem/SKILL.md

postmortem

Skill150 starsChanged 9 days agoMITView on GitHub

Deliver a structured post-mortem after incidents, mistakes, or stuck sessions. Use when the user requests a structured post-mortem after incidents, mistakes, or stuck sessions.

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use hypothesis-driven-debugging, status-report and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Sturla22Skill

    hypothesis-driven-debugging

    Debug by ranking concrete hypotheses and running discriminating checks. Use when a bug is hard to localize, many plausible failure points exist, logs are noisy or misleading, a symptom appears intermittently, or trial-and-error edits haven't worked.

    Also in 3 projects that use this

  • AnthropicSkill

    status-report

    Generate a status report with KPIs, risks, and action items. Use when writing a weekly or monthly update for leadership, summarizing project health with green/yellow/red status, surfacing risks and decisions that need stakeholder attention, or turning a pile of project tracker activity into a readable narrative.

    Also in 3 projects that use this

  • seongjaeryuSkill

    organize

    Organize knowledge into Sets

    Also in 3 projects that use this

  • SaluteYBSkill

    skill-eval

    Evaluate, tune, and regression-check AgentSkills. Use when creating a new skill or improving an existing one and you need structured should-trigger, should-not-trigger, boundary-case, and execution-quality examples. Also use when auditing overlapping skills and sharpening trigger descriptions before release.

    Also in 3 projects that use this

  • neurofooSkill

    premortem

    Pre-mortem analysis that imagines a plan has failed, then works backward to identify causes and preventions. Use before launches, major decisions, or risky initiatives to surface hidden risks.

    Also in 3 projects that use this

  • AnthropicSkill

    incident-response

    Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 40 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After incidents, mistakes, rollbacks, or near-misses

    line 19
  2. Distinctive:

    When the user says "what went wrong", "lessons learned", "post-mortem", "retrospective", or "how do we prevent this"

    line 20
  3. Distinctive:

    After a stuck session where significant time was lost

    line 21
  4. Distinctive:

    After a wrong-approach event (plan existed but execution diverged)

    line 22
  5. Distinctive:

    Stop when you reach a cause that can be addressed by a concrete change to the system (skill, rule, hook, doc).

    line 72
  6. Very specific:

    Write the report to log/incidents/YYYY-MM-DD_short-description.md:

    line 127
  7. Very specific:

    Create log/incidents/ if it doesn't exist.

    line 162

“Common” is measured: kept by at least 6 in 10 of the 40 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Lessons Learned: Structured Retrospective

Analyse incidents using a structured framework, identify root causes, and encode preventive measures directly into skills, guards, or documentation. The goal is systematic improvement, not blame.

When to Use

  • After incidents, mistakes, rollbacks, or near-misses
  • When the user says "what went wrong", "lessons learned", "post-mortem", "retrospective", or "how do we prevent this"
  • After a stuck session where significant time was lost
  • After a wrong-approach event (plan existed but execution diverged)

Process

Phase 1: Incident Definition

Capture the facts first, analysis later.

## Incident Summary

**What happened:** [Factual description]
**When:** [Date/time]
**Impact:** [What was affected, scope]
**Resolution:** [How it was fixed/rolled back]
**Time to resolution:** [How long to fix]

Phase 2: Timeline Reconstruction

Build a chronological sequence of events:

TimeActionActorOutcome
HH:MM[What was done][Claude/User][Result]

Key questions:

  • What was the trigger?
  • Where did the sequence diverge from expected?
  • What was the point of no return?

Phase 3: Root Cause Analysis (5 Whys)

1. Why did [incident] happen?
   → Because [immediate cause]

2. Why did [immediate cause] happen?
   → Because [deeper cause]

3. Why did [deeper cause] happen?
   → Because [systemic issue]

4. Why did [systemic issue] exist?
   → Because [process gap]

5. Why did [process gap] exist?
   → Because [root cause]

Stop when you reach a cause that can be addressed by a concrete change to the system (skill, rule, hook, doc).

Phase 4: Contributing Factors

Identify all factors, not just the root cause:

CategoryFactorContribution
ProcessMissing checkpoint, unclear workflow[How it contributed]
CommunicationAmbiguous instructions, assumed consent[How it contributed]
TechnicalMissing guard, no validation[How it contributed]
ContextSession continuation, prior assumptions[How it contributed]
HumanFatigue, time pressure, overconfidence[How it contributed]

Phase 5: Fix Classification

Classify each fix by type:

Fix TypeWhen to UseHow to Encode
SkillRecurring workflow needs structureCreate SKILL.md via skill-extract
GuardAction requires mandatory checkpointAdd approval gate to existing skill
RuleBehavioural constraint needed globallyCreate rules/*.md
DocumentationKnowledge gap caused the issueUpdate CLAUDE.md, MEMORY.md, or docs/
HookManual step was forgottenCreate script in hooks/
ChecklistMultiple steps need verificationAdd to existing skill

Phase 6: Fix Implementation

Implement fixes during the retrospective, not after. This is the critical difference from a report-only post-mortem.

For each fix:

  1. Implement it (create/edit the file)
  2. Record what was done:
FixTypeLocationStatus
[Description]Skill/Guard/Rule/Doc/Hook[File path]Created/Updated

Also record a [LEARN] tag in MEMORY.md for each key correction (per the learn-tags rule).

Phase 7: Verification

Define how to verify the fix works:

## Verification

**Test scenario:** [How to test the fix]
**Success criteria:** [What "fixed" looks like]
**Review date:** [When to check if fix is working — default: 2 weeks]

Output

Write the report to log/incidents/YYYY-MM-DD_short-description.md:

# Lessons Learned: [Incident Title]

**Date:** YYYY-MM-DD
**Severity:** [Low|Medium|High|Critical]
**Status:** [Resolved|Monitoring|Open]

## Incident Summary
[Brief description]

## Timeline
| Time | Action | Actor | Outcome |
|------|--------|-------|---------|

## Root Cause
[The fundamental issue]

## Contributing Factors
- [Factor 1]
- [Factor 2]

## Fixes Implemented
| Fix | Type | Location | Status |
|-----|------|----------|--------|

## Prevention
[How this prevents recurrence]

## Lessons
1. [Key takeaway 1]
2. [Key takeaway 2]

Create log/incidents/ if it doesn't exist.

Common Incident Patterns

PatternSymptomRoot CauseTypical Fix
Premature actionAction taken before approvalImplied consent ≠ explicitAdd approval gate to skill
Sequence errorSteps in wrong orderMissing dependency chainEncode sequence in skill
Missing validationBad data passed throughNo checkpointAdd pre-flight check
Context carryoverStale assumptions from prior sessionState assumed to persistExplicit context verification
Scope creepDid more than requestedTask scope too broadClarifying questions first
Planning loopRe-planned instead of executingPerfectionism / uncertaintyExecution stall detector

Anti-Patterns

Anti-PatternProblemInstead
Blame assignmentCreates defensivenessFocus on process, not people
Single-cause thinkingOversimplifiesUse 5 Whys, multiple factors
Recommend without actingLessons forgotten, recursImplement fixes during retro
Vague fixes ("be more careful")Not verifiableEncode specific changes
Skip verificationNo way to know if fix workedDefine success criteria

Cross-References

  • [LEARN] tags — record one-liner corrections in MEMORY.md (the quick complement to this skill)
  • skill-extract — extract a full skill from a session (when the fix type is "Skill")
  • ideas — if a fix is too large for this session, capture as an idea for later

Success Criteria

The retrospective is complete when:

  • Incident clearly defined with timeline
  • Root cause identified (not just symptoms)
  • Contributing factors documented
  • At least one fix implemented (not just recommended)
  • Fix encoded in appropriate location (skill, rule, hook, doc)
  • [LEARN] tags recorded in MEMORY.md
  • Verification criteria defined
  • Report written to log/incidents/

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.