agentleFS
reddygopalkrishnareddygopalkrishna/developer-agent-skills/skills/incident-response/SKILL.md

incident-response

Skill8 starsChanged 9 days agoMITView on GitHub

Guides production incident handling - assess severity, mitigate first (roll back, disable a flag, scale, fail over), then diagnose from recent changes, metrics, logs and traces, keep a timestamped timeline, draft status updates, and write a blameless postmortem with owned action items. Use when production is down or degraded, errors or latency spike, an alert fires, users report an outage, or the user asks for an incident review or postmortem. Not for debugging in local or development environments.

81 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use dora-metrics, data-modeling and 6 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

  • 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

  • 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

  • motao123Skill

    browser-verification

    Use when a change needs browser-level evidence such as UI flow checks, form interaction validation, console inspection, or end-to-end smoke verification. This skill focuses on observable behavior instead of code assumptions.

    Also in 3 projects that use this

  • narlyseorgSkill

    exploit-development

    Use when needing to exploit a confirmed vulnerability, generate payloads, craft reverse shells, use Metasploit modules, write custom exploit scripts, perform post-exploitation, escalate privileges, pivot through networks, bypass security controls, or when the user asks to exploit, pwn, pop a shell, gain access, or weaponize a finding.

    Also in 3 projects that use this

  • ffsshhttiikkSkill

    chaos-engineering

    Resilience testing through controlled experiments

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 68 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Protect data: Do not paste secrets, tokens or personal data from logs into chat, tickets or the postmortem.

    line 16
  2. Distinctive:

    Resolve: when metrics have been stable for the agreed period.

    line 32
  3. Distinctive:

    Use the organization's own definitions if they exist (search the repo and wiki for runbooks, "severity", "SEV", on-call docs).

    line 37
  4. Distinctive:

    When unsure between two levels, pick the higher one.

    line 46
  5. Distinctive:

    Debugging while users are down: when a rollback was available.

    line 119
  6. Distinctive:

    Declaring resolved too early,: before metrics stay stable.

    line 125

“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

Restore service first; find the root cause second. During an incident the agent investigates, proposes and records. A human approves every action that changes production.

Hard safety rules

  • Read-only investigation is fine once the user asks for help: dashboards, logs, traces, kubectl get/describe/logs, read-only queries, git log.
  • Never run a production-changing action without explicit confirmation for that specific action. This includes rollbacks, deploys, restarts, scaling, feature flag changes, failovers, config or DNS changes, cache flushes, queue purges, and data fixes. For each one, present: the exact command, the expected effect, the blast radius, and how to undo it. Then wait.
  • Draft, never send. Status page posts, chat announcements, customer emails and tickets are drafted for a human to send.
  • Protect data. Do not paste secrets, tokens or personal data from logs into chat, tickets or the postmortem. Redact.

Workflow

  1. Triage (first few minutes). What is broken, for whom, since when? Confirm it is real and not a monitoring failure. Assign a severity (table below). Make sure a human incident commander is named and an incident channel or doc exists. Start the timeline.
  2. Check recent changes first. Most incidents follow a change. Look at, in order:
    • Deploys of the affected service and its dependencies (app and infrastructure).
    • Config changes, feature flag changes, secret or certificate rotations.
    • Dependency and cloud provider status pages.
    • Traffic changes: spikes, a new client, a bot, a marketing event.
    • Scheduled jobs, data migrations, backfills.
    • Expiring certificates, domains, quotas, credits.
  3. Mitigate with the fastest reversible option, even before the root cause is certain (table below). If an incident started right after a deploy, rolling back is usually the right first move. Propose it; get approval.
  4. Verify the mitigation. Error rate, latency and saturation are back at baseline, and the user-visible symptom is gone. Keep watching for at least 15-30 minutes.
  5. Diagnose the root cause once service is stable (or in parallel, by someone else, if no mitigation is available).
  6. Communicate on a fixed cadence (see severity table). Send an update even when there is no news. Templates in references/status-updates.md.
  7. Resolve when metrics have been stable for the agreed period. Record follow-ups as tickets.
  8. Postmortem within about five business days for SEV1 and SEV2. Template in references/postmortem-template.md.

Severity

Use the organization's own definitions if they exist (search the repo and wiki for runbooks, "severity", "SEV", on-call docs). Otherwise use this typical scale:

LevelMeaningTypical response
SEV1Full outage, data loss or corruption, security breach, major revenue impactAll hands now; updates about every 30 min; leadership and customer comms
SEV2Major feature down or severe degradation for many users; no easy workaroundOn-call plus owning team now; updates every 30-60 min
SEV3Partial degradation, small set of users, workaround existsOwning team during working hours; updates as status changes
SEV4Cosmetic or very low impactNormal ticket

When unsure between two levels, pick the higher one; downgrading later is cheap.

Roles

