agentleFS
lstmemerylstmemery/skills/skills/diagnosing-bugs/SKILL.md

diagnosing-bugs

Skill1 starsChanged 8 days agoMITView on GitHub

Diagnose bugs, failures, and performance regressions using an observed failure signal and targeted probes.

193 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, loop-me and 9 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.
  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 43 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 55 projects that use this

  • LesaniSkill

    writing-beats

    Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

    Also in 58 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 88 projects that use this

  • LesaniSkill

    writing-shape

    Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.

    Also in 56 projects that use this

  • ryotaroh180105Skill

    claude-handoff

    Hand the current conversation off to a fresh background agent that picks up the work immediately.

    Also in 41 projects that use this

  • +1 more from Lesani

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 180 edited versions we read keep these.

  • 6

    Distinctive

    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:

    Read relevant domain glossary and ADRs when exploring the codebase.

    line 12
  2. Distinctive:

    If no permitted feedback path can reproduce or detect the symptom, record the attempts and missing evidence.

    line 30
  3. Distinctive:

    Start with the strongest falsifiable hypothesis.

    line 43
  4. Distinctive:

    When a correct test seam exists, turn the reproducer into a regression test before the fix, observe the expected failure, apply the fix, …

    line 58
  5. Distinctive:

    If no suitable seam exists, document the architectural limitation rather than adding an implementation-mirroring test.

    line 63
  6. Distinctive:

    Remove tagged debug instrumentation and dispose of task-owned throwaway reproducers or retain them in a clearly marked debug location.

    line 69

“Common” is measured: kept by at least 6 in 10 of the 180 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

Diagnosing Bugs

Find and fix the cause of the user's exact symptom. Finish with evidence that the original scenario now passes, a meaningful regression test or a documented missing test seam, and temporary instrumentation removed.

Read relevant domain glossary and ADRs when exploring the codebase. Redact secrets before showing any command, output, or artifact; use environment variables for credentials and quote only signal-bearing captured lines.

Establish the feedback

Build and run one command that reaches the actual failing path and detects the reported symptom. Capture the invocation and redacted failure. A nearby crash or a command that merely runs successfully is not an adequate signal. Tighten setup, assertion specificity, and determinism enough to distinguish causes. For repro techniques or human-only actions, read FEEDBACK.md.

For intermittent failures, record workload, trials, failure rate, and conditions; increase reproducibility where feasible. Retain those conditions for the final comparison. A single passing run does not establish that a flake is fixed. For performance regressions, pin the workload and record baseline measurements before changing code; prefer a profiler, timing harness, or query plan to logs.

If no permitted feedback path can reproduce or detect the symptom, record the attempts and missing evidence. Ask for the smallest actionable prerequisite that the active runtime permits. Keep the diagnosis unresolved; do not present a speculative code change as a verified fix.

Narrow and test

Preserve the original scenario, then minimize enough to separate plausible causes. Remove inputs, callers, configuration, or steps one at a time while checking that the same symptom remains. Stop minimizing when additional cuts would not change the next diagnostic decision; exhaustive minimality is not a goal on its own.

Start with the strongest falsifiable hypothesis. One is sufficient when the observed signal directly identifies a cause. If alternatives remain plausible, or a probe contradicts the first explanation, rank the competing hypotheses and choose a discriminating probe. Each hypothesis names its prediction: “If X is the cause, changing Y will change the observed symptom in this way.” Share the current hypothesis or ranked alternatives with the user; proceed with permitted probes while awaiting any useful steering.

Change one variable per probe. Use debugger/REPL inspection when available; otherwise add targeted logs at the distinctions between hypotheses. Give instrumentation a unique prefix for cleanup. Retain evidence of which prediction passed or failed; a plausible story alone does not settle the cause.

Fix and verify

When a correct test seam exists, turn the reproducer into a regression test before the fix, observe the expected failure, apply the fix, then observe a pass. The test must exercise the real call pattern: a one-caller unit test cannot lock down a bug that requires several callers or a longer chain.

If no suitable seam exists, document the architectural limitation rather than adding an implementation-mirroring test. The original feedback command still has to verify the fix. Re-run it against the original, unminimized scenario; for flakes and performance compare the recorded conditions and measurements, including remaining uncertainty. Run repository-required relevant checks.

Remove tagged debug instrumentation and dispose of task-owned throwaway reproducers or retain them in a clearly marked debug location. Report the confirmed cause, fix, verification, and material limits; include that evidence in a commit/PR description when those artifacts are part of the task.

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.