agentleFS
zelixagzelixag/debug-probe/SKILL.md

debug-probe

Skill0 starsChanged 6 months agoMITView on GitHub

Hypothesis-driven runtime debugging with precise instrumentation. Use when debugging bugs, anomalies, or unexpected behavior where static code analysis is insufficient. 6-phase loop: hypothesize → instrument → reproduce → converge → fix → clean up. Triggers on: debug, diagnose, broken, bug, not working, unexpected behavior, investigate, root cause, probe.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. hathach/agentrc★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When you hit a bug that reading code can't resolve:

    line 11
  2. Distinctive:

    Never skip to fixing. Always clean up after.

    line 20
  3. Distinctive:

    Read relevant source code.

    line 26
  4. Distinctive:

    Only instrument to test hypotheses — no fishing expeditions

    line 38
  5. Very specific:

    Use diagLog('H1', 'key=val', ...) — outputs to both console and an in-memory buffer so users can export all logs at once after reproducing …

    line 44
  6. Distinctive:

    If expected paths aren't hit → is instrumentation on the right branch?

    line 52
  7. Very specific:

    Mandatory: Search for DIAG: remove after debug and:

    line 73
  8. Distinctive:

    Remove all temporary instrumentation code

    line 74
  9. Distinctive:

    Remove all diagnostic imports

    line 75
  10. Distinctive:

    Remove diagnostic buffer file if no longer referenced

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “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 Probe

Quick Start

When you hit a bug that reading code can't resolve:

  1. Hypothesize — Read source, generate 2-4 falsifiable hypotheses
  2. Instrument — Insert minimal logging (2-4 points per hypothesis), tag [DIAG_<topic>]
  3. Collect — Build → user reproduces → user exports logs
  4. Converge — Match logs to hypotheses → confirm root cause
  5. Fix — Minimal fix → verify with user
  6. Clean up — Remove ALL instrumentation, confirm build passes

Never skip to fixing. Always clean up after.

The 6 Phases

Phase 1: Hypothesize

Read relevant source code. Generate 2-4 testable hypotheses:

[H1] Root cause may be X → if true, log would show Y
[H2] Root cause may be Z → if true, log would show W

Share hypotheses with user before touching code.

Phase 2: Instrument

Rules:

  • Only instrument to test hypotheses — no fishing expeditions
  • Tag format: [DIAG_<topic>] (short topic like auth, render, state)
  • 2-4 instrumentation points per hypothesis
  • Mark ALL temporary code: // DIAG: remove after debug (adapt comment syntax to language)
  • Set up a diagnostic buffer (pick from TEMPLATES.md)

Use diagLog('H1', 'key=val', ...) — outputs to both console and an in-memory buffer so users can export all logs at once after reproducing the bug.

Phase 3: Collect

  1. Build & deploy
  2. User reproduces the bug
  3. User exports logs (dump function, console output, log file, etc.)
  4. Group logs by hypothesis tag ([DIAG][H1], [DIAG][H2])
  5. If expected paths aren't hit → is instrumentation on the right branch? → adjust and rebuild

Phase 4: Converge

SituationAction
Logs confirm a hypothesisConfirmed root cause → Phase 5
All hypotheses refutedNew hypotheses from log clues → Phase 2
Insufficient dataMore precise instrumentation → Phase 2

Max 2-3 iterations before escalating.

Phase 5: Fix & Verify

  1. Minimal fix targeting confirmed root cause
  2. Build → user verifies fix works
  3. Fix fails → keep key instrumentation, return to Phase 1
  4. Fix works → Phase 6

Phase 6: Clean Up

Mandatory. Search for DIAG: remove after debug and:

  1. Remove all temporary instrumentation code
  2. Remove all diagnostic imports
  3. Remove diagnostic buffer file if no longer referenced
  4. Build to confirm compilation passes
  5. Tell user: instrumentation removed, only fix remains

Anti-Patterns

  • ❌ Skip hypotheses, jump straight to "fixing"
  • ❌ Instrument 10+ points — precision beats coverage
  • ❌ Dump entire objects — signal drowns in noise
  • ❌ Forget Phase 6 cleanup — instrumentation rots
  • ❌ Claim "done" without user verification
  • ❌ Use raw console.log / print — use the diag buffer pattern

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.