Works with the AI Agents you already use

    Incident Postmortem: Blameless Reports from Slack and Logs

    by a365ngay

    1

    - Causes in three layers: the trigger, the root cause, and the contributing factors in review, testing, detection and response, each labeled Confirmed, Likely or Hypothesis.

    Free

    Security scanned
    Incident Postmortem: Blameless Reports from Slack and Logs

    Incident Postmortem: Blameless Reports from Slack and Logs

    Example session with this skill installed

    Write the postmortem for yesterday's checkout incident (2026-11-12). Slack export from #inc-checkout, times are ICT:

    14:02 deploy-bot: orders-service v2.41.0 deploying to prod (migration 0187_orders_add_index)
    14:04 alertmanager: [FIRING] CheckoutErrorRate > 5% (current 31%)
    14:06 Minh: looking. lots of 500 on POST /checkout, db timeouts
    14:09 Lan: pg shows many queries waiting on lock on orders, migration running CREATE INDEX
    14:11 Minh: can we kill it? not sure if it's safe to cancel mid index build
    14:14 Lan: declaring SEV2, I'm IC
    14:15 Lan: status page updated "investigating checkout errors"
    14:18 Huy (DBA): cancelling is safe, non-concurrent create index will roll back. doing pg_cancel_backend(48213)
    14:19 Huy: cancelled, locks released
    14:20 alertmanager: [RESOLVED] CheckoutErrorRate
    14:23 Minh: error rate back to baseline 0.3%
    14:35 Lan: not rolling back, v2.41.0 doesn't need the index. migration marked failed
    14:40 Lan: status page resolved
    

    Notes: orders ~45M rows. Index build was estimated at 25+ min. Migrations run in the deploy pipeline with no lock_timeout. Staging orders has 200k rows, the migration took 3 s there. ~4,100 checkout attempts failed (logs, 14:03-14:19). Some customers retried. Huy checked payments at 15:10: 0 double charges. Support got 63 tickets.

    • Read your context and instructions
    • Compiled the incident postmortem

    Postmortem: Checkout failed for 16 minutes while a migration blocked writes to orders

    Date2026-11-12
    SeveritySEV2 (as declared by the IC)
    Duration of impact14:03-14:19 ICT (16 min)
    StatusDraft
    Incident commanderDeclared at 14:14 (see timeline)

    Summary

    From 14:03 to 14:19 ICT, about 4,100 checkout attempts failed with HTTP 500. Deploy v2.41.0 of orders-service ran migration 0187_orders_add_index, which built an index on the 45M-row orders table without CONCURRENTLY; that blocks all writes to the table for the whole build, estimated at 25+ minutes. Impact ended when the DBA cancelled the migration at 14:19. The most urgent follow-up: migration 0187 is still pending and will run again on the next deploy unless it is changed first.

    Impact

    • Customers: about 4,100 failed checkout attempts between 14:03 and 14:19 (application logs). Some customers retried; how many later completed an order is unknown (see open questions).
    • Error rate: peak 31 % on checkout (alert at 14:04), baseline 0.3 % (14:23).
    • Payments: 0 double charges (checked by the DBA at 15:10).
    • Support: 63 tickets.
    • Revenue and SLO error budget: not yet calculated.

    Timeline (all times ICT, 2026-11-12)

    TimeEventSource
    14:02Trigger: deploy of orders-service v2.41.0 starts, including migration 0187_orders_add_indexdeploy-bot
    14:03Impact starts: checkout requests begin failingapplication logs (per notes)
    14:04Alert CheckoutErrorRate > 5% fires at 31 %alertmanager
    14:06On-call engineer acknowledges; sees 500s on POST /checkout and database timeouts#inc-checkout
    14:09Cause identified: many queries waiting on a lock on orders; migration running CREATE INDEX#inc-checkout
    14:11Cancelling considered; on-call engineer unsure whether cancelling a running index build is safe#inc-checkout
    14:14SEV2 declared; IC assigned#inc-checkout
    14:15Status page: "investigating checkout errors"#inc-checkout
    14:18DBA confirms a non-concurrent CREATE INDEX rolls back cleanly; runs pg_cancel_backend(48213)#inc-checkout
    14:19Impact ends: migration cancelled, locks released#inc-checkout, logs
    14:20Alert resolvesalertmanager
    14:23Error rate back to baseline 0.3 %#inc-checkout
    14:35Decision: keep v2.41.0 (does not need the index); migration recorded as failed#inc-checkout
    14:40Status page resolved#inc-checkout
    15:10Payments checked: no double chargesnotes

    Response metrics

    MetricValueFrom -> to
    Time to detect1 min14:03 impact -> 14:04 alert
    Time to acknowledge2 min14:04 alert -> 14:06 on-call
    Time to first mitigating action15 min14:03 -> 14:18 cancel
    Time to mitigate16 min14:03 -> 14:19
    Time to resolve37 min14:03 -> 14:40 status page resolved

    Longest gap

    9 minutes between identifying the blocking migration (14:09) and cancelling it (14:18), because nobody on the call knew whether cancelling was safe until the DBA joined. Status page went out 12 minutes after impact started.

    Causes

    Trigger: migration 0187_orders_add_index ran during the v2.41.0 deploy. [Confirmed: deploy log, lock waits seen at 14:09]

    Root cause: the migration built an index with plain CREATE INDEX, which holds a SHARE lock on orders and blocks every insert and update for the entire build. On 45M rows the build was estimated at 25+ minutes, so checkout could not write orders. [Confirmed: impact stopped when it was cancelled]

    Contributing factors

    1. Change management: the migration runner sets no lock_timeout or statement_timeout, so the blocking statement could run indefinitely.
    2. Change management: nothing in review or CI flags locking DDL such as non-concurrent index builds.
    3. Testing: staging orders has 200k rows (about 225x smaller), so the migration took 3 s there and looked harmless.
    4. Response: no runbook for "migration blocking production"; the safe-to-cancel decision waited 9 minutes for a DBA.
    5. Response: SEV declared and status page posted 11-12 minutes into impact.

    Why chain

    1. Why did checkout fail? Inserts into orders waited on a lock and timed out.
    2. Why was there a lock? The migration's CREATE INDEX blocks writes while it builds.
    3. Why was a blocking form used? The default index migration is non-concurrent, and no check or reviewer flagged it.
    4. Why didn't testing catch it? Staging data is too small for the duration to show.
    5. Why did it last 16 minutes? No timeout stopped it, and the cancel decision depended on one person's knowledge.

    What went well

    • The alert fired within a minute of impact.
    • The cause was identified 5 minutes after the alert.
    • Cancelling rolled back cleanly; no data was lost and no customer was double-charged.

    What went wrong

    • Writes to the busiest table were blocked by a routine deploy.
    • 9 minutes of hesitation over whether cancelling was safe.
    • Customers learned about the problem from failures before the status page said anything.

    Where we got lucky

    • A DBA who knew the cancel behavior was reachable within minutes.
    • Migration 0187 has not run again yet; the next deploy would repeat the incident unless it is fixed (A1).

    Action items

    #ActionTypeAddressesPriorityOwner (proposed)Due (proposed)
    A1Change migration 0187 to build the index with CONCURRENTLY outside a transaction; block deploys of orders-service until mergedPreventRoot causeP1Orders teamBefore next deploy
    A2Migration runner sets lock_timeout = 5s and statement_timeout for every migration sessionPreventFactor 1P1Platform team2026-11-19
    A3CI runs a migration linter (for example squawk) and fails on non-concurrent index builds and table rewritesPreventFactor 2P1Platform team2026-11-26
    A4Runbook "Migration blocking production": blocking query, pg_cancel_backend vs pg_terminate_backend, when cancelling is safe; linked from DB lock alertsMitigateFactor 4P2DBA team2026-11-26
    A5Alert on lock waits on the orders database (more than 20 sessions waiting over 60 s)DetectFactor 4P2SRE2026-12-03
    A6Time-boxed spike: estimate migration duration against a production-size snapshot before deployPreventFactor 3P2Platform team2026-12-10
    A7IC checklist: declare severity and post the status page within 5 minutes of a customer-facing alertProcessFactor 5P3Incident process owner2026-12-03

    Owners are proposed by team; confirm in the review.

    Open questions

    • How many of the ~4,100 failed attempts were later completed by the same customers? Needed for the revenue estimate.
    • Which SLO covers checkout, and how much of its monthly error budget was used?
    • What prevented double charges (payment idempotency keys or luck)? Worth confirming, since a retry storm is a likely repeat scenario.
    • Was the index needed by anything already deployed, or can A1 wait for a planned window?

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Write the postmortem in 10 minutes, then spend the review on what to fix. Incident Postmortem turns messy incident material (Slack or Teams threads, alert and deploy logs, on-call notes) into a document your team can learn from.

    From a chat export it builds

    • Timeline in one time zone, every row with its source, including what was known at each decision. Inferred rows are marked as such.
    • Impact with numbers: failed requests, users, orders, tickets, error budget, each with its source or calculation, estimates labeled.
    • Response metrics: time to detect, acknowledge, first mitigating action, mitigate and resolve, plus the longest gap and why.
    • Causes in three layers: the trigger, the root cause, and the contributing factors in review, testing, detection and response, each labeled Confirmed, Likely or Hypothesis. A why chain that asks about the system, not the person.
    • What went well, what went wrong, where we got lucky.
    • Action items typed prevent / detect / mitigate / process, each tied to a cause, with priority, proposed owner and due date. Weak ideas like "tell marketing to warn us" get rewritten into something enforceable. No "be more careful".
    • Open questions instead of invented facts.

    Also does

    • Review an existing postmortem: blame and hindsight language, vague actions, missing impact.
    • Status updates during an incident and customer-facing summaries with no internal names or speculation.

    Blameless by design. Works in any language and writes the whole document in yours.

    Pairs with: DB Migration Safety Reviewer (free): the example incident is a migration that locked the orders table.

    Works only from the material you paste; it does not connect to Slack, PagerDuty or monitoring tools. It never invents times, numbers or causes: anything missing goes to Open questions, and unconfirmed causes are labeled. Owners and due dates are proposals until your team confirms them in the review.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 6 days ago

    • Free with an Agensi account

    Requires

    Nothing to install.

    Permissions

    No special permissions declared or detected

    Listed6 days ago

    What's inside

    Frequently Asked Questions

    Anything you have: Slack or Teams exports, alert and deploy logs, on-call notes, ticket exports, graphs described in words. Mixed time zones and self-corrections are normalized and flagged.

    Each cause is labeled Confirmed, Likely or Hypothesis with its evidence, and an action item is added to verify anything not confirmed. Gaps go to Open questions instead of being guessed.

    People appear by role (on-call engineer, IC, DBA) unless you ask for names, and blame or hindsight phrasing such as 'human error' or 'should have known' is rewritten as conditions and decisions given what was known at the time.

    Yes. Review mode ranks findings (missing impact numbers, root cause that stops at a person, vague or unowned actions, blame language) and rewrites the weak sections.

    Yes. Status updates during an incident state facts, current impact and the next update time without guessing the cause. Customer summaries are plain and accountable, with no internal names, blame or promised dates you did not give.

    Yes. It writes the whole document, including headings and labels, in the language you use, and keeps technical identifiers such as metric names and commands as they are.

    New in DevOps & Cloud

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.

    Free