agentleFS
himanshi-28himanshi-28/coding-agent-skills/skills/debug-with-evidence/SKILL.md

debug-with-evidence

Skill1 starsChanged 4 months agoMITView on GitHub

Explicit-invocation workflow for systematic debugging that reproduces failures, forms falsifiable hypotheses, collects runtime evidence, proves root causes, adds regression tests, and verifies targeted fixes. Use only when the user directly invokes the debug-with-evidence skill.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. startupsandcode/agent-skills★ 1same name
    2. kartykk/agent-ready★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is 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.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If reproduction is impossible, identify the missing evidence instead of guessing.

    line 19
  2. Distinctive:

    Use existing logs, stack traces, test output, browser state, query plans, profiles, metrics, or version history.

    line 26
  3. Distinctive:

    Add minimal temporary instrumentation at suspected boundaries when needed.

    line 27
  4. Distinctive:

    Add the smallest test that reproduces the bug and confirm it fails for the proven reason before applying the fix.

    line 34
  5. Very specific:

    Use the lock-tests-first skill when the contract requires broader coverage.

    line 35
  6. Distinctive:

    Test boundary and failure cases suggested by the root cause.

    line 41

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

Find and prove the root cause before changing behavior. A disappearing symptom is not sufficient evidence of a correct fix.

Workflow

  1. Define the failure.
    • Record observed behavior, expected behavior, exact inputs, environment, frequency, timeline, and recent relevant changes.
    • Separate reported facts from assumptions.
  2. Establish a reliable reproduction.
    • Reproduce with the smallest safe case available.
    • Preserve the failing command, request, data shape, or user steps.
    • If reproduction is impossible, identify the missing evidence instead of guessing.
  3. Trace the relevant code path.
    • Inspect applicable instructions, entry points, state transitions, dependencies, error handling, and existing tests.
  4. Form ranked hypotheses.
    • Make each hypothesis specific and falsifiable.
    • State the observation that would support or reject it.
  5. Collect targeted evidence.
    • Use existing logs, stack traces, test output, browser state, query plans, profiles, metrics, or version history.
    • Add minimal temporary instrumentation at suspected boundaries when needed.
    • Change one investigative variable at a time.
  6. Identify the root cause.
    • Explain the causal chain from triggering condition to observed failure.
    • Show why the evidence favors it over competing hypotheses.
    • Reject symptom-masking fixes such as an unexplained null check or broad retry.
  7. Lock a regression test.
    • Add the smallest test that reproduces the bug and confirm it fails for the proven reason before applying the fix.
    • Use the lock-tests-first skill when the contract requires broader coverage.
  8. Apply a targeted fix.
    • Correct the cause with the smallest coherent change.
    • Preserve unrelated behavior and remove temporary instrumentation unless it provides lasting observability value.
  9. Verify.
    • Re-run the reproduction and regression test, then relevant surrounding checks.
    • Test boundary and failure cases suggested by the root cause.
    • Explain why the fix prevents recurrence rather than hiding the symptom.

Output

Provide the reproduction, evidence, root cause, rejected hypotheses, fix, regression protection, verification results, and residual uncertainty. Never claim a cause solely because a patch made the immediate error disappear.

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.