Chuyển đến nội dung
Skillpedia
Viết lách40k · #7250

incident-postmortem

Skill này làm gì

Agent này giúp bạn lập một báo cáo chi tiết về các sự cố xảy ra trong một hệ thống hoặc dịch vụ. Trọng tâm là hiểu chuyện gì đã xảy ra, vì sao, và làm sao để không tái diễn, mà không đổ lỗi cho ai.

Khi nào nên dùng

  • ✓Khi dịch vụ bị gián đoạn hoặc chậm đáng kể.
  • ✓Khi một lỗi nghiêm trọng ảnh hưởng đến nhiều người dùng.
  • ✓Khi bạn muốn ghi lại bài học rút ra sau một sự cố lớn.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/skills/incident-postmortem/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/incident-postmortem/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy viết báo cáo sau sự cố về việc hôm qua website bị ngừng hoạt động trong 2 giờ.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent thu thập thông tin về sự cố, như thời điểm bắt đầu và kết thúc, những gì bị ảnh hưởng và nguyên nhân gốc. Sau đó, agent sắp xếp thông tin này thành một tài liệu có cấu trúc, tập trung vào việc học hỏi và cải thiện trong tương lai.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Incident Post-Mortem

Guide a team through writing a structured, blameless post-mortem after a production incident. The output is a document that builds shared understanding, identifies root causes without blame, and produces concrete action items to prevent recurrence.

Blameless Principle

Systems fail, not people. The goal is to understand HOW the incident happened — not WHO caused it. Avoid language like "X forgot to", "Y should have known". Use "the system did not", "the process lacked", "the alert did not fire".

When to Use

  • Production outage or service degradation has been resolved
  • A significant near-miss occurred (would have been an incident if caught later)
  • User-facing errors, data loss, or SLA breach happened
  • Team wants to capture learnings before context fades

Not for: Minor bugs caught in staging, planned maintenance windows, or incidents with no learning value.

Input Requirements

Gather these details before writing the post-mortem. Ask for anything missing:

Incident Metadata

  • Incident title (short, descriptive)
  • Date and time of detection (with timezone)
  • Date and time of resolution
  • Severity / impact level (P1–P4 or equivalent)
  • Incident commander / on-call owner

Impact

  • Affected services and systems
  • User-facing impact (errors, slowness, full outage)
  • Estimated number of users affected
  • Data loss or corruption (yes/no, scope)
  • SLA/SLO breach (yes/no, by how much)

Timeline Events

Key moments to reconstruct:

  • First symptom occurred
  • Alert fired (or was noticed manually)
  • On-call paged / incident declared
  • Investigation started
  • Root cause identified
  • Mitigation applied
  • Full resolution confirmed
  • Customer communication sent (if any)

Contributing Factors

Ask the team: "What made this worse than it needed to be?" — not "who failed". Examples:

  • Alert threshold too high / alert didn't fire
  • Runbook was missing or outdated
  • Deploy lacked a feature flag for rollback
  • Monitoring didn't cover this failure mode
  • On-call handoff missed context

Process

Step 1 — Gather Metadata

If the user has not provided full incident details, ask for them section by section. Don't proceed to writing until you have: title, times, severity, affected services, and at least a rough timeline.

Step 2 — Reconstruct Timeline

Work with the user to build a precise chronological timeline. For each event:

  • Exact time (UTC preferred)
  • What happened (system event or human action)
  • Who observed it or took the action
  • Link to log / alert / Slack message if available

Flag gaps: "We don't know what happened between 14:32 and 14:47 — worth checking logs."

Step 3 — Root Cause Analysis

Use the 5 Whys iteratively:

Why did users see 500 errors?
→ The API pods were crash-looping.

Why were they crash-looping?
→ Memory limit was exceeded.

Why was the limit exceeded?
→ A new query was loading full result sets into memory.

Why wasn't this caught before deploy?
→ Load tests only covered the p50 case, not high-cardinality accounts.

Why did load tests only cover p50?
→ We had no test fixtures for large accounts.

Stop when you reach a system/process gap you can fix. The last "why" should point to an action item.

Distinguish:

  • Root cause — the deepest systemic gap (one or two)
  • Contributing factors — conditions that made it worse but aren't the root cause

Step 4 — Impact Quantification

Help the user be precise:

  • Duration: detection to resolution (not symptom start to resolution — separate these)
  • Error rate at peak vs. normal baseline
  • Percentage of traffic affected
  • Revenue / business impact if known

Step 5 — Action Items

For each root cause and contributing factor, generate at least one action item:

# Action Owner Due Date Priority
1 Add load test fixtures for accounts > 10k records @eng-team 2026-07-01 High
2 Lower memory alert threshold from 90% to 75% @platform 2026-06-23 High
3 Add runbook for memory OOM pods @on-call-rotation 2026-06-30 Medium

Action items must have an owner (a person, not a team) and a due date. Vague actions like "improve monitoring" are not acceptable — break them into specific deliverables.

Step 6 — Write the Document

Produce the full post-mortem using the template below. Save to docs/postmortems/YYYY-MM-DD-<slug>.md.

Output Template

# Post-Mortem: [Incident Title]


…
Câu hỏi thường gặp

“Blameless” nghĩa là gì?

Nghĩa là trọng tâm nằm ở việc tìm hiểu lỗi của hệ thống hoặc quy trình, không chỉ tay vào từng cá nhân. Mục tiêu là học từ sự việc để cải thiện hệ thống.

Tôi cần cung cấp những thông tin nào?

Bạn cần cung cấp các chi tiết như tiêu đề sự cố, thời điểm bắt đầu và kết thúc, tác động đến người dùng và dịch vụ, cùng dòng thời gian các sự kiện quan trọng.

“Action Items” là gì?

Đó là các công việc cụ thể, rõ ràng cần làm để khắc phục nguyên nhân gốc và ngăn sự cố lặp lại. Mỗi việc có người phụ trách và hạn hoàn thành.

Chi tiết

Mô tả gốc của tác giả

Use when an outage, production incident, or significant service degradation has occurred and the team needs to write a structured blameless post-mortem. Triggers on phrases like "write a post-mortem", "incident review", "what went wrong", "outage report", "root cause analysis", or "RCA". Covers timeline reconstruction, contributing factor analysis, impact quantification, and action item generation

repo: github/awesome-copilot

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7250
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự