postmortem

An incident-reporting command that turns notes, timelines, logs, alerts, and chat records into a blameless postmortem. A postmortem is a written account of what went wrong, what contributed to it, and what should change.

In plain words
What is it for?
Use it after a production incident to document the impact, UTC timeline, contributing factors, and assigned corrective actions in a Markdown file.
Why use it?
It organizes scattered evidence while the incident is still fresh and avoids blaming individuals by referring to roles instead of names. It also makes timestamps and follow-up responsibilities clear.

Command

Part of the ci-incident-medic plugin — 4 skills, 5 commands, 3 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sigistry/marketplace/postmortem
Clone the repo
git clone --depth 1 https://github.com/sigistry/marketplace

Or install ci-incident-medic, the plugin that ships this one along with the rest of its 4 skills, 5 commands, 3 agents.

Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 587 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00011 $0.00587
Opus 5 $0.00005 $0.00293
Sonnet 5 $0.00002 $0.00117
Haiku 4.5 $0.00001 $0.00059

Measured 2d ago against content hash 6809317acf13, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

postmortem scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ci-incident-medic/commands/postmortem.md · 35 lines

How it starts

The opening of the file, as written. The whole thing — 35 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Draft a blameless postmortem from raw incident evidence, pasted timeline, logs, alerts, and chat. Use this after an incident is resolved, while memory is fresh. $ARGUMENTS holds the incident notes (or a path to a notes file); gather whatever timeline, alert, and chat material the user has.

Process

Step 1: Assemble the evidence

  • Read the notes in $ARGUMENTS (inline text or a file path). Collect timestamps, alert names, deploy/rollback events, log excerpts, and who-did-what, but for attribution use roles ("the on-call engineer"), never names for blame.
  • Normalize every timestamp to UTC. If a source timezone is ambiguous, note the assumption rather than guessing silently.

Step 2: Draft the document

  • Launch the postmortem-writer agent to stitch the UTC timeline, identify contributing factors, and write owner-assigned action items. The agent writes the finished document to postmortems/YYYY-MM-DD-<slug>.md.
  • Apply the incident-response skill for the template structure and the severity model (severity-levels.md).

Step 3: Structure (exact headings)

The postmortem must contain, in order:

  1. Summary: 2-3 sentences: what broke, blast radius, how long.
  2. Impact: users affected, duration, severity (SEV1-SEV4), SLO/error-budget burn if known.
  3. Timeline (UTC): detection → mitigation → resolution, one row per event with a source citation.
  4. Root Cause: contributing factors as a system-level analysis; multiple factors, never a single scapegoat.
  5. What went well / What went poorly: honest, specific.
  6. Action items: table of Owner | Due date | Item | Type (preventive / detective).
  7. Lessons learned: durable takeaways.

Important Notes

  • Blameless, always. Analyze systems, processes, and missing guardrails, never assign fault to an individual. Replace "X deployed the bad change" with "the change passed CI because there was no integration test for Y."
  • Ground every timeline entry in a real piece of evidence (a log line, an alert, a chat timestamp) and cite it. Never invent times, metrics, or events.
  • If the evidence is thin, mark gaps explicitly as [unknown, needs follow-up] rather than filling them in.
  • Every action item needs an owner (role or named team) and a due date; classify each as preventive (stops recurrence) or detective (catches it faster next time).

Read the full file on GitHub · 35 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 35 lines · 11 tokens per session scan A 6809317acf13

Subscribe to this mod's changes

postmortem is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed 4d ago), licensed MIT. It adds 11 tokens to every session and 587 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.