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

write-incident-runbook

pjt222
업데이트됨 2 days ago
8 조회
17
2
17
GitHub에서 보기
메타wordai

정보

이 Claude Skill은 구조화된 인시던트 실행 매뉴얼을 생성하여 대응 절차를 표준화하고 개선합니다. 진단 단계, 해결 조치, 에스컬레이션 경로 및 커뮤니케이션 템플릿을 포함한 문서를 작성합니다. 반복적인 알림의 평균 해결 시간(MTTR)을 단축하고, 팀원을 교육하며, 알림을 해결 단계에 직접 연결하는 데 사용하세요.

빠른 설치

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/write-incident-runbook

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

문서

Write Incident Runbook

Actionable runbooks → guide responders through incident diagnosis + resolution.

Use When

  • Doc response procedures for recurring alerts|incidents
  • Standardize response across on-call rotation
  • Reduce MTTR via clear diagnostic steps
  • Training for new team on incident handling
  • Establish escalation paths + comm protocols
  • Migrate tribal knowledge → written
  • Link alerts → resolution (alert annotations)

In

  • Required: Incident|alert name|desc
  • Required: Historical incident data + resolution patterns
  • Optional: Diagnostic queries (Prometheus, logs, traces)
  • Optional: Escalation contacts + comm channels
  • Optional: Prev incident post-mortems

Do

Step 1: Choose Template

See Extended Examples for complete template files.

Select per incident type + complexity.

Basic runbook template structure:

# [Alert/Incident Name] Runbook
## Overview | Severity | Symptoms
## Diagnostic Steps | Resolution Steps
## Escalation | Communication | Prevention | Related

Advanced SRE template (excerpt):

# [Service Name] - [Incident Type] Runbook

## Metadata
- Service, Owner, Severity, On-Call, Last Updated

## Diagnostic Phase
### Quick Health Check (< 5 min): Dashboard, error rate, deployments
### Detailed Investigation (5-20 min): Metrics, logs, traces, failure patterns
# ... (see EXAMPLES.md for complete template)

Key components:

  • Metadata: Service ownership, severity, on-call rotation
  • Diagnostic Phase: Quick checks → detailed → failure patterns
  • Resolution: Immediate mitigation → root cause fix → verify
  • Escalation: Criteria + contact paths
  • Comm: Internal|external templates
  • Prevention: Short|long-term actions

Got: Template selected matches incident complexity, sections appropriate for service type.

If err:

  • Start basic, iterate per incident patterns
  • Review industry examples (Google SRE books, vendor runbooks)
  • Adapt per team feedback after first use

Step 2: Diagnostic Procedures

See Extended Examples for complete diagnostic queries and decision trees.

Step-by-step investigation w/ specific queries.

6-step checklist:

  1. Verify Service Health: Health endpoint + uptime metrics

    curl -I https://api.example.com/health  # Expected: HTTP 200 OK
    
    up{job="api-service"}  # Expected: 1 for all instances
    
  2. Check Error Rate: Current % + breakdown by endpoint

    sum(rate(http_requests_total{status=~"5.."}[5m]))
    / sum(rate(http_requests_total[5m])) * 100  # Expected: < 1%
    
  3. Analyze Logs: Recent errs + top err msgs from Loki

    {job="api-service"} |= "error" | json | level="error"
    
  4. Resource Util: CPU, memory, conn pool status

    avg(rate(container_cpu_usage_seconds_total{pod=~"api-service.*"}[5m])) * 100
    # Expected: < 70%
    
  5. Recent Changes: Deployments, git commits, infra changes

  6. Dependencies: Downstream service health, DB|API latency

Failure pattern decision tree (excerpt):

  • Service down? → Check all pods|instances
  • Error rate elevated? → Check specific err types (5xx, gateway, DB, timeouts)
  • When started? → After deployment (rollback), gradual (resource leak), sudden (traffic|dep)

Got: Diagnostic procedures specific, expected vs actual vals, guides responder.

If err:

  • Test queries in actual monitoring before doc
  • Screenshots of dashboards for visual ref
  • "Common mistakes" section for missed steps
  • Iterate per responder feedback

Step 3: Resolution Procedures

See Extended Examples for all 5 resolution options with full commands and rollback procedures.

Step-by-step remediation w/ rollback.

5 resolution options (brief):

  1. Rollback Deployment (fastest): For post-deployment errs

    kubectl rollout undo deployment/api-service
    

    Verify → Monitor → Confirm (err rate < 1%, latency normal, no alerts)

  2. Scale Up: High CPU|memory, conn pool exhaustion

    kubectl scale deployment/api-service --replicas=$((current * 3/2))
    
  3. Restart Service: Memory leaks, stuck conns, cache corruption

    kubectl rollout restart deployment/api-service
    
  4. Feature Flag | Circuit Breaker: Specific feature errs|external dep failures

    kubectl set env deployment/api-service FEATURE_NAME=false
    
  5. DB Remediation: Conns, slow queries, pool exhaustion

    -- Kill long-running queries, restart connection pool, increase pool size
    

Universal verify checklist:

  • Err rate < 1%
  • Latency P99 < threshold
  • Throughput at baseline
  • Resource healthy (CPU < 70%, Memory < 80%)
  • Deps healthy
  • User-facing tests pass
  • No active alerts

Rollback: Resolution worsens → pause|cancel → revert → reassess

Got: Resolution clear, verify checks, rollback options per action.

If err:

  • Granular steps for complex
  • Screenshots|diagrams for multi-step
  • Doc cmd outs (expected vs actual)
  • Separate runbook for complex resolution

Step 4: Escalation Paths

See Extended Examples for full escalation levels and contact directory template.

When + how to escalate.

Escalate immediately:

  • Customer-facing outage > 15 min
  • SLO err budget > 10% depleted
  • Data loss|corruption|security breach suspected
  • Can't ID root cause in 20 min
  • Mitigation fails|worsens

5 escalation levels:

  1. Primary On-Call (5 min response): Deploy fixes, rollback, scale (up to 30 min solo)
  2. Secondary On-Call (auto after 15 min): Investigation support
  3. Team Lead (architectural): DB changes, vendor escalation, > 1 hour
  4. Incident Commander (cross-team): Multi teams, customer comms, > 2 hours
  5. Executive (C-level): Major impact (>50% users), SLA breach, media|PR, > 4 hours

Process:

  1. Notify target: status, impact, actions taken, help needed, dashboard link
  2. Handoff: timeline, actions, access, remain available
  3. No silence: update every 15 min, ask questions, feedback

Contact directory: Table w/ role, Slack, phone, PagerDuty for:

  • Platform|DB|Security|Network teams
  • Incident Commander
  • External vendors (AWS, DB vendor, CDN provider)

Got: Clear escalation criteria, contact info accessible, paths align w/ org.

If err:

  • Validate contact current (test quarterly)
  • Decision tree for when to escalate
  • Examples of escalation msgs
  • Doc response time per level

Step 5: Comm Templates

See Extended Examples for all internal and external templates with full formatting.

Pre-written msgs for incident updates.

Internal (Slack #incident-response):

  1. Initial Declaration:

    🚨 INCIDENT: [Title] | Severity: [Critical/High/Medium]
    Impact: [users/services] | Owner: @username | Dashboard: [link]
    Quick Summary: [1-2 sentences] | Next update: 15 min
    
  2. Progress Update (every 15-30 min):

    📊 UPDATE #N | Status: [Investigating/Mitigating/Monitoring]
    Actions: [what we tried and outcomes]
    Theory: [what we think is happening]
    Next: [planned actions]
    
  3. Mitigation Complete:

    ✅ MITIGATION | Metrics: Error [before→after], Latency [before→after]
    Root Cause: [brief or "investigating"] | Monitoring 30min before resolved
    
  4. Resolution:

    🎉 RESOLVED | Duration: [time] | Root Cause + Impact + Follow-up actions
    
  5. False Alarm: No impact, no follow-up

External (status page):

  • Initial: Investigating, started time, next update in 15 min
  • Progress: ID'd cause (customer-friendly), implementing fix, est resolution
  • Resolution: Resolved time, root cause (simple), duration, prevention

Customer email template: Timeline, impact, resolution, prevention, compensation (if applicable)

Got: Templates save time, consistent comm, reduce cognitive load on responders.

If err:

  • Customize to company comm style
  • Pre-fill w/ common incident types
  • Slack workflow|bot to populate auto
  • Review during retrospectives

Step 6: Link Runbook → Monitoring

See Extended Examples for complete Prometheus alert configuration and Grafana dashboard JSON.

Integrate w/ alerts + dashboards.

Add runbook links to Prometheus alerts:

- alert: HighErrorRate
  annotations:
    runbook_url: "https://wiki.example.com/runbooks/high-error-rate"
    dashboard_url: "https://grafana.example.com/d/service-overview"
    incident_channel: "#incident-platform"

Embed quick diagnostic links in runbook:

  • Service Overview Dashboard
  • Error Rate Last 1h (Prometheus direct link)
  • Recent Error Logs (Loki|Grafana Explore)
  • Recent Deployments (GitHub|CI)
  • PagerDuty Incidents

Grafana dashboard panel w/ runbook links (md panel listing all incident runbooks w/ on-call + escalation)

Got: Responders access runbooks direct from alerts|dashboards, diagnostic queries pre-filled, one-click access.

If err:

  • Verify URLs accessible w/o VPN|login
  • URL shorteners for complex Grafana|Prometheus
  • Test links quarterly → no break
  • Browser bookmarks for frequent

Check

  • Runbook follows consistent template
  • Diagnostic procedures w/ specific queries + expected vals
  • Resolution actionable w/ clear cmds
  • Escalation criteria + contacts current
  • Comm templates for internal + external
  • Linked from monitoring alerts + dashboards
  • Tested during incident sim or actual
  • Responder feedback incorporated
  • Revision history tracked w/ dates + authors
  • Accessible w/o auth (or cached offline)

Traps

  • Too generic: Vague "check the logs" w/o specific queries → not actionable. Specific.
  • Outdated: Refs old systems|cmds → useless. Quarterly review.
  • No verify: Resolution w/o verify → false positives. "How to confirm fixed."
  • Missing rollback: Every action → rollback plan. Don't trap responders worse state.
  • Assume knowledge: Expert-only → excludes juniors. Write for least experienced on rotation.
  • No ownership: No owners → stale. Assign team|person responsible.
  • Hidden behind auth: Inaccessible during VPN|SSO issues → useless during crisis. Cache copies or public wiki.

  • configure-alerting-rules — Link runbooks to alert annotations for immediate access
  • build-grafana-dashboards — Embed runbook links in dashboards + diagnostic panels
  • setup-prometheus-monitoring — Diagnostic queries from Prometheus in runbook procedures
  • define-slo-sli-sla — Reference SLO impact in incident severity classification

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman-ultra/skills/write-incident-runbook
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을 선택하십시오.

스킬 보기