agentleFS
DeadlymindDeadlymind/nanolama/skills/incident-response/SKILL.md

incident-response

Skill1 starsChanged 5 months agoMITView on GitHub

Runs the response when something is live-broken or a secret is exposed — report first, contain the blast radius, fix the root cause through a reviewed change, then a blameless post-mortem that hardens the lesson into a standing rule. Use when a production endpoint is down or misbehaving, a key/token/credential may have leaked, an account or session looks compromised, a bad deploy is degrading users, or someone asks how to handle an ongoing incident. Not for pre-ship risk auditing (see security-review) or root-causing a failure in isolation (see debug).

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

2 rules. 0 are common, 2 are distinctive, and 0 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Contain: Stop the bleeding before you understand it fully: revoke the key/session, disable or feature-flag the broken endpoint, take the …

    line 19
  2. Distinctive:

    Write the rule where it will be enforced (a lint check, a review checklist, a skill), not in a doc no one reopens.

    line 48

“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 (report, contain, fix, prevent)

When to use

Something is broken in production right now, or a secret may have escaped — a leaked key, an endpoint exhausting a shared resource, a bad deploy degrading users. This is the live-fire path, distinct from reviewing code before it ships.

Pattern

Four moves, in order, and the order matters:

  1. Report first. Announce the incident before you touch anything. Quiet fixing hides the blast radius — visibility lets others help, stop dependent work, and catch what you can't see. A wrong-but-loud call beats a right-but-silent one.
  2. Contain. Stop the bleeding before you understand it fully: revoke the key/session, disable or feature-flag the broken endpoint, take the risky feature offline. Reducing exposure is not the fix — it buys time to fix safely.
  3. Fix the root cause through a normal reviewed change, not a panicked hotfix straight to production. The pressure to skip review is exactly when review catches the second bug you'd introduce.
  4. Prevent with a short blameless post-mortem that turns the lesson into a durable standing rule, so the whole class of bug cannot recur.

Adapt to your repo

Define these once so the sequence runs the same every time: where incidents are announced, who can revoke a credential or flip a feature flag, how to roll back or disable a deploy, and where post-mortems live. Wire "assume compromised → rotate" into whatever secret store you use (env, secrets manager, KMS). Keep the loop fast and low-ceremony — a heavy process just tempts people to skip step 1.

Secrets are assumed compromised

Any credential that may have leaked is treated as leaked — rotate it immediately, don't wait for proof it was used. A key printed to a log, pushed to a repo, or pasted anywhere shared is burned. Rotate the value, invalidate old sessions/tokens minted with it, and confirm the new one is live before you call it contained. Redacting the leak after the fact does not un-leak it.

Codify the fix as a rule

A post-mortem that ends at "we fixed it" invites the same bug in a new costume. End it at a rule that makes the whole class impossible. Concretely: if an endpoint polled on an interval overloaded a shared resource, the standing rule is any endpoint polled on an interval must be bounded (page size / row cap) and cached (short server-side TTL) — so no future polled endpoint can exhaust that resource. Write the rule where it will be enforced (a lint check, a review checklist, a skill), not in a doc no one reopens.

# Incident timeline — the shape to reach for
T+0   REPORT    "Payments 500ing since 14:02, investigating" (before touching prod)
T+2   CONTAIN   revoke leaked key + rotate; feature-flag the failing endpoint off
T+15  FIX       reviewed PR for the root cause → deploy through the normal pipeline
T+1d  PREVENT   blameless post-mortem → new standing rule that kills the class

Gotchas

  • Fixing before reporting is the classic mistake — it shrinks the responder pool to just you and hides scope from everyone who could help.
  • Containment is temporary relief, not resolution — a disabled feature still owes a real fix and a re-enable.
  • "It probably wasn't exposed long enough to matter" is not a rotation decision — assume compromised and rotate anyway.
  • A panicked direct-to-prod hotfix routinely ships a second incident; route the fix through review even under pressure (see deploy-aws for safe rollout/rollback).
  • Blame in the post-mortem buys silence next time — keep it about the system, so the next person reports fast instead of hiding.

See also

  • security-review
  • debug
  • deploy-aws

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.