К основному содержанию
скилл CX Codex

postmortem-generator — скилл Claude Code: установка и работа

Скилл postmortem-generator для Claude Code собирает постмортем по инциденту: ведёт к таймлайну, action items и черновику Google Doc. Нужны данные расследования и root cause.

Apache-2.0 ★ 151 обновлён 2026-10-12

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre
Открыть на GitHub

Что делает postmortem-generator

Скилл postmortem-generator собирает постмортем после инцидента или сбоя. Он ведёт расследование по этапам, формирует timeline.csv, выделяет ключевые события и объединяет их с шаблоном в postmortem-final.md. В документ попадают таймлайн, причина инцидента и action items с последующим заведением багов.

Работа строится через папку postmortem-<unique_incident_id>/ и файл PLAN.md, чтобы продолжить процесс после прерывания. До старта нужны завершённое расследование, данные таймлайна и root cause. Для создания Google Doc понадобится Workspace extension.

Какие задачи решает

  • собрать постмортем по инциденту или сбою
  • свести события из разных источников в единый таймлайн
  • разложить corrective actions и связанные баги
  • подготовить Markdown-документ для ревью в Google Docs

Примеры запросов агенту

  • Собери постмортем по завершённому инциденту из материалов расследования и timeline.csv.
  • Создай PLAN.md, заполни таймлайн и подготовь postmortem-final.md по инциденту INC123456.
  • Сформируй action items по этому сбою и подготовь содержимое для Google Doc.

Как установить postmortem-generator

1Через маркетплейс плагинов

/plugin marketplace add gemini-cli-extensions/sre
/plugin install sre-extension@sre

Команда ставит плагин sre-extension целиком, со всеми его скиллами

2Через Skills CLI (Vercel)

npx skills add gemini-cli-extensions/sre --skill postmortem-generator -a claude-code

3Вручную: положить файлы

~/.claude/skills/postmortem-generator/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/postmortem-generator/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о postmortem-generator

Как установить postmortem-generator в Claude Code?

Добавь маркетплейс командой /plugin marketplace add gemini-cli-extensions/sre, затем установи расширение командой /plugin install sre-extension@sre.

Что делает postmortem-generator?

Скилл ведёт подготовку постмортема по инциденту: создаёт план, собирает timeline.csv, формирует postmortem-final.md и добавляет action items после заведения багов.

Что нужно для работы postmortem-generator?

Нужны завершённое расследование, данные о событиях инцидента, root cause и уникальный идентификатор инцидента. Для подготовки Google Doc нужен Workspace extension.

Исходный текст

SKILL.md · Apache-2.0
---
name: postmortem-generator
description: 🐉 Creates a PostMortem given enough context about an incident/outage. Will guide user to timeline, action items/bugs, and finally draft a Google Doc with the results.
metadata:
  author: Riccardo Carlesso (creator/maintainer)
  version: 0.0.5
  status: published
