incident-postmortem
它能做什么
这个智能体可以帮你写一份关于系统或服务故障的详细报告。它重点在于弄清楚发生了什么、为什么会发生,以及如何防止它再次发生,并且不追究任何人的责任。
适用场景
- ✓当服务宕机或者明显变慢之后。
- ✓当一个严重错误影响了大量用户的时候。
- ✓当重大问题处理完毕,想记录经验教训的时候。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/incident-postmortem/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我写一份昨天的故障复盘报告,那次网站宕机了 2 个小时。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会收集故障相关的信息,比如故障开始和结束的时间、受影响的范围,以及根本原因。然后它把这些信息整理成一份结构清晰的文档,重点放在总结经验和后续改进上。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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]
…
常见问题
“blameless(无责备)”是什么意思?
意思是重点在于理解系统或流程为什么会出问题,而不是去指责某个人。目标是从故障中吸取经验,改进系统。
我需要提供哪些信息?
你需要提供一些细节,比如故障标题、开始和结束时间、对用户和服务的影响,以及关键事件的时间线。
什么是“Action Items(行动项)”?
这些是具体、可执行的任务,用来解决故障的根本原因,防止问题再次发生。每一项都要有负责人和截止日期。
详情
作者的原始描述
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
热度
- GitHub 星标
- 40k
- 排名
- #7250
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。