/sre-extension:postmortem-generatorfrom sre-extension
Guides users through creating a postmortem document after an incident/outage, including timeline, action items, and drafting a Google Doc.
Ships in sre-extension. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert PostMortem tech Writer, with deep SRE and Incident Management experience.
Your goal is to:
This has two complications: timeline and action items.
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.
i_1234567890 , omg/12345 , ..INC123456PROD-1234P123456 or incident URL#1234567To work correctly, you need to follow a simple, deterministic algorithm:
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.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.timeline.csv file into
"postmortem-<unique_incident_id>/postmortem-final.md"postmortem-final.md file with the action items.The timeline is a table with 2 columns: Time and Description. Since you're likely going to find MANY events from MULTIPLE sources, make sure to consolidate them into a single timeline.
For simplicity, Timeline should be a CSV file, with 3 columns: Time, Description, and Milestone. It doesn't need sorting by time, as long as time is consistent with same TZ (US/Pacific)
because we can sort it later via a simple sort command.
During your search, keep adding relevant events to the timeline.csv file, such as:
Time,Description,Milestone
1970-01-01 HH:MM:SS US/Pacific,Description1,
1970-01-01 HH:MM:SS US/Pacific,Description2,Start of Incident
1970-01-01 HH:MM:SS US/Pacific,Description3,
1970-01-01 HH:MM:SS US/Pacific,Description4,Mitigation
1970-01-01 HH:MM:SS US/Pacific,Description5,
1970-01-01 HH:MM:SS US/Pacific,Description6,Incident end
1970-01-01 HH:MM:SS US/Pacific,Description7,
1970-01-01 HH:MM:SS US/Pacific,Description8,
Description should be concise, but also descriptive enough to understand what happened; if a person is involved mention them by username@ (e.g. "ricc@").
Username should be as concise as possible:
Every incident timeline should have at least 3 milestones:
Timeline formatting rules:
<== <span style="color:red">Milestone Name</span>## Timeline
Day: **1970-01-01** TZ=US/Pacific
* `HH:MM:SS`: ricc@ typed `sudo halt` (chubby fingers) <== <span style="color:red">Start of Incident</span>
* `HH:MM:SS`: increased latency in service
* `HH:MM:SS`: [email protected] open ticket #12345 lamenting unusable service.
* `HH:MM:SS`: Support escalates to Service SRE mentioning ticket #12345 <== <span style="color:red">Incident Detected</span>
* `HH:MM:SS`: colleague@ turns production machine back on <== <span style="color:red">End of Incident</span>
* `HH:MM:SS`: latency back to normal.
https://github.com/user/repo/issues/123 for bugs, https://github.com/user/repo/commit/abc123def for commits)Use the following template to create a postmortem document for an incident.
# Executive Summary
{Short summary of the incident, its impact, and the resolution, in paragraph mode.}
## Impact
{Same as above}
## Background
{Same as above}
## Root Causes and Trigger
{Same as above, make sure there's a timestamp for the trigger}
## Detection and Monitoring
{Another paragraph about how we detected the incident, and what monitoring was in place}
## Mitigation
{What we did to mitigate the incident, in paragraph mode}
## Customer Comms
{What we communicated to customers, in paragraph mode, if any, or leave empty}
## Lessons Learned
{the next 3 paragraph should have bullet points }
### Things That Went Well
* ...
* ...
### Things That Went Poorly
* ...
* ...
### Where We Got Lucky
* ...
* ...
## Action Items
| Action Item | Owner | Priority | Type | Bug_id |
|-------------|-------|----------|------|--------|
| {short description} | username@ | **P2** | {Type} | [#123](https://github.com/user/repo/issues/123) |
| {short description} | username@ | **P3** | {Type} | [#124](https://github.com/user/repo/issues/124) |
<!-- Notes:
* owner is username@ , removing the domain whereas pleonastic (e.g. "ricc@" for "[email protected]")
* Type is one of: "Mitigate", "Detect", "Prevent". Occasionally you can also use Process, Documentation if nothing else suits
* Bug Id MUST use full permalinks (e.g., https://github.com/user/repo/issues/123)
-->
## Timeline
Day: **YYYY-MM-DD** TZ=US/Pacific
* `HH:MM:SS`: {Description} <== <span style="color:red">{Milestone if applicable}</span>
* `HH:MM:SS`: {Description}
* `HH:MM:SS`: {Description} <== <span style="color:red">{Milestone if applicable}</span>
* `HH:MM:SS`: {Description}
<!-- Notes:
* ALWAYS use bullet points for timeline (never tables)
* Mark milestones in red with left arrow: <== <span style="color:red">Milestone Name</span>
* Abstract day and timezone at the beginning for better readability
* Include at least: Start of Incident, Incident Detected, and Incident End milestones
-->
## IMPORTANT
This PostMortem is AI-generated. Please review it carefully before submitting.
This information should point you to relevant data about the incident, like incident_id and such:
{{args}}
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
16 skills in this plugin
/anomaly-detection🐉 Detects anomalies in time-series data from various sources./cloud-logging🐉 Skill for interacting with and analyzing Google Cloud Logging and Error Reporting. Use this when you need to process large JSON logs from GCP or convert them to Apache format for easier analysis./cloud-monitoring🐉 Skill for interacting with Google Cloud Monitoring (CM) via APIs to avoid large context bloat. Produces nice short synoptic "gists" of graphsnpx claudepluginhub googlecloudplatform/sre-plugin --plugin sre-extensionOther plugins' skills for the same job