agentleFS
MakiDevelopMakiDevelop/claude-skills/skills/postmortem/SKILL.md

postmortem

Skill3 starsChanged 8 months agoMITView on GitHub

事故記錄。收集資訊、分析 root cause、記錄修復步驟、防止再發。當服務出事故後使用。

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use hypothesis-driven-debugging, status-report and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Sturla22Skill

    hypothesis-driven-debugging

    Debug by ranking concrete hypotheses and running discriminating checks. Use when a bug is hard to localize, many plausible failure points exist, logs are noisy or misleading, a symptom appears intermittently, or trial-and-error edits haven't worked.

    Also in 3 projects that use this

  • AnthropicSkill

    status-report

    Generate a status report with KPIs, risks, and action items. Use when writing a weekly or monthly update for leadership, summarizing project health with green/yellow/red status, surfacing risks and decisions that need stakeholder attention, or turning a pile of project tracker activity into a readable narrative.

    Also in 3 projects that use this

  • seongjaeryuSkill

    organize

    Organize knowledge into Sets

    Also in 3 projects that use this

  • SaluteYBSkill

    skill-eval

    Evaluate, tune, and regression-check AgentSkills. Use when creating a new skill or improving an existing one and you need structured should-trigger, should-not-trigger, boundary-case, and execution-quality examples. Also use when auditing overlapping skills and sharpening trigger descriptions before release.

    Also in 3 projects that use this

  • neurofooSkill

    premortem

    Pre-mortem analysis that imagines a plan has failed, then works backward to identify causes and preventions. Use before launches, major decisions, or risky initiatives to surface hidden risks.

    Also in 3 projects that use this

  • AnthropicSkill

    incident-response

    Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.

    Also in 4 projects that use this

The file

Files
SKILL.md

事故記錄(Postmortem)

目標

快速記錄事故,結構化分析 root cause,防止重複犯錯。

流程

Step 1: 收集資訊

詢問用戶(或從上下文取得):

  • 什麼壞了?
  • 什麼時候發現的?
  • 影響範圍?(用戶數、持續時間、資料損失?)

Step 2: 分析 root cause

  • 觸發的命令或操作
  • 錯誤訊息
  • 為什麼會走到這一步(5 Whys)

若有 repo,自動檢查:

  • git log --oneline -10 看最近改動
  • 搜尋相關錯誤訊息

Step 3: 記錄修復步驟

  • 怎麼修好的
  • 花了多久
  • 是否有 workaround 還是根本修復

Step 4: 寫入檔案

追加到當前專案的 logs/errors.md(沒有就建立),格式:

## YYYY-MM-DD: [簡述問題]

**影響**:[影響範圍和持續時間]
**觸發**:[什麼操作觸發的]
**錯誤**:[錯誤訊息]
**Root Cause**:[根本原因]
**修復**:[修復步驟]
**防止再發**:[應該怎麼避免]
**Timeline**:
- HH:MM 發現問題
- HH:MM 開始修復
- HH:MM 恢復正常

Step 5: 提出預防建議

  • 如果這類問題之前發生過,指出來
  • 建議加入自動化防護(CI check、monitoring、alert)
  • 建議更新文件(CLAUDE.md、README、runbook)

Quality Gates

  • Root cause 不是「設定錯誤」這種表面原因,要挖到為什麼會設定錯誤
  • 修復步驟可重現(別人照做也能修)
  • 防止再發有具體動作(不是「以後注意」)
  • Timeline 完整(從發現到恢復)

Heuristics

  • 事故後 24 小時內記錄,記憶最清楚
  • 以 log、時間線與重現結果查核原因;5 Whys 是可選工具,不強求五次或單一根因
  • 防止再發優先考慮自動化(人的注意力不可靠)
  • Blameless:記錄事實和流程,不指責個人

Evidence boundaries

Label confirmed causes, hypotheses and unknowns separately. Cite log timestamps, revisions or reproducible checks. If not resolved, record status as unresolved; never fill the repair timeline with invented actions. Redact secrets and personal data before writing logs/errors.md. Incident analysis does not authorize deploys, restarts, commits or changes to global agent instructions.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.