agentleFS
rikilamadridrikilamadrid/pathfinder/skills/debug-issue/SKILL.md

debug-issue

Skill1 starsChanged 43 days agoMITView on GitHub

Diagnose an observed software failure systematically, identify the root cause with evidence, apply the smallest justified fix, and verify the failure is resolved without introducing regressions.

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use explore-codebase, refactor-safely and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • srclightSkill

    explore-codebase

    This skill should be used when the user asks to "explore this codebase", "understand this project", "give me an overview", "how does this work", "onboard me", "walk me through the architecture", "map the codebase", or any request to understand a codebase's structure, architecture, or design.

    Also in 5 projects that use this

  • srclightSkill

    refactor-safely

    This skill should be used when the user asks to "refactor", "rename", "move", "change a function signature", "extract a method", "delete unused code", "clean up", or any modification that could break callers or dependents. Provides a pre-change safety checklist using srclight's graph tools to assess blast radius before touching code.

    Also in 5 projects that use this

  • zbruhnkeSkill

    refactor-code

    Refactor code to improve clarity and maintainability without changing behavior. Use when improving readability, reducing complexity, or eliminating duplication.

    Also in 3 projects that use this

  • DockerSkill

    review-changes

    Review uncommitted or recently committed documentation changes for correctness, coherence, and style compliance. Use before creating a PR to catch issues. "review my changes", "review the diff", "check the fix before submitting", "does this look right".

    Also in 4 projects that use this

  • SentrySkill

    create-pr

    Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

    Also in 4 projects that use this

  • CloudflareSkill

    security-audit

    Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

28 rules. 0 are common, 25 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 25

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use Debug Issue when there is a concrete unexpected behavior such as:

    line 18
  2. Distinctive:

    Do not use it merely because implementation work is difficult.

    line 30
  3. Very specific:

    If the task is planned construction, use /ticket start.

    line 32
  4. Very specific:

    If the goal is reviewing completed implementation for possible defects, use /ticket review.

    line 34
  5. Very specific:

    If the real question is broad understanding of the repository, use learn-codebase.

    line 36
  6. Distinctive:

    Before proposing a fix, define:

    line 48
  7. Distinctive:

    Prefer the smallest reliable reproduction.

    line 58
  8. Distinctive:

    If the failure cannot be reproduced, preserve the available evidence and state that limitation explicitly.

    line 60
  9. Distinctive:

    Do not manufacture certainty.

    line 62
  10. Distinctive:

    Read only the code, logs, tests, configuration, dependencies, and context relevant to the failure.

    line 66
  11. Distinctive:

    Do not begin with broad refactoring.

    line 70
  12. Distinctive:

    Do not change unrelated code while still determining the cause.

    line 72
  13. Distinctive:

    Prefer hypotheses that explain all known symptoms rather than only one.

    line 85
  14. Distinctive:

    Do not create a long speculative list.

    line 87
  15. Distinctive:

    Test the cheapest hypothesis that meaningfully reduces uncertainty.

    line 91
  16. Distinctive:

    run one targeted test

    line 98
  17. Distinctive:

    check one dependency or configuration assumption

    line 101
  18. Distinctive:

    Avoid random edits intended only to "see if it works."

    line 107
  19. Distinctive:

    Do not call something the root cause merely because changing it makes the symptom disappear.

    line 111
  20. Distinctive:

    If the evidence only supports a workaround or probable cause, say so.

    line 120
  21. Distinctive:

    avoid dependency, architecture, schema, security, or workflow changes without required approval

    line 129
  22. Distinctive:

    prefer a focused regression test when appropriate

    line 130
  23. Distinctive:

    If the correct fix expands beyond the active feature or approval boundary, stop and explain the decision required.

    line 132
  24. Distinctive:

    no unrelated behavior changed

    line 145
  25. Distinctive:

    Do not declare success only because the code compiles or one unrelated test passes.

    line 147
  26. Distinctive:

    Stop and report rather than thrashing when:

    line 151
  27. Distinctive:

    When stopping, preserve what has been ruled out so the next attempt does not restart from zero.

    line 159
  28. Distinctive:

    If unresolved, state the exact next useful investigation step and what should not be repeated.

    line 195

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “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 Issue

Debug an observed failure by reducing uncertainty before changing code.

The goal is not to try fixes until something works.

The goal is to explain the failure well enough that the smallest correct fix becomes justified.

Reproduce before repairing.

When to use

