agentleFS
tarikhamiltontarikhamilton/claude-skills/skills/debug-triage/SKILL.md

debug-triage

Skill0 starsChanged 5 months agoMITView on GitHub

Structured debugging and bug triage. Use when the user reports a bug, error, crash, or unexpected behavior. Triggers on "debug", "bug", "error", "broken", "crash", "not working", "fails", "undefined", "TypeError", "null".

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    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:

    Import path wrong or module not found

    line 62
  2. Distinctive:

    Guess-and-check: Don't make random changes hoping one works.

    line 69
  3. Distinctive:

    Shotgun debugging: Don't scatter console.logs everywhere.

    line 70
  4. Very specific:

    Symptom fixing: Don't wrap in try/catch or add ?

    line 71
  5. Distinctive:

    Stop and ask when:

    line 76

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

Debug Triage

You are diagnosing a bug. Follow the diagnosis process in order — do not skip steps or jump to a fix.

Diagnosis Process

  1. Understand the symptom — What exactly fails? Error message? Unexpected behavior? Silent failure? When does it happen (always, intermittently, after a specific action)?
  2. Reproduce — Find the trigger. Trace the code path that leads to the failure. If you can't reproduce from the code alone, ask the user for steps and environment details.
  3. Read the error — Parse the full stack trace. Map each frame to source files. Identify the throwing line and what value/state caused it.
  4. Isolate — Binary-search the cause. Check recent changes (git log, git diff). Is this a regression? What changed between "working" and "broken"?
  5. Identify root cause — Don't fix the symptom. Trace upstream to the actual source of the problem. The bug is rarely where the error throws.
  6. Fix and verify — Fix the root cause. Confirm the symptom is gone. Check for related issues in similar code paths.

Error Type Checklists

Quick checks by error type:

Runtime crash / TypeError / undefined

  • Null/undefined flowing through a chain — check optional chaining, default values, missing props
  • Accessing a property on a value that hasn't been initialized yet
  • Array index out of bounds or accessing .length on undefined
  • Destructuring from a null/undefined object

Async / race condition

  • Missing await on an async call
  • Effect cleanup not cancelling in-flight requests
  • Stale closures capturing old state values
  • Concurrent state updates conflicting with each other
  • Unhandled promise rejections

State bug

  • State initialized to wrong value or wrong type
  • State updates happening in wrong order
  • Derived state out of sync with source state
  • Re-render not triggering when expected (stale reference, missing dependency)

Network / API

  • Request format doesn't match what the API expects (body shape, headers, method)
  • Auth token missing, expired, or malformed
  • Response shape changed or differs from type definition
  • Error responses not handled (non-2xx status codes fall through)
  • CORS misconfiguration

Rendering

  • Conditional rendering logic inverted or missing a case
  • Missing key prop causing stale renders in lists
  • Memo/useMemo dependency array missing a dep
  • Style conflicts or specificity issues
  • Layout shift from async content loading

Build / config

  • Import path wrong or module not found
  • Environment variable missing or undefined at build time
  • Version mismatch between dependencies
  • Config file syntax error or wrong field name

Anti-Patterns — Do NOT

  • Guess-and-check: Don't make random changes hoping one works. Understand the cause first.
  • Shotgun debugging: Don't scatter console.logs everywhere. Place them strategically at boundaries (input → function → output).
  • Symptom fixing: Don't wrap in try/catch or add ?. without understanding why the value is null. That hides the bug.
  • Blame the crash site: The error throws in one place but originates upstream. Always trace back.

When to Ask the User

Stop and ask when:

  • You can't reproduce the issue from the code alone (needs device, account, or environment info)
  • Multiple equally likely root causes exist and the fix differs per cause
  • The bug depends on runtime state you can't inspect (server logs, database state, third-party API)

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.