agentleFS
ntaffziintaffzii/Skill-Agents/skills/engineering/diagnose/SKILL.md

diagnose

Skill4 starsChanged 3 months agoMITView on GitHub

Disciplined diagnosis loop for bugs, failing tests, crashes, incorrect behavior, and performance regressions. Use when the user asks to debug, investigate, diagnose, find root cause, or provides an error log, stack trace, flaky behavior, or regression.

126 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use zoom-out, to-issues and 10 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.
  • Hollis36Skill

    zoom-out

    Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.

    Also in 38 projects that use this

  • ninehillsSkill

    to-issues

    Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.

    Also in 34 projects that use this

  • Hollis36Skill

    to-prd

    Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.

    Also in 38 projects that use this

  • kayamanSkill

    edit-article

    Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

    Also in 11 projects that use this

  • kayamanSkill

    request-refactor-plan

    Guides creating a detailed refactor plan with tiny commits via user interview, then files it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

    Also in 9 projects that use this

  • AnasX7Skill

    scaffold-exercises

    Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

    Also in 13 projects that use this

  • +2 more from kayaman

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 114 edited versions we read keep these.

  • 13

    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:

    Use this skill to find root cause before changing code.

    line 8
  2. Distinctive:

    Prefer a fast deterministic signal: failing test, CLI command, curl script, browser script, replay harness, or benchmark.

    line 22
  3. Distinctive:

    If flaky, raise the reproduction rate with loops, stress, narrowed timing, pinned seeds, or isolated state.

    line 23
  4. Distinctive:

    Avoid fixing a nearby but different failure.

    line 28
  5. Distinctive:

    Prefer the hypothesis that explains every observed breadcrumb, not only the latest one.

    line 33
  6. Distinctive:

    Test one variable at a time.

    line 36
  7. Distinctive:

    Prefer debugger or REPL inspection when available.

    line 37
  8. Distinctive:

    Use targeted logs only at boundaries that distinguish hypotheses.

    line 38
  9. Distinctive:

    Keep a short ledger of experiments and observations when the investigation has more than one branch.

    line 40
  10. Distinctive:

    Write or preserve a regression signal before the fix when a correct seam exists.

    line 43
  11. Distinctive:

    Delete throwaway harnesses or move them to a clearly named debug location.

    line 49
  12. Distinctive:

    Stop and ask for missing artifacts when:

    line 54
  13. Distinctive:

    Do not invent a fix from code reading alone unless the user explicitly asks for a speculative review.

    line 60

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

Diagnose

Use this skill to find root cause before changing code.

Core Rule

Build a reliable feedback loop before committing to a hypothesis. If there is no runnable signal, create one or explain exactly what is missing.

Mantra

Reproduce, trace, falsify, validate.

Workflow

  1. Reproduce
    • Capture exact steps, inputs, environment, command, request, fixture, or UI path.
    • Prefer a fast deterministic signal: failing test, CLI command, curl script, browser script, replay harness, or benchmark.
    • If flaky, raise the reproduction rate with loops, stress, narrowed timing, pinned seeds, or isolated state.
  2. Minimize
    • Reduce the repro to the smallest case that still shows the bug.
    • Confirm the minimized failure is the same symptom the user reported.
    • Avoid fixing a nearby but different failure.
  3. Generate hypotheses
    • List 3 to 5 ranked hypotheses before testing.
    • For each, state a falsifiable prediction.
    • Prefer the hypothesis that explains every observed breadcrumb, not only the latest one.
  4. Instrument
    • Test one variable at a time.
    • Prefer debugger or REPL inspection when available.
    • Use targeted logs only at boundaries that distinguish hypotheses.
    • Tag temporary logs with a unique prefix such as [DEBUG-a4f2].
    • Keep a short ledger of experiments and observations when the investigation has more than one branch.
  5. Fix
    • Write or preserve a regression signal before the fix when a correct seam exists.
    • Apply the smallest change that addresses the root cause.
    • Re-run the original repro and the minimized repro.
  6. Clean up
    • Remove temporary instrumentation.
    • Delete throwaway harnesses or move them to a clearly named debug location.
    • State the root cause, mechanism, fix, and verification.

Stop Conditions

Stop and ask for missing artifacts when:

  • The issue cannot be reproduced locally.
  • The only repro depends on an external system the agent cannot access.
  • The user has logs, HAR files, screenshots, traces, or environment details that are required.

Do not invent a fix from code reading alone unless the user explicitly asks for a speculative review.

Output Format

End with:

  • Reproduction signal
  • Root cause
  • Fix summary
  • Verification commands
  • Remaining risk

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.