Incident Postmortem Generator
/install incident-postmortem-generator
Incident Postmortem
Generate structured, blame-free incident postmortem reports with timeline reconstruction, log analysis, and action item tracking.
Quick Start
# Create a postmortem from scratch (fills in template sections)
python3 scripts/generate_postmortem.py --title "Database outage" --severity P1
# Parse logs to auto-extract timeline events
python3 scripts/generate_postmortem.py --title "API latency" --log /var/log/app.log --since 2h
# Load a complete incident from JSON
python3 scripts/generate_postmortem.py --from incident.json --output html -o postmortem.html
# Combine logs + manual timeline
python3 scripts/generate_postmortem.py --title "Deploy failure" --log /var/log/deploy.log --timeline events.json
# Check existing document for blameful language
python3 scripts/generate_postmortem.py --check-blame existing-report.md
Features
- Log parsing — Auto-detects syslog, JSON, Apache/Nginx, Python tracebacks, Docker, generic timestamped formats. Extracts errors, warnings, and notable events into a timeline.
- Timeline reconstruction — Merges log-extracted events with manual timeline JSON. Sorted chronologically with event type labels (detection, action, escalation, resolution).
- Blame-free language — Built-in checker scans for blameful patterns and suggests alternatives. Use
--check-blameon any document. - Severity classification — P0 (critical) through P3 (low) with appropriate descriptions.
- Multiple outputs — Markdown (default), HTML (styled), JSON (structured).
- CI-friendly exit codes — 0 (clean), 1 (errors found), 2 (critical severity).
- Template sections — Summary, impact, timeline, root cause, detection, resolution, lessons learned, action items.
Options
| Flag | Default | Description |
|---|---|---|
--title |
required | Incident title |
--severity |
P2 | P0, P1, P2, or P3 |
--date |
today | Incident date |
--duration |
TBD | How long it lasted |
--summary |
— | Brief summary text |
--log |
— | Log file path (repeatable) |
--since |
all | Time filter for logs (1h, 24h, 7d) |
--timeline |
— | Timeline JSON file |
--from |
— | Load full incident from JSON |
--output |
markdown | Output format: markdown, html, json |
-o |
stdout | Output file path |
--check-blame |
— | Check file for blameful language |
Workflow
After an Incident
- Gather logs:
--log /var/log/app.log --log /var/log/nginx/error.log --since 4h - Generate draft:
python3 scripts/generate_postmortem.py --title "..." --severity P1 --log ... -o draft.md - Fill in template sections (summary, root cause, impact, resolution)
- Run blame check:
--check-blame draft.md - Add action items and share
From Structured Data
- Create
incident.jsonwith full details (seereferences/templates.mdfor schema) - Generate:
--from incident.json --output html -o postmortem.html
Periodic Review
Use JSON output to track action item completion across multiple postmortems.
References
- templates.md — Full JSON schema, timeline event types, blame-free language guide with replacements
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install incident-postmortem-generator - After installation, invoke the skill by name or use
/incident-postmortem-generator - Provide required inputs per the skill's parameter spec and get structured output
What is Incident Postmortem Generator?
Generate structured, blame-free incident postmortem reports from logs, timeline data, and incident metadata. Produces root cause analysis, impact assessment,... It is an AI Agent Skill for Claude Code / OpenClaw, with 90 downloads so far.
How do I install Incident Postmortem Generator?
Run "/install incident-postmortem-generator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Incident Postmortem Generator free?
Yes, Incident Postmortem Generator is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Incident Postmortem Generator support?
Incident Postmortem Generator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Incident Postmortem Generator?
It is built and maintained by charlie-morrison (@charlie-morrison); the current version is v1.0.0.