agentleFS
vndeevndee/engineering-skills/.claude/skills/incident-response/SKILL.md

incident-response

Skill3 starsChanged 9 months agoMITView on GitHub

Use when production is broken, a service is down, or a critical bug is affecting users — structured incident management and postmortem

  • Commits and pushes

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 9 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

We split this skill into the rules it gives an agent

7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 50 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When production breaks, follow a structured process.

    line 10
  2. Very specific:

    Only after service is restored.

    line 88
  3. Distinctive:

    Write within 24 hours of resolution:

    line 109
  4. Very specific:

    Investigation: Use debug for hands-on tools

    line 177
  5. Very specific:

    Root cause: Use superpowers:systematic-debugging for methodology

    line 178
  6. Very specific:

    Fix: Use superpowers:test-driven-development for the fix

    line 179
  7. Very specific:

    Review: Use review-code before deploying the fix

    line 180

“Common” is measured: kept by at least 6 in 10 of the 50 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Incident Response

Overview

When production breaks, follow a structured process. Don't panic, don't guess, don't push hot fixes without understanding.

Core principle: Restore service first, investigate root cause second, prevent recurrence third.

Severity Classification

SeverityDefinitionResponse TimeExamples
SEV1Service down, all users affectedImmediateDatabase crashed, API 500s on all routes, auth broken
SEV2Major feature broken, many users affected< 30 minPayment processing fails, search returns no results
SEV3Minor feature broken, some users affected< 2 hoursExport fails for large datasets, specific edge case error
SEV4Cosmetic or minor, workaround existsNext business dayUI alignment issue, non-critical notification delay

Incident Workflow

1. Detect & Acknowledge

## Incident Report
- **Severity:** SEV[1-4]
- **Detected:** [timestamp]
- **Detected by:** [monitoring alert / user report / engineer]
- **Affected:** [what users/features are impacted]
- **Symptom:** [what's broken, error messages]

2. Triage (First 5 Minutes)

REQUIRED: Invoke debug skill for hands-on investigation tools.

# Quick triage checklist — run in parallel
docker compose ps                           # containers running?
curl -s http://localhost:8000/health | jq .  # API healthy?
docker compose logs --tail=50 api           # recent errors?
docker compose exec postgres pg_isready     # DB reachable?

Decision: Can we restore quickly?

SituationAction
Bad deploy caused itRollback to last good version
Database migration broke itmigrate down 1 or alembic downgrade -1
Config/env changeRevert config
Resource exhaustionScale up / restart
Unknown causeContinue investigation

3. Mitigate (Restore Service)

Priority is restoring service, NOT fixing the bug.

# Rollback deployment
git revert HEAD && git push

# Or redeploy last known good
git checkout <last-good-tag>
docker compose up -d --build

# Or restart crashed service
docker compose restart api

# Or scale up if resource issue
docker compose up -d --scale api=3

Log every action taken:

## Timeline
- [HH:MM] Detected: API returning 500 on all routes
- [HH:MM] Triaged: Database connection pool exhausted
- [HH:MM] Mitigated: Restarted API service, connections recovered
- [HH:MM] Confirmed: Service restored, monitoring for recurrence

4. Investigate Root Cause

Only after service is restored. Use superpowers:systematic-debugging methodology.

## Root Cause Analysis
- **What happened:** [technical description]
- **Why it happened:** [root cause, not just symptom]
- **Why it wasn't caught:** [gap in testing/monitoring/process]
- **Evidence:** [logs, metrics, traces that confirm the root cause]

5. Fix & Verify

## Fix
- **PR:** [link]
- **What changed:** [description]
- **How verified:** [test that covers this case]

6. Postmortem

Write within 24 hours of resolution:

# Postmortem: [Incident Title]

**Date:** [date]
**Duration:** [detect to resolve]
**Severity:** SEV[N]
**Author:** [name]

## Summary
[1-2 sentences: what happened and impact]

## Timeline
[Chronological list of events with timestamps]

## Root Cause
[Technical explanation of why this happened]

## Impact
- Users affected: [count or percentage]
- Duration: [how long users were impacted]
- Data loss: [yes/no, details]

## What Went Well
- [Quick detection because of monitoring]
- [Fast rollback process]

## What Went Wrong
- [No alert for this failure mode]
- [Missing integration test for this case]

## Action Items
| Action | Owner | Priority | Status |
|--------|-------|----------|--------|
| Add monitoring for [X] | [name] | P0 | TODO |
| Add integration test for [Y] | [name] | P0 | TODO |
| Improve deploy rollback docs | [name] | P1 | TODO |

Runbook Template

For recurring operational tasks, create runbooks:

# Runbook: [Service Name] — [Scenario]

## Symptoms
- [What alerts fire]
- [What users see]
- [What logs show]

## Diagnosis Steps
1. Check [X]
2. If [condition], go to step 3
3. Check [Y]

## Resolution Steps
1. [Exact command to run]
2. [Verification command]
3. [Monitoring to confirm]

## Escalation
- If unresolved after 15 min: [who to contact]

Chains

  • Investigation: Use debug for hands-on tools
  • Root cause: Use superpowers:systematic-debugging for methodology
  • Fix: Use superpowers:test-driven-development for the fix
  • Review: Use review-code before deploying the fix

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.