agentleFS
drvossdrvoss/everything-copilot-cli/skills/development/diagnose/SKILL.md

diagnose

Skill47 starsChanged 4 months agoMITView on GitHub

Use when a bug or performance issue is still fuzzy — build the fastest feedback loop first, rank the leading hypotheses, and instrument only what narrows the search

126 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use to-prd, edit-article and 8 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

    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

  • AWSSkill

    setup-matt-pocock-skills

    Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

    Also in 27 projects that use this

  • AnasX7Skill

    setup-pre-commit

    Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.

    Also in 16 projects that use this

  • +2 more from kayaman

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 114 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:

    Create the fastest signal that tells you whether you are closer to the answer:

    line 35
  2. Distinctive:

    If a proposed fix does not improve that loop, it is too early to trust it.

    line 41
  3. Distinctive:

    Do not hold one vague hunch in your head.

    line 49
  4. Distinctive:

    Add only the probes needed to separate the top hypotheses.

    line 59
  5. Distinctive:

    Avoid "log everything" unless you have no tighter cut.

    line 65
  6. Distinctive:

    Remove temporary probes and write down:

    line 74

“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

Diagnose is for problems that are still poorly shaped. Before deep debugging, build the smallest feedback loop that proves whether each change helps or hurts. A fast loop usually does more for bug finding than another round of guesswork.

When to Use

  • The symptom is real, but the shortest reliable repro is still unclear
  • A bug, regression, or performance issue needs a faster test loop before fixing
  • Multiple causes seem plausible and you need to rank them instead of chasing all of them
  • The system is large enough that targeted instrumentation beats broad logging

When NOT to Use

Instead of diagnoseUse
You already have a stable repro and need root-cause disciplinesystematic-debugging
The failure is a compiler, type, or dependency errorfix-build-errors
The issue is security-sensitivesecurity-scan or pr-security-review

The 6-Step Loop

1. Build the feedback loop first

Create the fastest signal that tells you whether you are closer to the answer:

  • a narrow failing test
  • a single command that reproduces the symptom
  • a benchmark or script with stable inputs

If a proposed fix does not improve that loop, it is too early to trust it.

2. Reproduce

Capture the exact symptom, input, and environment. Shrink it until it is cheap to rerun.

3. Rank 3-5 hypotheses

Do not hold one vague hunch in your head. Write a short ranked list:

  1. most likely
  2. plausible alternative
  3. annoying edge case

Then test them in order, demoting the ones the evidence weakens.

4. Instrument narrowly

Add only the probes needed to separate the top hypotheses. Prefer:

  • one focused log or metric
  • one temporary assertion
  • one small trace around the suspect boundary

Avoid "log everything" unless you have no tighter cut.

5. Fix and add the regression check

Once one hypothesis is confirmed, make the smallest durable fix and lock it in with the same feedback loop that exposed it.

6. Clean up and record the root cause

Remove temporary probes and write down:

  • what the real failure was
  • which signal exposed it
  • what regression check now protects it

Common Rationalizations

RationalizationReality
"I'll know the bug when I see it."Without a loop, every change feels equally plausible.
"I need more logs everywhere."Untargeted logs create noise faster than clarity.
"I only have one theory."Rank multiple hypotheses so the next test actually rules something out.

Red Flags

  • The repro still depends on manual luck
  • You are editing code before defining the loop that will prove the fix
  • Logs keep growing, but no hypothesis gets ruled out
  • You cannot explain why hypothesis #1 beats hypothesis #2

Verification

  • The feedback loop is fast enough to run repeatedly
  • 3-5 concrete hypotheses were ranked
  • Instrumentation was targeted, not broad and permanent
  • The final fix is covered by a regression check

See Also

  • systematic-debugging — deeper 4-phase root-cause workflow once the loop exists
  • performance-optimization — measurement-driven performance work
  • tdd-workflow — turn the repro into a durable failing test

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.