RoleDoesDoes not
Incident commander (human)Coordinates, sets priorities, approves actions, decides when resolvedDebug hands-on
Operations leadInvestigates and executes approved mitigationsMake changes nobody else knows about
Communications leadWrites and sends status updates internally and externallySpeculate about root cause publicly
ScribeKeeps the timelineFilter out "unimportant" events

The agent's role is investigator and scribe: gather data, rank hypotheses, draft commands and updates, and keep the timeline.

Mitigation options

OptionUse whenWatch out for
Roll back the last deployStart time correlates with a deployDatabase migrations that are not backward compatible: old code may fail against the new schema. Check first.
Disable a feature flag / kill switchA new feature is implicatedFlags with side effects on data already written
Scale out or upSaturation (CPU, memory, connections, queue depth) from loadPushing the bottleneck to the database or a downstream service
Fail over or drain a region, zone or nodeFailure is localizedCapacity of the remaining region; data replication lag
RestartLeak, deadlock, stuck process; buys timeDestroys evidence. Capture a thread dump, heap stats or logs first if cheap.
Rate limit, shed load, or block a clientTraffic spike or abuseBlocking legitimate users; communicate it
Revert config, renew certificate, restore a rotated secretConfig, certificate or secret change correlatesCaches holding the bad value
Pause non-critical consumers or batch jobsResource contentionBacklog to drain afterwards
Degrade gracefullyServe cached or static content, disable expensive featuresMake the degraded mode visible to users

Diagnosis

  • Broad to narrow. Which endpoints, regions, versions, customers, hosts or pods? Compare against a healthy baseline (same time yesterday or last week).
  • RED per service (rate, errors, duration) and USE per resource (utilization, saturation, errors).
  • Correlate the start time with the change list from step 2.
  • Logs: filter to the window and service, count by error message, find the first occurrence.
  • Traces: open the slowest and failing traces and find which span or dependency dominates.
  • Read-only commands that are usually safe:

    kubectl get pods -n <ns> -o wide
    kubectl describe pod <pod> -n <ns>
    kubectl logs <pod> -n <ns> --since=30m
    kubectl logs <pod> -n <ns> --previous          # last crashed container
    kubectl get events -n <ns> --sort-by=.lastTimestamp
    kubectl rollout history deployment/<name> -n <ns>
    git log --since="6 hours ago" --oneline
  • Common root causes: bad deploy; config error; expired certificate; DNS; resource exhaustion (disk full, connection pool, file descriptors, memory, rate limits or quotas); dependency outage; retry storms; cache stampede after expiry or flush; poison message or bad input data; clock or time zone bugs; a scheduled job colliding with peak traffic.
  • Keep a hypothesis list with evidence for and against each. Test the cheapest-to-check hypothesis first.

Timeline

Record everything in UTC, as it happens:

14:02 UTC  Alert: checkout 5xx rate above 5% (source: monitoring)
14:05 UTC  IC: Priya. Declared SEV2. Channel #inc-checkout opened.
14:09 UTC  Observation: deploy of checkout v2026.11.03.2 finished 13:58
14:12 UTC  Proposed rollback to v2026.11.03.1; approved by IC
14:15 UTC  Rollback complete (ops lead ran it)
14:24 UTC  5xx back to baseline 0.2%; monitoring

Include detection, every action (who ran what), observations, decisions, and every communication sent.

Postmortem

  • Blameless. Describe what the system and process allowed, not who made a mistake. Ask "what made this action reasonable at the time?"
  • Root cause and contributing factors. Incidents usually have several; list them all (the trigger, why it was not caught, why detection or mitigation was slow).
  • Action items are specific, owned, dated and tracked in the issue tracker. Prioritize prevention, then faster detection, then faster mitigation. "Be more careful" is not an action item.
  • Measure time to detect, time to mitigate, time to resolve.

Anti-patterns

  • Debugging while users are down when a rollback was available.
  • Uncoordinated changes by several people at once without the incident commander.
  • Restarting everything and losing the evidence.
  • Unlogged actions that nobody can reconstruct later.
  • Silence — long gaps without a status update.
  • Rolling back code past a non-backward-compatible migration.
  • Declaring resolved too early, before metrics stay stable.
  • Blame, or action items without owners and dates.

Done when

Incident:

  • Metrics are at baseline for the agreed period and the symptom is gone.
  • The timeline is complete with UTC timestamps.
  • A final status update was drafted and approved.
  • Follow-up tickets exist.

Postmortem:

  • Impact is quantified (duration, users or requests affected, revenue or SLO budget if known).
  • Timeline includes detection, mitigation and resolution times.
  • Root cause and contributing factors are described without blame.
  • Every action item has an owner, a due date and a ticket.

References

  • references/status-updates.md — read when drafting internal or external status updates during an incident.
  • references/postmortem-template.md — read when writing the postmortem after the incident.

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.