agentleFS
me-workspaceme-workspace/orchestrator-operational-agent-skills/incident-debugging/SKILL.md

incident-debugging

Skill1 starsChanged 44 days agoMITView on GitHub

Use this skill whenever something is broken and the cause is unknown - "error di production", "kenapa gagal", "user komplain", "service down", "bug aneh", stack traces, 500s, timeouts, wrong data. Drives a disciplined evidence-first diagnosis instead of guess-and-patch. Do NOT use for planned code review or deploys.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    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:

    If users are losing money/data right now: mitigate first (rollback last deploy, disable the feature flag, restart the crashed service) and …

    line 11
  2. Distinctive:

    Write the top 2-3 hypotheses ranked by evidence.

    line 20
  3. Distinctive:

    Test the cheapest discriminating check first (read a log, run one query, curl one endpoint) - not the most invasive.

    line 21
  4. Distinctive:

    Check for the same bug class elsewhere (grep for the same pattern).

    line 27
  5. Distinctive:

    Verify the fix against the original reproduction, then run the normal post-deploy smoke test.

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 Debugging

Rule zero: reproduce or trace before you touch anything. A fix without a confirmed root cause is a new bug with better marketing.

1. Stabilize (only if actively bleeding)

If users are losing money/data right now: mitigate first (rollback last deploy, disable the feature flag, restart the crashed service) and say explicitly that this is mitigation, not the fix.

2. Gather evidence - in this order

  1. Exact symptom: error text, status code, screenshot, affected user/id, first-seen time.
  2. What changed? Deploys, config edits, cron runs, dependency/API changes near first-seen time. Most incidents are caused by the most recent change.
  3. Logs around the failure: app log, web server log, journalctl -u <svc> --since, DB slow log. Grep for the request id / user id, not just the error string.
  4. Scope: one user or all? One endpoint or everything? Constant or intermittent? Intermittent → suspect race, resource exhaustion, or an external dependency.

3. Hypothesize and test

  • Write the top 2-3 hypotheses ranked by evidence. For each: what observation would confirm/refute it?
  • Test the cheapest discriminating check first (read a log, run one query, curl one endpoint) - not the most invasive.
  • Change one variable at a time. If you must experiment on production state, back up what you touch first.
  • Beware pattern-matching: a familiar-looking symptom can have a different cause. Confirm on THIS system's evidence.

4. Fix

  • Fix the root cause, minimally. Resist drive-by refactors in an incident patch.
  • Check for the same bug class elsewhere (grep for the same pattern).
  • Verify the fix against the original reproduction, then run the normal post-deploy smoke test.

5. Close out

Short write-up: symptom → root cause → fix → verification → prevention (test added? monitor added? checklist updated?). If a prevention item is skipped, list it as open debt, don't let it evaporate.

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.