agentleFS
okwhrlgma-bitokwhrlgma-bit/library/.claude/skills/incident-response/SKILL.md

incident-response

Skill0 starsChanged 7 months agoApache-2.0View on GitHub

production 사고(다운타임, 에러율 급증, 데이터 손상, 결제 실패, 보안 사고) 발생 시 대응 절차. 분류→완화→근본원인→사후 5단계. 사용자가 "사고", "다운", "에러 폭증", "장애" 등을 언급하거나 모니터링 알람을 처리할 때 사용.

59 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use dora-metrics, cli-development 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.
  • caiaffaSkill

    dora-metrics

    Measure and improve engineering delivery performance using the four DORA metrics — deployment frequency, lead time for changes, change failure rate, and time to restore. Use to assess delivery health and find the next bottleneck.

    Also in 3 projects that use this

  • nimadorostkarSkill

    cli-development

    Use when building command-line tools. Covers argument design, exit codes, streams and piping, progress output, configuration precedence, and behavior that respects the shell.

    Also in 3 projects that use this

  • jessefmooreSkill

    exploit-development

    PoC development, payload crafting, shellcode generation, ROP chains, heap exploitation, bypass techniques for modern mitigations (ASLR, DEP, CFI, stack canaries)

    Also in 3 projects that use this

  • witi-projectsSkill

    react-native-patterns

    Build mobile apps with React Native and Expo — navigation, platform-specific code, performance, and native modules. Use when the user says "/react-native-patterns", "react native patterns", or asks about react native patterns.

    Also in 3 projects that use this

  • mmondoraSkill

    data-modeling

    Schema design, multi-tenant data isolation, and migration management. Firestore and PostgreSQL patterns, RLS, UUID v7 conventions. Use when designing database schemas, writing migrations, or implementing multi-tenant data access.

    Also in 4 projects that use this

  • Robotti-ioSkill

    secure-code-review

    Repeatable process for an application security code review that produces prioritized findings and fix guidance.

    Also in 4 projects that use this

The file

Files
SKILL.md

Incident Response

production이 부서졌을 때 따르는 절차. 머릿속 패닉을 시스템으로 대체합니다.

5단계

1. 분류 (Triage) — 30초
2. 완화 (Mitigate) — 우선
3. 근본 원인 (Root Cause)
4. 영구 수정 (Fix)
5. 사후 (Postmortem)

근본 원인 파악보다 완화가 먼저. "왜?"는 사용자 영향 멈춘 후에.

1. 분류 (30초 안에 결정)

심각도(severity) 분류:

Sev정의예시대응
SEV1사용자 다수가 못 씀사이트 다운, 로그인 불가즉시 대응, 모든 작업 중단
SEV2핵심 기능 일부 망가짐결제 실패 일부, 검색 안 됨즉시 대응, 다른 작업 보류
SEV3영향 작거나 우회 가능비핵심 페이지 에러, UI 깨짐영업 시간 안에 수정
SEV4사용자 영향 거의 없음내부 도구 에러, 로그 노이즈다음 sprint

자율 시스템에서는 무조건 SEV1·SEV2면 사람 호출. Claude는 정보 수집·완화 제안까지.

2. 완화 (Mitigate)

목표: 근본 원인 몰라도 사용자 영향 줄이기.

옵션 (실행 빠른 순):

  1. Feature flag 끄기 (플래그가 있으면, 5초)
  2. 롤백 — 이전 deploy로 (Vercel/Netlify·Render·Fly 등은 1클릭, 1-2분)
  3. 트래픽 우회 (Cloudflare 메인터넌스 페이지)
  4. 수동 데이터 수정 (망친 row 직접 UPDATE — 위험, 백업 후)
  5. 외부 의존성 우회 (Stripe 다운이면 결제 비활성화)

핵심: 완화하면서 타임라인 기록. replays/<date>-incident-<short>.md:

HH:MM 알람 발생
HH:MM 분류 SEV2 (결제 실패율 30%)
HH:MM 가설 1: 새 deploy
HH:MM 롤백 시작
HH:MM 롤백 완료, 결제 정상화

타임라인은 사후 분석의 가장 중요한 데이터.

3. 근본 원인 (Root Cause)

완화 후 시간 여유 생기면:

5 Whys

  • 왜 결제가 실패했나? → API 호출이 timeout
  • 왜 timeout? → DB 쿼리가 30초 걸림
  • 왜? → 인덱스 안 탐
  • 왜? → 신규 컬럼에 인덱스 안 만듦
  • 왜? → migration 체크리스트에 인덱스 항목 없음 → 근본 원인: 프로세스 결함

증거 수집

  • 로그 (사고 시각 ±10분)
  • 메트릭 (응답시간, 에러율, DB 부하)
  • 최근 변경 (deploy, migration, config, 외부 의존성 변경)
  • 에러 트래킹 (Sentry 등) 첫 발생 시각

"근본"이 아닌 답 거부

  • "쿼리가 느렸다" → 그건 증상
  • "코드 버그" → 그것이 어떻게 머지됐나가 근본
  • "사람 실수" → 시스템이 막았어야 하지 않나

4. 영구 수정 (Fix)

근본 원인에 대한 수정 + 재발 방지 시스템.

근본 원인영구 수정 예시
인덱스 누락인덱스 추가 + migration 템플릿에 인덱스 체크리스트
환경변수 미설정startup에서 환경변수 검증, 누락 시 부팅 거부
외부 API 다운회로 차단기(circuit breaker), graceful degradation
코드 버그수정 + 그 패턴 잡는 테스트 추가 + 같은 패턴 다른 곳 검색
deploy 실수CI 체크 추가 + 배포 절차 문서화

한 번 일어난 사고는 시스템으로 막아라. 사람 더 조심하라는 결론은 무효.

5. 사후 (Postmortem)

24-72시간 안에 작성. 비난 없는 톤(blameless).

replays/<date>-incident-<name>.md 또는 decisions.md 항목:

# Incident: <짧은 제목> (<date>)

## 요약
- 영향: <사용자 N명, M분>
- Sev: <1-4>
- 트리거: <무엇이 사고를 시작했나>

## 타임라인
HH:MM ...

## 근본 원인
<5 Whys 결과>

## 영구 수정
- [x] <즉시 수정>
- [ ] <시스템 개선> (#issue-link)

## 학습
<learnings.md에 한 줄 추가할 것>

## 무엇이 잘 됐나
<진짜로 — 모니터링이 빨리 잡았다, 롤백이 빨랐다 등>

## 무엇이 더 빨랐어야 했나
<자동 알람 누락, 수동 단계가 많았다 등>

자동화 정책

  • 자율 시스템은 SEV1·SEV2 발생 시 즉시 멈추고 사람 호출 (notify webhook)
  • 완화 옵션은 제안까지 (롤백·플래그 끄기는 자동 OK 설정 가능)
  • 영구 수정과 사후는 사람과 함께

사람 호출 트리거

  • 에러율 > 5% 30초 이상
  • 응답시간 P95 > 평소의 3배
  • 결제 성공률 < 95% (5분간)
  • 보안 이벤트 (시크릿 노출, 인증 우회)
  • DB 마이그레이션 실패
  • 한 번에 100명 이상 영향

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.