python-pre-mortem

Writes realistic post-mortem reports for plausible future bugs in Python code.

1|2|Updated Nov 25, 2017
One-click install
npx skills add https://github.com/asarchami/dotfiles --skill python-pre-mortem-asarchami
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-pre-mortem
Source: https://github.com/asarchami/dotfiles/tree/main/dot_config/opencode/skills/python/pre-mortem
Command: npx skills add https://github.com/asarchami/dotfiles --skill python-pre-mortem-asarchami

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 ordering dependencies, and coincidental correctness in Python code by writing realistic incident reports for bugs that have not happened yet, so teams can harden weak spots before they break. ## Core Features & Use Cases - Fragility Catalogue: Analyzes code against ten fragility patterns including implicit ordering, stringly-typed contracts, shared mutable state, and load-bearing defaults. - Structured Post-Mortem Reports: Produces incident-style reports with severity, affected components, the plausible change that caused the failure, and concrete hardening suggestions. - Scoped Analysis: Focuses on user-specified files or directories containing production logic, delivering 3-7 high-quality post-mortems per module. - Use Case: Before a major refactor of a payment processing module, run a pre-mortem to surface invisible invariants and non-atomic operations that a reasonable future edit could silently break. ## Quick Start Ask the agent to run a pre-mortem analysis on a specific Python file or directory to receive realistic future-bug post-mortem reports with hardening suggestions.

Frequently Asked Questions about python-pre-mortem

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

FAQPage Schema
How do I find fragile code in a Python codebase before it breaks?

Run a pre-mortem analysis that reads production code and writes realistic incident reports for plausible future bugs. It checks ten fragility patterns like implicit ordering, stringly-typed contracts, and coincidental correctness, then suggests concrete hardening steps.

What is a pre-mortem analysis for code?

A pre-mortem imagines bugs that have not happened yet and writes post-mortem reports as if they already occurred. Each report describes the plausible future change that caused the failure, the hidden assumption it violated, and how to harden the code.

Does pre-mortem analysis work with any Python project?

Yes, it works with any Python project containing production logic. You can scope the analysis to specific files or directories, and it focuses on meaningful logic rather than trivial code.

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

A pre-mortem does not look for existing bugs; the code may be perfectly correct today. Instead it identifies places where the code is fragile against future edits, such as invisible invariants and load-bearing defaults.

What are the limitations of pre-mortem code analysis?

It produces reports only and does not modify or fix the code. Quality depends on the plausibility of imagined changes, and it targets Python production code rather than tests or configuration files.