Use Debug Issue when there is a concrete unexpected behavior such as:

  • a failing test
  • runtime error
  • broken feature
  • regression
  • incorrect output
  • integration failure
  • environment-specific failure
  • intermittent behavior that needs isolation
  • production or staging behavior that differs from expectation

Do not use it merely because implementation work is difficult.

If the task is planned construction, use /ticket start.

If the goal is reviewing completed implementation for possible defects, use /ticket review.

If the real question is broad understanding of the repository, use learn-codebase.

Goal

Answer:

What is failing, why is it failing, and what evidence proves the explanation?

Then apply the smallest justified correction and verify the original failure no longer occurs.

1. Establish the failure

Before proposing a fix, define:

  • expected behavior
  • actual behavior
  • where the failure occurs
  • how it was observed
  • whether it is reproducible
  • relevant environment or conditions
  • known recent changes when relevant

Prefer the smallest reliable reproduction.

If the failure cannot be reproduced, preserve the available evidence and state that limitation explicitly.

Do not manufacture certainty.

2. Inspect before changing

Read only the code, logs, tests, configuration, dependencies, and context relevant to the failure.

Identify the execution path involved.

Do not begin with broad refactoring.

Do not change unrelated code while still determining the cause.

3. Form hypotheses

Produce a small ranked set of plausible explanations.

For each hypothesis state:

  • why it fits the evidence
  • what evidence would support it
  • what evidence would disprove it
  • the cheapest useful test

Prefer hypotheses that explain all known symptoms rather than only one.

Do not create a long speculative list.

4. Test discriminating evidence

Test the cheapest hypothesis that meaningfully reduces uncertainty.

Change one explanatory variable at a time when practical.

Examples:

  • inspect a value at the failure boundary
  • run one targeted test
  • compare working and failing environments
  • trace one request
  • check one dependency or configuration assumption
  • temporarily instrument the relevant path
  • isolate one integration

A debugging action should answer a question.

Avoid random edits intended only to "see if it works."

5. Identify the root cause

Do not call something the root cause merely because changing it makes the symptom disappear.

A root-cause claim should explain:

  • why the failure occurred
  • why it occurred under the observed conditions
  • why the evidence supports this explanation
  • why competing explanations are less likely

If the evidence only supports a workaround or probable cause, say so.

6. Choose the smallest justified fix

Once the cause is sufficiently established:

  • fix the cause rather than only the visible symptom when practical
  • preserve existing behavior outside the failure
  • avoid unrelated cleanup
  • avoid dependency, architecture, schema, security, or workflow changes without required approval
  • prefer a focused regression test when appropriate

If the correct fix expands beyond the active feature or approval boundary, stop and explain the decision required.

7. Verify

Verification must include the original failure.

Where relevant also verify:

  • the reproduction now passes
  • nearby behavior still works
  • regression tests pass
  • edge/failure states remain correct
  • temporary instrumentation is removed
  • no unrelated behavior changed

Do not declare success only because the code compiles or one unrelated test passes.

8. Stop conditions

Stop and report rather than thrashing when:

  • 2–3 grounded hypotheses have been tested without reducing uncertainty
  • necessary evidence or environment access is unavailable
  • reproduction is too unstable to support a safe fix
  • the likely fix requires an unapproved architectural, dependency, security, data, or destructive change
  • the observed behavior conflicts with documented requirements and a human decision is needed

When stopping, preserve what has been ruled out so the next attempt does not restart from zero.

Output

Return:

Failure

Expected vs actual behavior and reproduction status.

Evidence

The relevant observations, logs, tests, or code paths.

Hypotheses tested

What was tested and what each result ruled in or out.

Root cause

The established cause, probable cause, or remaining uncertainty.

Fix

The smallest change made or recommended.

Verification

How the original failure and relevant regression surface were checked.

Residual risk

Anything still uncertain or unverified.

Handoff

If unresolved, state the exact next useful investigation step and what should not be repeated.

Boundaries

debug-issue diagnoses an observed failure.

It does not:

  • implement unrelated feature scope
  • perform a general repository review
  • replace /ticket review
  • replace /ticket complete
  • silently change architecture or dependencies
  • turn debugging into opportunistic refactoring
  • hide uncertainty behind a successful-looking workaround

Principles

Reproduce before repairing.

A debugging action should answer a question.

Change one explanatory variable at a time.

Fixes follow evidence, not guesses.

A symptom disappearing is not proof of root cause.

Preserve what has already been ruled out.

Stop when additional attempts are producing activity instead of information.

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.