/install debug-probe
Debug Probe
Quick Start
When you hit a bug that reading code can't resolve:
- Hypothesize — Read source, generate 2-4 falsifiable hypotheses
- Instrument — Insert minimal logging (2-4 points per hypothesis), tag
[DIAG_\x3Ctopic>] - Collect — Build → user reproduces → user exports logs
- Converge — Match logs to hypotheses → confirm root cause
- Fix — Minimal fix → verify with user
- 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_\x3Ctopic>](short topic likeauth,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
- Build & deploy
- User reproduces the bug
- User exports logs (dump function, console output, log file, etc.)
- Group logs by hypothesis tag (
[DIAG][H1],[DIAG][H2]) - If expected paths aren't hit → is instrumentation on the right branch? → adjust and rebuild
Phase 4: Converge
| Situation | Action |
|---|---|
| Logs confirm a hypothesis | Confirmed root cause → Phase 5 |
| All hypotheses refuted | New hypotheses from log clues → Phase 2 |
| Insufficient data | More precise instrumentation → Phase 2 |
Max 2-3 iterations before escalating.
Phase 5: Fix & Verify
- Minimal fix targeting confirmed root cause
- Build → user verifies fix works
- Fix fails → keep key instrumentation, return to Phase 1
- Fix works → Phase 6
Phase 6: Clean Up
Mandatory. Search for DIAG: remove after debug and:
- Remove all temporary instrumentation code
- Remove all diagnostic imports
- Remove diagnostic buffer file if no longer referenced
- Build to confirm compilation passes
- 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
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install debug-probe - After installation, invoke the skill by name or use
/debug-probe - Provide required inputs per the skill's parameter spec and get structured output
What is Debug Probe?
Provides a precise six-phase hypothesis-driven runtime debugging process with minimal instrumentation to identify and fix root causes of unexpected behavior. It is an AI Agent Skill for Claude Code / OpenClaw, with 64 downloads so far.
How do I install Debug Probe?
Run "/install debug-probe" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Debug Probe free?
Yes, Debug Probe is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Debug Probe support?
Debug Probe is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Debug Probe?
It is built and maintained by Bio (@zelixag); the current version is v1.0.0.