agentleFS
devnomad-bytedevnomad-byte/techneering/skills/diagnose/SKILL.md

diagnose

Skill13 starsChanged 5 months agoMITView on GitHub

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

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

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 114 edited versions we read keep these.

  • 9

    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:

    If you haven't completed Phase 1, you cannot propose fixes.

    line 22
  2. Distinctive:

    Don't skip past errors or warnings

    line 33
  3. Distinctive:

    Read stack traces completely

    line 34
  4. Distinctive:

    Run once to gather evidence showing WHERE it breaks

    line 47
  5. Distinctive:

    Keep tracing up until you find the source

    line 51
  6. Distinctive:

    Create failing test case (use tn:redgreen)

    line 70
  7. Distinctive:

    If 3+ fixes failed: Stop. Question the architecture.

    line 73
  8. Distinctive:

    If 3+ fix attempts fail, stop and question the architecture

    line 115
  9. Distinctive:

    Never propose fixes without completing Phase 1 (root cause investigation)

    line 116

“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

Systematic Debugging

Core Principle

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
Violating the letter of this process is violating the spirit of debugging.

The Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

If you haven't completed Phase 1, you cannot propose fixes.

The Four Phases

You MUST complete each phase before proceeding to the next.

Phase 1: Root Cause Investigation

BEFORE attempting ANY fix:

  1. Read Error Messages Carefully
    • Don't skip past errors or warnings
    • Read stack traces completely
    • Note line numbers, file paths, error codes
  2. Reproduce Consistently
    • Can you trigger it reliably?
    • What are the exact steps?
  3. Check Recent Changes
    • Git diff, recent commits
    • New dependencies, config changes
  4. Gather Evidence in Multi-Component Systems
    • For each component boundary: log data in/out
    • Run once to gather evidence showing WHERE it breaks
  5. Trace Data Flow
    • Where does bad value originate?
    • Keep tracing up until you find the source
    • Fix at source, not at symptom

Phase 2: Pattern Analysis

  1. Find working examples in same codebase
  2. Compare against references (read COMPLETELY)
  3. List every difference between working and broken
  4. Understand dependencies and assumptions

Phase 3: Hypothesis and Testing

  1. Form Single Hypothesis — "I think X is the root cause because Y"
  2. Test Minimally — Smallest possible change, one variable
  3. Verify Before Continuing — Did it work?
  4. When You Don't Know — Say "I don't understand X"

Phase 4: Implementation

  1. Create failing test case (use tn:redgreen)
  2. Implement single fix
  3. Verify fix
  4. If 3+ fixes failed: Stop. Question the architecture. Discuss with user.

Red Flags - STOP and Follow Process

  • "Quick fix for now, investigate later"
  • "Just try changing X and see if it works"
  • Proposing solutions before tracing data flow
  • "One more fix attempt" (when already tried 2+)
  • Each fix reveals new problem in different place

All of these mean: STOP. Return to Phase 1.

Common Rationalizations

ExcuseReality
"Issue is simple, don't need process"Simple issues have root causes too
"Emergency, no time for process"Systematic debugging is FASTER than thrashing
"Just try this first"First fix sets the pattern. Do it right
"Multiple fixes at once saves time"Can't isolate what worked
"One more fix attempt" (after 2+)3+ failures = architectural problem

Quick Reference

DimensionKey point
PhasesRoot cause investigation → pattern analysis → hypothesis testing → implement fix
Iron lawNo fix proposals allowed before Phase 1 is complete
Loop limit3+ failed fix attempts → stop and discuss architecture
Forbidden"just try" / "quick fix" / fixing without reading error messages
Next stepAfter fix, invoke tn:redgreen to verify

Next Step

When done:

  • Normal case → invoke tn:redgreen, verify the fix with red-green-refactor → after TDD, invoke tn:gate (show menu)
  • 3+ failed fix attempts → pause, discuss architecture issues with the user
  • User requests stop → end the current flow

Guardrails

  • Complete each phase before proceeding to the next — no skipping
  • If 3+ fix attempts fail, stop and question the architecture
  • Never propose fixes without completing Phase 1 (root cause investigation)
  • Symptom fixes are failure — fix at the source, not at the symptom
  • Violating the letter of this process is violating the spirit of debugging

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.