agentleFS
polytheseuspolytheseus/sre-skills/skills/incident-triage/SKILL.md

incident-triage

Skill0 starsChanged 15 days agoMITView on GitHub

Run the first 15 minutes of a production incident — establish impact, find what changed, pick a mitigation, and keep a timeline. Use when the user says something is down, erroring, slow, paging, on fire, or asks "what's going on with prod".

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use write-runbook, threat-hunting 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.
  • MaheshAwasareSkill

    write-runbook

    Generate an operational runbook for a service from its code, config, and dependencies — what to do when it breaks, where to look, how to roll back, who to escalate to. Use proactively before a service goes to production, after a major incident, or when handing off operational ownership.

    Also in 3 projects that use this

  • allanninalSkill

    threat-hunting

    Hunt threats using Sigma detection rules and security analysis techniques. Use when investigating security incidents, creating detection rules, or analyzing suspicious activity.

    Also in 3 projects that use this

  • srclightSkill

    explore-codebase

    This skill should be used when the user asks to "explore this codebase", "understand this project", "give me an overview", "how does this work", "onboard me", "walk me through the architecture", "map the codebase", or any request to understand a codebase's structure, architecture, or design.

    Also in 3 projects that use this

  • thlaureSkill

    review-change

    Use this skill when the user asks for a code review, a correctness pass, a check before PR, or asks whether a Signalist change follows project conventions.

    Also in 4 projects that use this

  • SentrySkill

    write-tests

    Write tests following project conventions. Use when adding new tests or modifying existing ones.

    Also in 3 projects that use this

  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 7

    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:

    Keep a timestamped timeline the whole way, so the postmortem writes itself.

    line 14
  2. Very specific:

    Before any mutating action (rollback, restart, scale, flag flip, failover, kubectl delete, terraform apply), state the exact command, what …

    line 19
  3. Distinctive:

    Mitigate before you explain: If a recent deploy lines up with the start of the problem, recommend rolling it back *before* proving it's the …

    line 22
  4. Distinctive:

    Look at the window from ~2 hours before the start until now.

    line 53
  5. Distinctive:

    Add capacity (scale out) if it's saturation.

    line 82
  6. Distinctive:

    Wait for approval, run it, then verify with the same signals used in Step 1.

    line 97
  7. Distinctive:

    If it didn't help within a few minutes, say so plainly and move to the next option.

    line 98
  8. Distinctive:

    Follow-ups that must happen even though things look fine (e.g.

    line 123

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

You are the incident's first responder alongside the user. Your job in the first 15 minutes is not to find the root cause. It is to:

  1. Establish what is broken and for whom (impact).
  2. Find what changed (most incidents are caused by a change).
  3. Get to a mitigation (stop the bleeding), then hand over to diagnosis.
  4. Keep a timestamped timeline the whole way, so the postmortem writes itself.

Ground rules

  • Read-only by default. Gather evidence with commands that don't change state. Before any mutating action (rollback, restart, scale, flag flip, failover, kubectl delete, terraform apply), state the exact command, what it will do, its blast radius, and how to undo it, then wait for the user to say go.
  • Mitigate before you explain. If a recent deploy lines up with the start of the problem, recommend rolling it back before proving it's the cause. Rollbacks are cheap; extended outages are not.
  • Don't trust a single signal. Confirm user-facing impact from at least two sources (e.g. error-rate metric + synthetic check, or logs + a real request).
  • Timestamps in UTC. Note the time of every observation and action.

Step 1 — Impact (≤ 3 min)

Answer these, writing down the evidence for each:

QuestionHow
What is the symptom?Errors (which codes?), latency, wrong data, total outage
Who is affected?All users / one region / one tenant / one endpoint
Since when?First bad datapoint in metrics; first error in logs
Is it getting worse?Compare the last 5 min with the previous 5 min

Reproduce it yourself if you can do so safely:

curl -sS -o /dev/null -w '%{http_code} %{time_total}s\n' https://<endpoint>

Assign a severity using the team's scale if they have one. Otherwise:

  • SEV1: core function down or data loss/exposure for many users
  • SEV2: major degradation or a key feature down; workaround exists
  • SEV3: minor degradation, small subset of users

Step 2 — What changed? (≤ 5 min)

Look at the window from ~2 hours before the start until now. Check whichever of these exist in this environment:

# Deploys / commits
git log --since="3 hours ago" --oneline --all
gh run list --limit 20                       # recent CI/CD runs
kubectl rollout history deploy/<name> -n <ns>
kubectl get events -A --sort-by=.lastTimestamp | tail -40
helm history <release> -n <ns>

# Infra / config
terraform state list >/dev/null && git log --since="1 day ago" -- '*.tf'

Also ask the user about changes that leave no trace in this shell: feature flags, config consoles, DNS/CDN changes, certificate expiry, cloud provider status pages, traffic spikes (launches, marketing emails, crawlers), upstream vendors.

Line the changes up against the start time of the symptom. A change that landed 0–15 minutes before impact is the prime suspect.

Step 3 — Mitigate

Pick the cheapest, most reversible option that should stop the impact:

  1. Roll back the suspect deploy/config/flag.
  2. Shift traffic away (failover region, drain bad nodes, disable a feature).
  3. Add capacity (scale out) if it's saturation.
  4. Shed load (rate limit, disable an expensive endpoint) to protect the core.
  5. Restart — only if evidence points to a stuck state, and capture diagnostics first (thread dump, kubectl logs --previous, heap/core if cheap), because a restart destroys evidence.

For the chosen action, present:

ACTION:    <exact command>
EXPECTED:  <what should improve, and where we'll see it>
RISK:      <blast radius>
UNDO:      <exact command>

Wait for approval, run it, then verify with the same signals used in Step 1. If it didn't help within a few minutes, say so plainly and move to the next option.

Step 4 — Communicate

Draft a status update the user can paste into the incident channel or status page. Keep it factual and avoid guessing at cause:

[SEV<n>] <service> — <symptom in user terms>
Impact: <who/what>, since <HH:MM UTC>
Status: Investigating | Mitigating | Monitoring | Resolved
Current action: <what we're doing>
Next update: <HH:MM UTC>

Suggest an update cadence: every 30 min for SEV1, every hour for SEV2.

Step 5 — Hand over

Once impact is mitigated, summarise:

  • Timeline so far (UTC, observation/action per line)
  • What we believe is going on, and how confident we are
  • Open questions and the evidence still needed
  • Follow-ups that must happen even though things look fine (e.g. re-enable the feature, forward-fix the rolled-back change)

Offer to continue with root-cause diagnosis (e.g. the k8s-debug or log-forensics skills) and, once resolved, to write the postmortem with the postmortem skill using the timeline you kept.

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.