MCP HubMCP Hub
스킬 목록으로 돌아가기

conduct-post-mortem

pjt222
업데이트됨 Yesterday
5 조회
17
2
17
GitHub에서 보기
메타design

정보

이 스킬은 개인적 책임을 묻지 않고 사고를 조사하기 위해 비난 없는 사후 분석을 수행합니다. 타임라인을 재구성하고 시스템적 기여 요인을 식별하며 실행 가능한 개선점을 도출합니다. 프로덕션 사고, 아슬아슬한 위기 상황 또는 반복적 문제 발생 후에 이를 활용하여 교훈을 도출하고 시스템 복원력을 강화하세요.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/conduct-post-mortem

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

行事後檢討

領無咎之事後檢討,自事件中學並增系統韌性。

適用時機

  • 任何生產事件或服務退化之後
  • 險情或險之事後
  • 調查屢現問題時
  • 跨團隊分享學到者

輸入

  • 必要:事件細節(起訖時、受影響服務、嚴重度)
  • 必要:事件時段之日誌、指標、告警之存取
  • 選擇性:事件應對所用之 runbook
  • 選擇性:通訊日誌(Slack、PagerDuty)

步驟

步驟一:集原始數據

集事件之所有產物:

# Export relevant logs (adjust timerange)
kubectl logs deployment/api-service \
  --since-time="2025-02-09T10:00:00Z" \
  --until-time="2025-02-09T11:30:00Z" > incident-logs.txt

# Export Prometheus metrics snapshot
curl -G 'http://prometheus:9090/api/v1/query_range' \
  --data-urlencode 'query=rate(http_requests_total{job="api"}[5m])' \
  --data-urlencode 'start=2025-02-09T10:00:00Z' \
  --data-urlencode 'end=2025-02-09T11:30:00Z' \
  --data-urlencode 'step=15s' > metrics.json

# Export alert history
amtool alert query --within=2h alertname="HighErrorRate" --output json > alerts.json

預期: 日誌、指標、告警涵全事件時線。

失敗時: 若數據不全,於報中註缺口。下次設更長之保留期。

步驟二:建時線

作按時序之重構:

## Timeline (all times UTC)

| Time     | Event | Source | Actor |
|----------|-------|--------|-------|
| 10:05:23 | First 5xx errors appear | nginx access logs | - |
| 10:06:45 | High error rate alert fires | Prometheus | - |
| 10:08:12 | On-call engineer paged | PagerDuty | System |
| 10:12:00 | Engineer acknowledges alert | PagerDuty | @alice |
| 10:15:30 | Database connection pool exhausted | app logs | - |
| 10:18:45 | Database queries identified as slow | pganalyze | @alice |
| 10:22:10 | Cache layer deployed as mitigation | kubectl | @alice |
| 10:35:00 | Error rate returns to normal | Prometheus | - |
| 10:40:00 | Incident marked resolved | PagerDuty | @alice |

預期: 分鐘至分鐘之清晰序,示何事何時發。

失敗時: 時戳不合。確所有系統用 NTP 且以 UTC 記。

步驟三:識貢獻因

用五問法或魚骨分析:

## Contributing Factors

### Immediate Cause
- Database connection pool exhausted (max 20 connections)
- Query introduced in v2.3.0 deployment lacked index

### Contributing Factors
1. **Monitoring Gap**: Connection pool utilization not monitored
2. **Testing Gap**: Load testing didn't include new query pattern
3. **Runbook Gap**: No documented procedure for DB connection issues
4. **Capacity Planning**: Pool size unchanged despite 3x traffic growth

### Systemic Issues
- No pre-deployment query plan review
- Database alerts only fire on total failure, not degradation

預期: 多層因果已辨,避咎。

失敗時: 若分析止於「某工程師失誤」,深掘。何者容此失誤?

步驟四:生行動項

作具體、可追之改進:

## Action Items

| ID | Action | Owner | Deadline | Priority |
|----|--------|-------|----------|----------|
| AI-001 | Add connection pool metrics to Grafana | @bob | 2025-02-16 | High |
| AI-002 | Create runbook: DB connection saturation | @alice | 2025-02-20 | High |
| AI-003 | Add DB query plan check to CI/CD | @charlie | 2025-03-01 | Medium |
| AI-004 | Review and adjust connection pool size | @dan | 2025-02-14 | High |
| AI-005 | Implement DB slow query alerts (<100ms) | @bob | 2025-02-23 | Medium |
| AI-006 | Add load testing for new query patterns | @charlie | 2025-03-15 | Low |

預期: 每行動有所有人、期限、清晰交付物。

失敗時: 含糊之行動如「改進測試」不會為之。求具體。

步驟五:寫報並發

用此模板結構:

# Post-Mortem: API Service Degradation (2025-02-09)

**Date**: 2025-02-09
**Duration**: 1h 35min (10:05 - 11:40 UTC)
**Severity**: P1 (Critical service degraded)
**Authors**: @alice, @bob
**Reviewed**: 2025-02-10

## Summary
The API service experienced elevated error rates (40% of requests) due to
database connection pool exhaustion. Service was restored by deploying a
cache layer. No data loss occurred.

## Impact
- 40,000 failed requests over 1.5 hours
- 2,000 customers affected
- Revenue impact: ~$5,000 (estimated)

## Root Cause
Query introduced in v2.3.0 deployment performed a full table scan due to
missing index. Under increased load, this saturated the connection pool.

[... timeline, contributing factors, action items as above ...]

## What Went Well
- Alert fired within 90 seconds of first errors
- Mitigation deployed quickly (10 minutes from page to fix)
- Communication to customers was clear and timely

## Lessons Learned
- Database monitoring is insufficient; need connection-level metrics
- Load testing must cover new query patterns, not just volume
- Connection pool sizing hasn't kept pace with traffic growth

## Prevention
See Action Items above.

預期: 報於事件 48 時內與團隊與關係人分享。

失敗時: 若報延超一週,見解陳。優先處事後檢討。

步驟六:於立會/回顧中審行動項

追行動項之進:

# Create GitHub issues from action items
gh issue create --title "AI-001: Add connection pool metrics" \
  --body "From post-mortem PM-2025-02-09. Owner: @bob. Deadline: 2025-02-16" \
  --label "post-mortem,observability" \
  --assignee bob

# Set up recurring reminder
# Add to team calendar: Weekly review of open post-mortem items

預期: 行動項於項目管理工具追蹤,每週審。

失敗時: 若行動項停滯,事件必再現。為高優項指派高管保薦者。

驗證

  • 時線完整且按時序準
  • 多貢獻因已辨(非僅其一)
  • 行動項有所有人、期限、優先級
  • 報用無咎語(無「X 致此患」)
  • 報於 48 時內發予所有關係人
  • 行動項於工單系統追蹤
  • 後續審已排於四週後

常見陷阱

  • 咎責文化:用「誰」代「何/為何」。專於系統,非人
  • 淺分析:止於首因。總問「為何」至少五次
  • 含糊行動項:「改進監控」不可行。「於日 Z 前將指標 X 加入儀表板 Y」可行
  • 無後續:行動項生而從未審。設日曆提醒
  • 畏透明:藏事件減學習。廣傳(於適當安全邊界內)

相關技能

  • write-incident-runbook — 建事件應對中引用之 runbook
  • configure-alerting-rules — 據事後檢討發現改進告警

GitHub 저장소

pjt222/agent-almanac
경로: i18n/wenyan-lite/skills/conduct-post-mortem
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

연관 스킬

content-collections

메타

이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.

스킬 보기

polymarket

메타

이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.

스킬 보기

creating-opencode-plugins

메타

이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.

스킬 보기

sglang

메타

SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.

스킬 보기