postmortem-draft

Drafts incident postmortem PRs by correlating channel timelines with GitHub deploys and Datadog spikes.

20.2k|3.4k|Updated Oct 5, 2024
One-click install
npx skills add https://github.com/kortix-ai/suna --skill postmortem-draft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postmortem-draft
Source: https://github.com/kortix-ai/suna/tree/main/packages/starter/templates/marketplace/runtime/skills/postmortem-draft
Command: npx skills add https://github.com/kortix-ai/suna --skill postmortem-draft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

After an incident is resolved, writing the postmortem is tedious and often delayed until details are forgotten. This Skill automatically reconstructs the incident timeline and drafts a structured postmortem as a pull request while the evidence is still fresh, without ever publishing conclusions on its own.

Core Features & Use Cases

  • Periodic incident sweep: Scans the incident channel for newly resolved incidents and skips any that already have a draft postmortem PR, handling each incident independently.
  • Multi-source timeline correlation: Aligns the incident channel thread with GitHub merges/deploys and Datadog error-rate and latency spikes over the incident window to propose a causal chain.
  • Structured draft PR: Writes a postmortem matching the repo's existing format (summary, timeline, proposed root cause, impact, candidate action items) and opens one labeled PR per incident.
  • Use Case: An on-call team resolves a production outage in their incident channel; the next sweep detects the resolution, correlates a deploy that landed minutes before the first Datadog latency spike, and opens a draft postmortem PR for the team to review and finalize.

Quick Start

Ask the agent to draft a postmortem for the incident that was just marked resolved in the incident channel.

Frequently Asked Questions about postmortem-draft

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically draft an incident postmortem?

Run the periodic sweep or ask the agent to draft a postmortem for a specific resolved incident. It reads the incident channel thread, correlates GitHub deploys and Datadog spikes over the incident window, and opens a draft postmortem PR in the target repository.

How does the postmortem draft correlate deploys with incidents?

It lists GitHub merges and deploys within the incident start-to-resolved window using git log and gh pr list, then lines them up against Datadog error-rate and latency spike onset times. A deploy landing just before the first symptom is flagged as the leading root-cause candidate.

Can the agent publish or merge the postmortem itself?

No. The agent only opens a draft pull request and never pushes to main or merges. Root cause and action items are explicitly marked as proposed inferences, and a human reviews, edits, assigns owners, and merges.

What happens if a postmortem draft already exists for an incident?

The sweep checks the target repository for existing PRs or branches carrying the incident id before drafting. Incidents that already have a draft are skipped, so duplicate postmortems are never opened unless a human explicitly asks to extend one.

What tools does the postmortem workflow require?

It requires read access to the incident channel, the GitHub CLI (gh) and git for deploy and PR history, and Datadog for error-rate and latency metrics. Credentials are injected into the sandbox at runtime, scoped to the agent's grant.