agentleFS
awahidsawahids/noskill/skills/debug-assistant/SKILL.md

debug-assistant

Skill1 starsChanged 26 days agoMITView on GitHub

Structured debugging: reproduce → isolate → root cause → fix → verify with evidence, incl. external integrations (WMS API, n8n, Power Automate, Microsoft Graph). Use on errors, stack traces, bugs, failed API calls, "kok error", "gak jalan".

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    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:

    Use this structured flow whenever helping debug, instead of guessing a fix right away.

    line 9
  2. Distinctive:

    Before concluding anything, make sure the problem can be reproduced:

    line 14
  3. Distinctive:

    Ask for the exact steps the user took (request, input, environment)

    line 15
  4. Distinctive:

    If there's an error message/stack trace, ask for the full text, not truncated

    line 16
  5. Distinctive:

    Ask: does it happen consistently, or only sometimes?

    line 17
  6. Distinctive:

    When did it last work normally?

    line 22
  7. Very specific:

    If an external integration is involved (WMS API, Microsoft Graph, n8n, Power Automate) — isolate whether the problem is in our request, …

    line 24
  8. Distinctive:

    Check the most likely first, in priority order:

    line 27
  9. Distinctive:

    After the fix, re-verify the reproduce scenario from step 1

    line 45
  10. Distinctive:

    Check whether the fix could affect other parts (side effects)

    line 46
  11. Distinctive:

    If this was a configuration/process mistake, do docs/the deploy checklist need updating?

    line 57
  12. Distinctive:

    When helping the user, structure the answer in sections:

    line 61
  13. Distinctive:

    Fix recommendation: after the cause is confirmed — don't give a fix before the cause is clear, unless the user only needs a temporary quick …

    line 64

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

Use this structured flow whenever helping debug, instead of guessing a fix right away. Goal: find the root cause, not just remove the symptom.

Debugging Flow

1. Reproduce

Before concluding anything, make sure the problem can be reproduced:

  • Ask for the exact steps the user took (request, input, environment)
  • If there's an error message/stack trace, ask for the full text, not truncated
  • Ask: does it happen consistently, or only sometimes? (sign of a race condition/timing issue)
  • For APIs: ask for the full example request (method, headers, body) and the response received

2. Isolate

Narrow the problem area before guessing the cause:

  • When did it last work normally? What changed since? (new deploy, dependency update, config change)
  • Does it happen in all environments or only one (staging vs production, local vs server)?
  • If an external integration is involved (WMS API, Microsoft Graph, n8n, Power Automate) — isolate whether the problem is in our request, their response, or in between (network/timeout/auth)

3. Diagnose

Check the most likely first, in priority order:

  1. Input/validation — is the incoming data actually wrong/not as expected?
  2. Logic/business rule — wrong condition, off-by-one, null/undefined handling
  3. State/data — database data was already inconsistent before this request
  4. Configuration/environment — different env var, wrong secret, different endpoint URL
  5. External/integration — another service down, rate limit, expired auth token
  6. Infra — memory, timeout, concurrency

For each hypothesis, state a quick way to verify it (extra logging, DB query, manual curl) before changing code.

Specific diagnosis techniques (use according to bug type):

  • Root-cause tracing — if the bug shows up at point A, don't assume A is where it lives. Trace back: where did this wrong data/state come from? Follow the call stack or data flow backwards until you find the point where the value first became wrong — not where it was first seen wrong. Example: null error on order.total_amount at render — don't just add a null-check there; trace why total_amount can be null (calculation in the service? default value lost in a migration? race condition on insert?).
  • Defense-in-depth — after the root cause is found and fixed at the origin, consider whether additional validation layers are needed at other vulnerable points (not a replacement for the root fix, but a safeguard in case other unknown paths produce a similar condition). Don't stop at a single fix point if this bug type can arise from many paths.
  • Condition-based waiting (for race conditions/timing issues) — if the symptom is "sometimes fails, sometimes works" and timing-related (async, job queue, event), don't fix it with a fixed setTimeout/sleep. Instead wait for the actual condition that must be met (status polling, event listener, a promise that resolves when the work is done) — a fixed delay only hides the race condition, it doesn't remove it.

4. Fix & Verify

  • Fix the root cause, not the symptom (e.g. for a race condition, don't just add setTimeout — see condition-based waiting above)
  • After the fix, re-verify the reproduce scenario from step 1
  • Check whether the fix could affect other parts (side effects)

Evidence over claims — never claim "fixed" without evidence. Before telling the user the bug is resolved:

  • Re-run the exact same reproduce scenario from step 1 and show the result (not just "it should be correct based on this code change")
  • If there are tests, run them and show they pass — not the assumption "tests will pass because the logic is right"
  • If you can't run/reproduce directly (e.g. the required environment isn't available right now), say so explicitly to the user — never disguise uncertainty as certainty
  • "Probably fixed" and "verified fixed" are two different claims — never use language that makes one sound like the other

5. Prevent Recurrence (optional but recommended)

  • Is extra logging needed at this point for next time?
  • Is a new test case needed so this regression is caught automatically?
  • If this was a configuration/process mistake, do docs/the deploy checklist need updating?

Output Format When Helping Debug

When helping the user, structure the answer in sections:

  1. Possible causes (ordered from most likely)
  2. How to verify each possibility (specific: command, query, logs to check)
  3. Fix recommendation after the cause is confirmed — don't give a fix before the cause is clear, unless the user only needs a temporary quick patch (state explicitly if it's a stopgap, not a permanent solution)

Special Case: External API Integration

Since work often involves WMS API, n8n, Power Automate, Microsoft Graph — for these cases always check first:

  • Is the curl/HTTP request correct (headers, auth, body format)?
  • Does the external error response have a code/message that directly points to the problem (don't assume before reading the full response body)?
  • Is this a new problem, or is the external service actually having an issue (check its status page if any)?

Core Principle

Evidence over claims. This principle applies at every stage of the debugging flow, not only in Fix & Verify: never conclude a cause without evidence (logs, query results, command output), and never claim a problem is solved without re-running the failing scenario. "This seems to be the cause" and "confirmed this is the cause via [evidence X]" are two different confidence levels — always be clear which one you're stating.

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.