# 17apr26: Merged with local copy, bumped to 0.0.5. Combined IRM examples and directory notes.
# 10mar26: Added version
# 26jan26: Reverted Action Items to table format (Timeline remains bullet points).
# 15jan26: Custom Command updated with:
#   1. Bullet points instead of tables for Timeline and Action Items
#   2. Permalink support for commits/bugs (USE PERMALINKS!)
#   3. Red color for milestones in timeline
#   Synced these changes here.
# 13jan26: copied from Custom Command
---
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](https://github.com/gemini-cli-extensions/workspace) to generate a Google Doc from MD.

## Special case: Timeline

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:

```csv
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:

* if <[email protected]> and domain never changes, use "user@" instead.
* If everyone is working on GitHub or GitLab or similar, use username unique to that context (eg github.com/palladius -> "palladius", gitlab.com/ricc2 -> "ricc", ..)
* Remember we're blameless (no fingerpointing) but it's important to track down people identity during the incident (no hiding of names by default! Unless it's necessary for some reason)

Every incident timeline should have at least 3 milestones:

* Start of Incident
* Incident detected
* Mitigation [optional]
* Incident end

Timeline formatting rules:

* ALWAYS use bullet points instead of tables (better readability and page density).
* Mark milestones in red with an ASCII left arrow: `<== <span style="color:red">Milestone Name</span>`
* Abstract the day and TZ at the beginning for better readability, eg:

```markdown
## 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.
```

## Special case: Bug filing

* Ensure you're aware of how user intends to file bugs (eg "File issues on GitHub using gh CLI, and tag them with 'outage' tag")
* Add "[PoMo]" prefix to the bug title, to make it clear this is a PostMortem AI bug.
* **USE PERMALINKS**: When referencing bugs, commits, or other resources, always use full permalinks (e.g., `https://github.com/user/repo/issues/123` for bugs, `https://github.com/user/repo/commit/abc123def` for commits)
* If the ticketing system allows to group tickets together, create a hotlist/ bug group called "postmortem-<unique_incident_id>" and add all bugs to it.
* If ticketing system allows it, ensure this PostMortem Id is injected as some consistent CustomField, so it's easy to extract BI info in the future.

## Sample Postmortem template

Use the following template to create a postmortem document for an incident.

```markdown

# 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.
```

## More resources

* [Postmortem best practices](https://sre.google/workbook/postmortem-culture/)
* [Incident Management](https://sre.google/sre-book/managing-incidents/)

## Additional context

This information should point you to relevant data about the incident, like `incident_id` and such:

```
{{args}}
```

© Riccardo Carlesso (creator/maintainer) · Apache-2.0 · gemini-cli-extensions/sre

Похожие скиллы

Все скиллы по теме «DevOps и инфраструктура» →
write-a-postmortem Inkeep Скилл write-a-postmortem помогает разобрать сбой и составить отчёт по стандартам Google SRE в папке postmortems/. Он исключает обвинения людей и опирается на факты. CX Codex +1 243установок sre-postmortem paulip114 Скилл sre-postmortem для Claude Code помогает составлять и проверять безанкерные постмортемы по методологии Google SRE. Он убирает обвинительные формулировки и формулирует задачи на исправление систем. CX Codex +1 ★ 67звёзд репо postmortem-writer patricio0312rev Скилл postmortem-writer собирает разбор инцидента в готовый документ: таймлайн, корневая причина, задачи с владельцами. Пригодится, пока детали аварии ещё свежи в памяти. CX Codex +1 265установок postmortem-writing Seth Hobson Скилл postmortem-writing помогает разбирать инциденты без поиска виноватых: собрать таймлайн, найти корневые причины и оформить задачи для исправления. CX Codex +1 10 800установок incident-postmortem официальный github Скилл incident-postmortem для GitHub Copilot готовит разбор сбоя в формате Google SRE без поиска виноватых. Запускается по просьбе написать постмортем, RCA или отчёт об outage. CX Codex +1 81установок postmortem Alireza Rezvani Скилл postmortem проводит разбор неудач по методу «5 почему» и фиксирует изменения с ответственными. Пригодится после сорванного запуска, провала функции или неудачного найма. CX Codex +1 1 465установок

Из того же набора17

Весь набор →
postmortem-aggregator Скилл postmortem-aggregator для Claude Code разбирает Post Mortem в папке, рассчитывает показатели сбоев и обновляет POMO_AGGREGATED.md. Помогает находить повторяющиеся причины инцидентов. CX Codex +1 ★ 151звёзд репо gcp-mcp-setup Скилл gcp-mcp-setup для Claude Code, Codex и Gemini CLI автоматизирует подключение Google Managed MCP-серверов (OneMCP) к CLI-окружению. Включает нужные API, генерирует ключи и записывает конфигурацию в нужный файл настроек. CX Codex +1 ★ 151звёзд репо generic-mitigations Скилл generic-mitigations учит ИИ-агента купировать сбои в продакшене типовыми мерами SRE вместо долгих раскопок причин во время аварии. CX Codex +1 ★ 151звёзд репо monitoring-graphs Скилл monitoring-graphs для Claude Code, Codex и Gemini CLI генерирует аннотированные графики инцидентов на Python. Запускается, когда нужно визуализировать сбой, показать скачки ошибок или соотнести метрики с этапами инцидента. CX Codex +1 ★ 151звёзд репо anomaly-detection Скилл anomaly-detection находит аномалии во временных рядах из CSV, мониторинга облака и других источников. Автоматически выбирает алгоритм и параметры сглаживания, или работает по вашим настройкам. CX Codex +1 ★ 151звёзд репо investigation-entrypoint Скилл investigation-entrypoint расследования сбоев в Google Cloud Platform для Claude Code, Codex и Gemini CLI. Координирует диагностику GKE и Cloud Run при инцидентах. CX Codex +1 ★ 151звёзд репо gcp-architecture-discovery Скилл gcp-architecture-discovery обходит GCP-проект от сбойного сервиса и собирает карту зависимостей: compute, сети, базы, бакеты. Результат кладёт в файлы, чтобы следующая сессия не начинала с нуля. CX Codex +1 ★ 151звёзд репо sre-extension Плагин sre-extension для Claude Code помогает расследовать сбои в Google Cloud, разбирать логи и создавать постмортемы. CX Codex ★ 151звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой