Incident Postmortem Generator logo

Incident Postmortem Generator

Community
ricmmartins
incident-postmortem-generator

Generate a blameless incident postmortem from the current or recent SRE Agent investigation. Use after an incident is resolved, when asked for a postmortem, RCA report, incident review, or lessons learned document.

Overview

Publisherricmmartins
Repositoryazure-sre-agent-skills
Skill nameincident-postmortem-generator
Stars
70
Forks
14
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ricmmartins on GitHub. Read the source before you install it.

Installation

Install the Incident Postmortem Generator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ricmmartins/azure-sre-agent-skills/tree/main/skills/05-incident-postmortem
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ricmmartins/azure-sre-agent-skills.git /tmp/azure-sre-agent-skills
mkdir -p .claude/skills
cp -r /tmp/azure-sre-agent-skills/skills/05-incident-postmortem .claude/skills/incident-postmortem-generator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Incident Postmortem Generator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Incident Postmortem Generator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Incident Postmortem Generator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Incident Postmortem Generator

Purpose

Automatically generate a structured, blameless postmortem document from the context of a resolved incident investigation. Leverages the timeline, root cause analysis, and mitigations already gathered by the SRE Agent.

When to use this skill

  • User asks for a postmortem after an incident is resolved
  • User asks for an RCA report, incident review, or lessons learned
  • Automated trigger after incident resolution (via agent hook)
  • User asks "write up what just happened"

Postmortem principles

  • Blameless: Focus on systems and processes, never individuals
  • Evidence-based: Every claim backed by data (logs, metrics, timeline)
  • Action-oriented: Every finding leads to a concrete action item
  • Learning-focused: What can we improve systemically?

Generation procedure

Step 1: Gather incident context

From the current conversation and agent memory, extract:

  1. Incident metadata:

    • Incident ID (from PagerDuty/ServiceNow if connected)
    • Severity level
    • Duration (detection to resolution)
    • Affected services and resources
    • Impacted users/customers (if known)
  2. Timeline: Reconstruct from the investigation:

    • When did the issue start? (first anomaly in metrics)
    • When was it detected? (alert fired)
    • When was it acknowledged? (engineer engaged)
    • Key investigation milestones
    • When was mitigation applied?
    • When was full resolution confirmed?
  3. Root cause: From the agent's RCA:

    • What failed?
    • Why did it fail?
    • Contributing factors
  4. Mitigation applied: What was done to resolve it?

Step 2: Assess detection and response

Analyze the incident response quality:

  1. Time to detect (TTD): From issue start to alert firing

    • Was this acceptable? Could monitoring have caught it earlier?
  2. Time to acknowledge (TTA): From alert to human engagement

    • Were on-call rotations effective?
  3. Time to mitigate (TTM): From engagement to mitigation

    • Was the runbook adequate? Did the team have the right access?
  4. Time to resolve (TTR): Total duration

    • Compare with SLA/SLO targets

Step 3: Five Whys analysis

Apply the 5 Whys technique to the root cause:

1. Why did the service return 500 errors?
   → The application pod was OOM-killed
2. Why was the pod OOM-killed?
   → Memory usage exceeded the 512Mi limit
3. Why did memory usage spike?
   → A new dependency introduced a memory leak in the connection pool
4. Why wasn't the leak caught before production?
   → Load testing doesn't cover the connection pool under sustained load
5. Why doesn't load testing cover this scenario?
   → Load test profiles haven't been updated since the architecture change

Step 4: Generate action items

For each finding, create a SMART action item:

IDActionOwnerPriorityDue dateStatus
AI-1Add memory-based autoscaling to payment-servicePlatform teamHigh+7 daysOpen
AI-2Update load test to include sustained connection pool scenariosQA teamHigh+14 daysOpen
AI-3Add memory utilization alert at 80% thresholdSRE teamMedium+3 daysOpen
AI-4Review connection pool settings across all servicesDev teamMedium+14 daysOpen

Categories:

  • Prevent recurrence: Fix the root cause
  • Improve detection: Better monitoring/alerting
  • Improve response: Better runbooks/automation
  • Improve resilience: Architectural improvements

Step 5: Compile the postmortem document

Accepted exceptions (optional)

If the user provides a list of accepted exceptions, do not flag those items. Instead, note them in the report as Accepted Exception with the reason provided.

Example format the user may provide:

CheckReason
Time to detectAlert delay was due to a known monitoring gap being addressed in AI-3
Five Whys depthRoot cause was an external provider outage, further analysis not applicable
Missing runbookService is new, runbook creation is tracked in AI-5

When exceptions are provided:

  • Skip the flagged checks in scoring
  • List them in a separate "Accepted Exceptions" section at the end of the report
  • Recalculate the overall score excluding excepted checks

Expected output

Report header (mandatory — use this exact format)

Incident Postmortem Report

FieldValue
Subscription(name + ID)
Incident DateYYYY-MM-DD
SeveritySev-X
DurationXh Ym
StatusDraft — pending team review

Postmortem document structure

markdown
# Incident Postmortem: [Title]

## Executive summary
[2-3 sentences: what happened, impact, resolution]

## Impact
- **Services affected**: [list]
- **User impact**: [description and scope]
- **SLA/SLO impact**: [metrics affected]
- **Business impact**: [revenue, reputation, etc. if known]

## Timeline (all times UTC)

| Time | Event |
|------|-------|
| HH:MM | First anomaly detected in metrics |
| HH:MM | Alert fired: [alert name] |
| HH:MM | On-call engineer acknowledged |
| HH:MM | Investigation started |
| HH:MM | Root cause identified |
| HH:MM | Mitigation applied |
| HH:MM | Service fully recovered |

## Root cause
[Detailed technical explanation]

## Five Whys
[Analysis chain]

## Detection & response assessment

| Metric | Value | Target | Assessment |
|--------|-------|--------|------------|
| Time to detect | Xm | <5m | ✅/⚠️/❌ |
| Time to acknowledge | Xm | <15m | ✅/⚠️/❌ |
| Time to mitigate | Xm | <30m | ✅/⚠️/❌ |
| Time to resolve | Xm | <2h | ✅/⚠️/❌ |

## What went well
- [Positive aspects of the response]

## What could be improved
- [Areas for improvement]

## Action items
[Table from Step 4]

## Lessons learned
- [Key takeaways for the team]

---
*This postmortem was auto-generated by Azure SRE Agent and should be reviewed by the incident team before publishing.*

Delivery

  • Output the full document in the chat
  • If Teams connector is available, offer to post to the incident channel
  • If ServiceNow/PagerDuty is connected, offer to attach to the incident record
  • Suggest scheduling a postmortem review meeting

References

Sample output

The following is a redacted example of what the report looks like after an incident is resolved.

Incident Postmortem Report

FieldValue
Subscriptioncontoso-prod-001 (a1b2c3d4-e5f6-7890-abcd-ef1234567890)
Incident Date2026-07-10
SeveritySev-2
Duration1h 23m
StatusDraft — pending team review

Executive summary

The payment-service API returned HTTP 500 errors for 1h 23m due to an OOM-killed pod in AKS cluster aks-app-prod. Root cause was a memory leak in the connection pool introduced in release v2.14.0. Impact: ~340 failed transactions affecting 120 customers.

Timeline (all times UTC)

TimeEvent
14:12Memory usage spike detected on payment-service pod
14:18Alert fired: "Pod OOM-killed in aks-app-prod"
14:22On-call engineer acknowledged
14:35Root cause identified: connection pool memory leak
14:50Mitigation applied: rolled back to v2.13.2
15:35Service fully recovered, error rate at 0%

Detection & response assessment

MetricValueTargetAssessment
Time to detect6m<5m⚠️
Time to acknowledge4m<15m✅
Time to mitigate28m<30m✅
Time to resolve1h 23m<2h✅

Action items (sample)

IDActionOwnerPriorityDue
AI-1Add memory-based HPA to payment-servicePlatform teamHigh+7 days
AI-2Update load test for sustained connection pool scenariosQA teamHigh+14 days
AI-3Add memory utilization alert at 80% thresholdSRE teamMedium+3 days

Frequently asked questions

What does the Incident Postmortem Generator AI skill do?

Generate a blameless incident postmortem from the current or recent SRE Agent investigation. Use after an incident is resolved, when asked for a postmortem, RCA report, incident review, or lessons learned document.

Why use Incident Postmortem Generator on TypingMind?

Because you install it once and use it with any model. Incident Postmortem Generator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Incident Postmortem Generator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ricmmartins/azure-sre-agent-skills/tree/main/skills/05-incident-postmortem. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Incident Postmortem Generator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Incident Postmortem Generator?

As many as you like. As long as a model supports skills, you can use Incident Postmortem Generator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Incident Postmortem Generator AI skill free?

Yes. It is published on GitHub by ricmmartins under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