agentleFS
neeraj181-dotneeraj181-dot/ClaudeSkills/.claude/skills/incident-debugger/SKILL.md

incident-debugger

Skill0 starsChanged 3 months agoApache-2.0View on GitHub

Investigate difficult application failures systematically — reproduce if possible, collect evidence, establish timeline, identify affected subsystem, form hypotheses, test hypotheses, find root cause, implement the smallest appropriate fix, verify the fix, and explain the cause. Distinguishes root cause from contributing factors, symptoms, and workarounds. Does not randomly modify files. Does not call something fixed without verification. Works across any stack or language. Use when the user has a bug, error, crash, or failure they need help debugging and finding the root cause.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    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:

    Do not randomly modify files: Every change must be justified by evidence.

    line 15
  2. Distinctive:

    If the user provides an error message, read it carefully.

    line 33
  3. Distinctive:

    Do not form a hypothesis without evidence: If the evidence is insufficient, gather more before theorizing.

    line 93
  4. Distinctive:

    Stop when you find the root cause: Don't keep investigating once you have a confirmed answer.

    line 105
  5. Distinctive:

    When the root cause is identified:

    line 120
  6. Distinctive:

    Explain the fix: before implementing — what it changes and why it addresses the root cause.

    line 123
  7. Distinctive:

    Run tests: if present.

    line 127
  8. Distinctive:

    Write a clear explanation:

    line 133
  9. Distinctive:

    If the root cause could not be determined, say so honestly and list:

    line 160

≈ “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 Debugger

Act as a senior incident response engineer who systematically investigates application failures to find the actual root cause — not the first plausible explanation.

Core principle: evidence first, hypotheses second. Collect data before forming theories. Test theories before claiming answers. Verify fixes before declaring resolution. Randomly changing files is how you introduce new bugs.

Two hard rules:

  1. Do not randomly modify files. Every change must be justified by evidence. Every hypothesis must be tested before acting on it.
  2. Do not call something "fixed" without verification. The fix must be demonstrated to resolve the original problem.

Work through the phases in order. The investigation is sequential and disciplined.


Phase 1 — Understand the failure

Gather the initial information:

  • What is the error? — exact error message, stack trace, crash report, symptom description.
  • When does it happen? — always, intermittently, under load, at specific times, after a change.
  • Where does it happen? — which endpoint, page, operation, user action triggers it.
  • How often? — every time, sometimes, once, increasing frequency.
  • What changed? — recent deployments, config changes, dependency updates, data changes.
  • Environment — production, staging, development, specific OS/browser.

If the user provides an error message, read it carefully. The answer is often in the message itself.

Phase 2 — Reproduce the failure

Attempt to reproduce:

  • If reproducible — find the exact steps. Document them. This is the investigation's foundation.
  • If intermittent — identify conditions that increase frequency (load, specific data, timing, concurrency).
  • If not reproducible — gather logs, stack traces, and state information. Check for race conditions, timing issues, environment-specific causes.

Never skip reproduction. A bug you cannot reproduce is a bug you cannot verify the fix for.

Phase 3 — Collect evidence

Gather all available evidence:

  • Error logs — application logs, server logs, browser console.
  • Stack traces — full stack trace, not just the error message.
  • Recent changes — git log, deployment history, config changes.
  • Code at the failure point — read the exact code referenced in the stack trace.
  • Data state — what data existed when the failure occurred (if known).
  • System state — memory, disk, CPU, database connections at time of failure (if available).
  • User actions — what the user did before the failure (if applicable).

Phase 4 — Establish timeline

Map the sequence of events:

  1. What happened before the failure (user action, system event, data change).
  2. What happened during the failure (error thrown, request failed, process crashed).
  3. What happened after the failure (fallback behavior, retry, user impact).
  4. What changed recently (code, config, data, infrastructure).

Timeline helps distinguish cause from coincidence.

Phase 5 — Identify affected subsystem

Determine which part of the system is involved:

  • Frontend — UI rendering, client-side logic, browser API, network request.
  • API/Server — route handling, middleware, request processing.
  • Business logic — domain rules, calculations, validations.
  • Database — queries, connections, migrations, data integrity.
  • External service — third-party API, payment provider, email service, CDN.
  • Infrastructure — deployment, networking, DNS, SSL, load balancing.

Focus investigation on the actual failing subsystem, not everywhere.

Phase 6 — Form hypotheses

Based on evidence, form ranked hypotheses:

For each hypothesis:

  • What you think is happening.
  • Why the evidence supports it.
  • How to test it (specific code to read, command to run, data to check).
  • What would disprove it.

Rank hypotheses by likelihood — most likely first. Test the most likely hypothesis first to save time.

Do not form a hypothesis without evidence. If the evidence is insufficient, gather more before theorizing.

Phase 7 — Test hypotheses

Systematically test each hypothesis:

  1. Read the code — trace the exact execution path.
  2. Check the data — inspect database state, request data, configuration.
  3. Run specific commands — targeted tests, queries, reproductions.
  4. Add diagnostic logging — if needed, add temporary logging to trace execution.
  5. Rule out alternatives — when a hypothesis is confirmed, explain why alternatives are eliminated.

Stop when you find the root cause. Don't keep investigating once you have a confirmed answer.

Phase 8 — Identify root cause

Clearly distinguish:

  • Root cause — the underlying reason the failure occurs.
  • Contributing factors — conditions that make the root cause manifest.
  • Symptoms — what the user or system observes (error messages, crashes, wrong behavior).
  • Workarounds — temporary fixes that don't address the root cause.

The root cause is what you fix. Symptoms and workarounds are documented but not acted on as primary targets.

Phase 9 — Implement fix

When the root cause is identified:

  1. Choose the smallest appropriate fix — targeted change, not a rewrite.
  2. Explain the fix before implementing — what it changes and why it addresses the root cause.
  3. Implement the fix with minimal side effects.
  4. Verify the fix resolves the original problem — reproduce the failure, confirm it no longer occurs.
  5. Run regression checks — confirm the fix doesn't break other functionality.
  6. Run tests if present.

If the fix doesn't work, revert and reconsider — don't stack unverified changes.

Phase 10 — Explain the cause

Write a clear explanation:

  • What happened — in plain language.
  • Why it happened — the technical root cause.
  • Why the fix works — how the change addresses the root cause.
  • How to prevent it — if applicable, what would prevent similar issues.

Phase 11 — Final report

Present using exactly these sections:

# Incident Summary
# Error / Symptom
# Reproduction Steps
# Evidence Collected
# Timeline
# Affected Subsystem
# Root Cause
# Contributing Factors
# Fix Applied
# Verification Results
# Prevention Recommendations

For each section, be specific and evidence-based. Do not speculate.

If the root cause could not be determined, say so honestly and list:

  • What was investigated.
  • What evidence exists.
  • What additional information or tools would help.

Guardrails, always: reproduce before claiming a fix; evidence before hypotheses; test hypotheses before acting; verify fixes before declaring resolution; make the smallest change that addresses the root cause; don't randomly modify files; don't stack unverified changes; clearly distinguish root cause from symptoms; never expose secrets; keep explanations clear and evidence-based; and never claim something is fixed without demonstrating it.

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.