pre-mortem

Writes fictional post-mortem reports for plausible future bugs in production code.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/JohnRebellion/.claude-public --skill pre-mortem-johnrebellion
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pre-mortem
Source: https://github.com/JohnRebellion/.claude-public/tree/main/claude/skills/pre-mortem
Command: npx skills add https://github.com/JohnRebellion/.claude-public --skill pre-mortem-johnrebellion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code that works today can still be fragile against future edits. This Skill identifies hidden assumptions, implicit invariants, and fragile patterns in your codebase by writing realistic post-mortem reports for bugs that have not happened yet, so you can harden the code before a reasonable future change breaks it. ## Core Features & Use Cases - Fragility Catalogue: Scans for ten documented fragility patterns including implicit ordering dependencies, stringly-typed contracts, coincidental correctness, invisible invariants, and load-bearing defaults. - Structured Post-Mortems: Produces incident-style reports with severity, the plausible change that caused the failure, why it broke, how it would surface, and concrete hardening suggestions. - Scoped Analysis: Focuses on specific files, directories, or modules you name, reading callers and callees deeply before writing anything. - Use Case: Before a major refactor or onboarding new team members, run a pre-mortem on a core module to surface architectural assumptions that no test currently enforces. ## Quick Start Ask the AI to run a pre-mortem on a specific module, for example: run a pre-mortem on the src/payments directory and write the report to PRE-MORTEM.md.

Frequently Asked Questions about pre-mortem

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find fragile code before it breaks in production?▼

Run a pre-mortem analysis that reads your production code deeply and writes fictional incident reports for plausible future failures. It targets patterns like implicit ordering dependencies, shared mutable state, and invisible invariants that tests rarely enforce.

What is a pre-mortem analysis in software engineering?▼

A pre-mortem imagines that a failure has already occurred and works backward to explain how it happened. Applied to code, it means writing realistic post-mortem reports for bugs a reasonable future edit could introduce, revealing fragility before it causes an incident.

How is a pre-mortem different from a code review or bug hunt?▼

A pre-mortem does not look for current bugs; the code may be perfectly correct today. It looks for fragility against future edits, such as stringly-typed contracts or load-bearing defaults, that a well-intentioned developer could break with a small, reasonable change.

What kinds of code fragility does this analysis detect?▼

It checks ten patterns including implicit ordering dependencies, semantic coupling through shared mutable state, assumptions baked into data transformations, non-atomic compound operations, invisible invariants, implicit resource lifecycles, and version-coupled assumptions.

When should I not use a pre-mortem analysis?▼

Skip it for config files, migrations, and boilerplate without dependent logic, and when you need to find bugs that exist today. It is designed for modules with meaningful logic where future maintenance risk matters, not for one-off scripts.