agentleFS
RBraga01RBraga01/a-team/skills/incident-response/SKILL.md

incident-response

Skill24 starsChanged 25 days agoMITView on GitHub

Production incident playbook. Use immediately when production is degraded or down. Five phases: detect, contain, diagnose, resolve, post-mortem. Prevents the chaos of uncoordinated response and ensures every incident produces lasting improvements.

  • Commits and pushes

81 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use dora-metrics, background-jobs 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.
  • jholhewresSkill

    dora-metrics

    Calculate DORA metrics from git + deploy logs

    Also in 3 projects that use this

  • YepAPISkill

    background-jobs

    Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

    Also in 4 projects that use this

  • MicrosoftSkill

    data-modeling

    Use when the app needs to store or read data — records, a database, entities, CRUD, lists, "save/remember X", or per-user data with row-level security. This app's data layer is Rayfin's: you declare entities as TypeScript classes with decorators in rayfin/data/, register them in the schema, and read/write them through the typed rayfin-client. Covers: defining an @entity, field decorators, registering it, per-entity access with @role, owner-only row-level security, and the client query/mutation API. Triggers: data, database, model, entity, schema, table, record, CRUD, create, read, update, delete, list, store, save, persist, per-user, row-level security, RLS, access control, ownership.

    Also in 7 projects that use this

  • YepAPISkill

    data-pipelines

    ETL patterns, cron scheduling, queue-based processing, and batch jobs with Inngest/BullMQ.

    Also in 4 projects that use this

  • mmondoraSkill

    infrastructure-as-code

    Infrastructure as Code with Terraform and Pulumi. State management, modularity, drift detection, secrets handling. Use when provisioning cloud resources, writing Terraform/Pulumi modules, or managing infrastructure configuration.

    Also in 5 projects that use this

  • csiddhant796-blipSkill

    threat-detection

    Use when hunting for threats in an environment, analyzing IOCs, or detecting behavioral anomalies in telemetry. Covers hypothesis-driven threat hunting, IOC sweep generation, z-score anomaly detection, and MITRE ATT&CK-mapped signal prioritization.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 68 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill immediately when:

    line 18
  2. Distinctive:

    When did it start? (exact time from monitoring, not "someone noticed")

    line 34
  3. Very specific:

    Create an incident channel: #incident-YYYY-MM-DD-short-description

    line 37
  4. Distinctive:

    Look for the fastest way to reduce impact — in this order:

    line 59
  5. Distinctive:

    Test it minimally before acting on it.

    line 109
  6. Distinctive:

    Prefer rollback over hotfix — hotfixes under pressure introduce new bugs

    line 118
  7. Distinctive:

    Verify the metric that triggered the incident is recovering

    line 124
  8. Distinctive:

    Keep monitoring for 15 minutes before declaring resolved

    line 126
  9. Distinctive:

    Every SEV-1 and SEV-2 gets a written post-mortem.

    line 139
  10. Distinctive:

    Every action item has an owner and a date

    line 187

“Common” is measured: kept by at least 6 in 10 of the 68 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

The Law

CALM IS A SKILL. PANIC IS A CHOICE.
An incident is a system behaving unexpectedly. It is solved by evidence, not speed.
Fast wrong fixes extend incidents. Slow correct fixes end them.

When to Use

Use this skill immediately when:

  • Error rate spikes above baseline
  • Latency exceeds SLA
  • A service is unreachable
  • Data is inconsistent or missing
  • A security event is suspected

The Five Phases


Phase 1: Detect & Declare (first 5 minutes)

Assess impact — answer three questions:

  1. What is broken? (which service, endpoint, feature)
  2. Who is affected? (all users, subset, specific region, specific plan tier)
  3. When did it start? (exact time from monitoring, not "someone noticed")

Declare the incident:

  • Create an incident channel: #incident-YYYY-MM-DD-short-description
  • Post the initial status: service, impact, start time, who is investigating
  • Set the incident severity:
SeverityDefinition
SEV-1Complete service outage or data loss. All hands.
SEV-2Critical feature broken, significant user impact. Team leads involved.
SEV-3Partial degradation, workaround exists. Engineering only.
SEV-4Minor issue, low user impact. Standard ticket.

Do not investigate alone for SEV-1/SEV-2. Assign roles:

  • Incident Commander — coordinates response, owns communication
  • Technical Lead — drives diagnosis and fix
  • Comms — updates status page and stakeholders

Phase 2: Contain (first 15 minutes)

Stop the bleeding before diagnosing the wound.

Look for the fastest way to reduce impact — in this order:

  1. Rollback — was there a recent deploy? Roll it back. Rollback is always faster than a hotfix.
    git revert HEAD --no-edit && git push
    # or
    kubectl rollout undo deployment/api
  2. Feature flag off — can the broken feature be disabled without affecting the whole service?
  3. Circuit breaker / rate limit — if a downstream service is causing the issue, can you stop calling it temporarily?
  4. Scale up — if it's a load issue, can you add capacity immediately?
  5. Redirect traffic — failover to a secondary region or static error page

Containment does not require knowing the root cause. Act fast to reduce impact, then diagnose.


Phase 3: Diagnose (parallel with or after containment)

Work from evidence. No guessing.

Evidence sources in order of reliability:

  1. Monitoring dashboards — what changed at the incident start time?
  2. Error logs — what errors appear that didn't before?
  3. Recent deploys — what changed in the last 24 hours?
  4. Recent config changes — feature flags, environment variables, infrastructure changes
  5. External dependencies — is a third-party service degraded? Check their status page.

Diagnostic commands:

# Recent deploys
git log --oneline -20

# Error spike in logs
grep ERROR app.log | grep "$(date +%Y-%m-%dT%H)" | wc -l

# Slow queries
psql -c "SELECT query, mean_exec_time FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 10;"

# Service health
kubectl get pods --all-namespaces | grep -v Running
kubectl describe pod <failing-pod>
kubectl logs <failing-pod> --previous

Form a single hypothesis: "The incident is caused by X because evidence Y shows Z." Test it minimally before acting on it.


Phase 4: Resolve

Apply the fix with the minimum blast radius.

Fix principles:

  • Prefer rollback over hotfix — hotfixes under pressure introduce new bugs
  • Apply to staging first if a <5 minute delay is acceptable
  • Have a rollback plan for the fix itself
  • One change at a time — never apply multiple fixes simultaneously

After applying fix:

  • Verify the metric that triggered the incident is recovering
  • Confirm no new errors introduced
  • Keep monitoring for 15 minutes before declaring resolved

Declare resolved:

RESOLVED — [time]
Service restored. Root cause: [one sentence].
Follow-up actions tracked in post-mortem.

Phase 5: Post-Mortem (within 48 hours)

Every SEV-1 and SEV-2 gets a written post-mortem. Every SEV-3 gets at least a brief one.

Template: docs/postmortems/YYYY-MM-DD-short-title.md

# Post-Mortem: [Title]

**Date:** YYYY-MM-DD
**Severity:** SEV-N
**Duration:** Xh Ym (detected HH:MM → resolved HH:MM)
**Impact:** [who was affected and how]

## Timeline

| Time | Event |
|------|-------|
| HH:MM | First alert triggered |
| HH:MM | Engineer notified |
| HH:MM | Incident declared |
| HH:MM | Containment applied |
| HH:MM | Root cause identified |
| HH:MM | Fix deployed |
| HH:MM | Incident resolved |

## Root Cause

[One clear sentence. Not "the server crashed" — why did the server crash.]

## Contributing Factors

- [What made this possible / what made detection slow / what made recovery slow]

## What Went Well

- [Things that helped, even small ones]

## Action Items

| Action | Owner | Due |
|--------|-------|-----|
| Add alert for X | @person | YYYY-MM-DD |
| Fix root cause Y | @person | YYYY-MM-DD |
| Add runbook for Z | @person | YYYY-MM-DD |

Post-mortem rules:

  • Blameless — systems fail, not people
  • Focus on systemic improvements, not individual mistakes
  • Every action item has an owner and a date
  • Action items are tracked as real tickets, not just documented and forgotten

Communication Templates

Status page update (during incident):

[INVESTIGATING] We are investigating reports of [issue] affecting [scope].
Our team is actively working on a resolution. Next update in 30 minutes.

Resolution notice:

[RESOLVED] The issue affecting [scope] has been resolved as of [time].
Root cause was [brief explanation]. A full post-mortem will be published within 48 hours.
We apologise for the inconvenience.

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.