postmortem-generator

A guide for creating a postmortem, which is a written record of what happened during a service outage and how to prevent a repeat. It helps organize the timeline, root cause, and follow-up work into a Markdown document.

In plain words
What is it for?
Turning completed outage investigations into clear postmortems with incident identifiers, timelines, root causes, bugs, and corrective actions.
Why use it?
It prevents incident reports from being drafted before the investigation is complete or from missing important times and action items.

Skill for Claude CodeCodex

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 skills/gemini-cli-extensions/sre/postmortem-generator
Any agent
npx skills add gemini-cli-extensions/sre --skill postmortem-generator
Clone the repo
git clone --depth 1 https://github.com/gemini-cli-extensions/sre

Made for: Claude Code, Codex.

Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,506 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00046 $0.02506
Opus 5 $0.00023 $0.01253
Sonnet 5 $0.00009 $0.00501
Haiku 4.5 $0.00005 $0.00251

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

Security

Grade B, and why

postmortem-generator scanned grade B with 1 finding 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 3d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

* `HH:MM:SS`: ricc@ typed `sudo halt` (chubby fingers) <== <span style="color:red">Start of Incident</span>
skills/postmortem-generator/SKILL.md · 225 lines

How it starts

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

You are an expert PostMortem tech Writer, with deep SRE and Incident Management experience.

Your goal is to:

  • ensure PoMo information is ready (see prerequisites).
  • create a postmortem document, using the template below.
  • ensure the document is clear, concise, and follows best practices for postmortem writing.
  • ensure the document is in markdown format.

This has two complications: timeline and action items.

Prerequisites

Ensure you're able to fetch relevant data about the incident. This is not part of this tool, so it should be done by other tools or by users.

  • Ensure that investigation is DONE before starting the PostMortem work. Just ensure the timeline CSV is built during the investigation.
  • Feel free to abort if user is unable to provide tools or content for you to build the PM.
  • When starting the PM, you should have all the right timeline info, a root cause, and a good understanding of what happens.
  • Every incident should have a unique id, based on the Incident Management tooling you're using:
    • Google IRM: i_1234567890 , omg/12345 , ..
    • ServiceNow: INC123456
    • JIRA: PROD-1234
    • PagerDuty: P123456 or incident URL
    • ZenDesk: #1234567
    • ...

Execution order

To work correctly, you need to follow a simple, deterministic algorithm:

  1. Create a folder, like "out/postmortem-<unique_incident_id>/", within the context of the investigation folder. If it exists, try to understand what's already been done ;)
  2. Create a file "postmortem-<unique_incident_id>/PLAN.md", with a number of checkboxes for the steps you need to execute. This ensures that you'll be able to resume your work if interrupted and makes your finite-state automaton process more transparent. Note: if unique_incident_id is missing, use YYYYMMDD instead. From now on, you're going to interact with the PLAN.md to pick up the next job and mark when done. You will concentrate on various phases: INVESTIGATION, POSTMORTEM DRAFTING, TIMELINE, ACTION ITEMS, POSTMORTEM FINALIZATION.
  3. Create a file "postmortem-<unique_incident_id>/postmortem-base.md", copying from the template below.
  4. Create a file "postmortem-<unique_incident_id>/timeline.csv", with the additional context below.
  5. Start your investigation, and keep adding relevant events to the timeline.csv file. This might require multiple iterations. Consider using MCP tools from your Incident Management system or internal tools to fetch relevant data about the incident.
  6. When the investigation is done, and the timeline is complete, generate the final postmortem document by merging the postmortem-base.md with the timeline.csv file into "postmortem-<unique_incident_id>/postmortem-final.md"
  7. The final postmortem document should have a table for the timeline, and a table for the action items, but the action items bug_ids should be empty for now.
  8. Finally start filing bugs as described below, and update the postmortem-final.md file with the action items.
  9. Finalize the PM and ask user to review. Finally propose to create a new doc with this content in Google Docs and share with intended users for review. This might require Workspace extension to generate a Google Doc from MD.

Read the full file on GitHub · 225 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. 3d ago First seen · 225 lines · 46 tokens per session scan B 8b73027981d1

Subscribe to this mod's changes

postmortem-generator is a skill published in the GitHub repository gemini-cli-extensions/sre (82 stars, last pushed 9d ago), licensed Apache-2.0. It adds 46 tokens to every session and 2,506 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens