一键导入
incident-response
Structured incident response and diagnosis workflows
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Structured incident response and diagnosis workflows
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
GitOps workflows with ArgoCD for Kubernetes deployments
AWS operations, queries, and resource management
Cloud cost analysis and optimization strategies
Docker container operations and debugging
Git workflows, branching strategies, and DevOps practices
Kubernetes debugging and troubleshooting workflows
| name | incident-response |
| description | Structured incident response and diagnosis workflows |
| homepage | https://sre.google/sre-book/managing-incidents/ |
| metadata | {"emoji":"🚨","version":"1.0.0","author":"Gourav Shah","license":"MIT","requires":{"any_bins":["kubectl","docker","aws"]},"tags":["incidents","sre","troubleshooting","on-call"]} |
Structured workflow for diagnosing and resolving production incidents.
Use this skill when:
Goal: Assess severity and impact.
| Severity | Impact | Response |
|---|---|---|
| SEV1 | Complete outage, all users affected | All hands, exec notification |
| SEV2 | Major feature broken, many users affected | Primary + backup on-call |
| SEV3 | Minor feature broken, some users affected | Primary on-call |
| SEV4 | No user impact, potential issue | Next business day |
Goal: Collect data to understand the problem.
# Cluster health overview
kubectl get nodes
kubectl get pods -A | grep -v Running | grep -v Completed
# Recent events
kubectl get events -A --sort-by='.lastTimestamp' | tail -30
# Check specific service
kubectl get pods -l app=<service-name> -o wide
kubectl logs -l app=<service-name> --tail=100
# Recent deployments
kubectl get deployments -A -o custom-columns=\
'NAMESPACE:.metadata.namespace,NAME:.metadata.name,UPDATED:.metadata.creationTimestamp' \
| sort -k3 -r | head -10
# Git history (if in repo)
git log --oneline --since="2 hours ago"
# If Prometheus available
# Check error rates, latency, traffic
# If CloudWatch
aws cloudwatch get-metric-statistics \
--namespace <namespace> \
--metric-name <metric> \
--start-time $(date -u -v-1H +%Y-%m-%dT%H:%M:%SZ) \
--end-time $(date -u +%Y-%m-%dT%H:%M:%SZ) \
--period 60 \
--statistics Average
Goal: Identify root cause.
Is there a recent deployment?
├── Yes → Check deployment logs, consider rollback
└── No → Continue
Are pods crashing?
├── Yes → Check logs: kubectl logs <pod> --previous
└── No → Continue
Are resources exhausted?
├── Yes → Scale up or optimize
└── No → Continue
Is an external dependency failing?
├── Yes → Check dependency status, implement fallback
└── No → Continue
Is there a traffic spike?
├── Yes → Scale up, enable rate limiting
└── No → Escalate for deeper investigation
Goal: Restore service, even if root cause unknown.
Rollback Deployment:
# Kubernetes rollback
kubectl rollout undo deployment/<name> -n <namespace>
kubectl rollout status deployment/<name> -n <namespace>
Scale Up:
# Increase replicas
kubectl scale deployment/<name> --replicas=5 -n <namespace>
Restart Pods:
# Rolling restart
kubectl rollout restart deployment/<name> -n <namespace>
Toggle Feature Flag:
# If feature flags available, disable problematic feature
Redirect Traffic:
# If multiple regions, redirect away from affected region
Goal: Keep stakeholders informed.
**Incident Update - [SERVICE] - [SEV LEVEL]**
**Status:** Investigating / Identified / Mitigating / Resolved
**Impact:** [Who/what is affected]
**Start Time:** [When it started]
**Current Actions:** [What we're doing]
**Next Update:** [When to expect next update]
---
Incident Commander: [Name]
| Severity | Update Frequency |
|---|---|
| SEV1 | Every 15 minutes |
| SEV2 | Every 30 minutes |
| SEV3 | Every hour |
| SEV4 | End of day |
Goal: Confirm service is restored.
**Incident Resolved - [SERVICE]**
**Duration:** [Start] to [End] ([X] minutes)
**Root Cause:** [Brief description]
**Resolution:** [What fixed it]
**Follow-ups:** [Links to action items]
Post-mortem scheduled: [Date/Time]
# Incident Post-Mortem: [Title]
**Date:** [Date]
**Duration:** [Duration]
**Severity:** [SEV Level]
**Authors:** [Names]
## Summary
[2-3 sentence summary]
## Impact
- Users affected: [Number/percentage]
- Revenue impact: [If applicable]
- SLA impact: [If applicable]
## Timeline
- HH:MM - [Event]
- HH:MM - [Event]
- HH:MM - [Event]
## Root Cause
[Detailed explanation]
## Resolution
[How it was fixed]
## Lessons Learned
### What went well
- [Item]
### What could be improved
- [Item]
## Action Items
- [ ] [Action] - Owner: [Name] - Due: [Date]
- [ ] [Action] - Owner: [Name] - Due: [Date]
# Quick cluster health
kubectl get nodes && kubectl get pods -A | grep -v Running
# Service status
kubectl get pods,svc,endpoints -l app=<service>
# Recent events
kubectl get events --sort-by='.lastTimestamp' | tail -20
# Quick logs
kubectl logs -l app=<service> --tail=50 --all-containers
Document your escalation path: