Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
thananon avatar

Debug Mantra

  • 3.5k installs
  • 3.1k repo stars
  • Updated June 14, 2026
  • thananon/9arm-skills

debug-mantra is an agent skill that applies a four-step debugging discipline covering reproduction, fail path tracing, hypothesis falsification, and experiment ledger cross-reference.

About

debug-mantra is an agent skill that enforces a four-step debugging discipline triggered by /debug-mantra or whenever users report bugs, failures, stack traces, or investigation requests. Agents recite a verbatim mantra block first covering reproducibility, knowing the fail path, questioning hypotheses, and treating every run as a breadcrumb, then apply the steps in order before proposing fixes. Step one demands a fast deterministic repro artifact such as a failing test or curl script, escalating flaky cases through loops and stress until failure rates are debuggable. Step two prioritizes debugger attachment, then source tracing with knob enumeration across config flags and timing, then tagged in-code instrumentation with unique prefixes like DBG-a4f2. Step three requires disproof-first hypothesis testing with three to five ranked candidates. Step four maintains a ledger of experiments cross-referenced against all prior observations. Operating rules forbid fix proposals before reliable repro, hypothesis testing before fail path narrowing, or declaring success without ledger confirmation. Developers reach for it when they need structured debug sessions instead of immediate guess-and.

  • Opens debug sessions with a verbatim four-line mantra recited once per session.
  • Requires reliable one to five second deterministic repro before any fix proposal.
  • Orders fail path tactics: debugger first, knob enumeration second, tagged instrumentation third.
  • Mandates disproof-first hypothesis testing with three to five ranked candidates.
  • Maintains an experiment ledger cross-referencing every breadcrumb before accepting root cause.

Debug Mantra by the numbers

  • 3,549 all-time installs (skills.sh)
  • +198 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #24 of 596 Debugging skills by installs in the Skillselion catalog
  • Security screen: CRITICAL risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

debug-mantra capabilities & compatibility

Capabilities
mantra guided debug workflow · repro harness requirements · fail path escalation tactics · hypothesis disproof ordering · experiment ledger tracking
Use cases
debugging · testing
From the docs

What debug-mantra says it does

First is reproducibility.
SKILL.md
Do not propose a fix before #1 is satisfied (reliable repro exists).
SKILL.md
npx skills add https://github.com/thananon/9arm-skills --skill debug-mantra

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3.5k
repo stars3.1k
Security audit2 / 3 scanners passed
Last updatedJune 14, 2026
Repositorythananon/9arm-skills

How do I debug systematically instead of guessing fixes before I have a reliable repro and validated root cause?

Apply a four-step debug discipline: reproduce, trace the fail path, falsify hypotheses, and cross-reference every experiment breadcrumb.

Who is it for?

Developers investigating bugs, stack traces, flaky failures, or broken behavior who need ordered debug discipline.

Skip if: Skip when the user explicitly wants a quick patch without investigation or the issue is feature design rather than defect diagnosis.

When should I use this skill?

User reports a bug, pastes a stack trace, asks to debug or diagnose, or triggers /debug-mantra at session start.

What you get

A verified root cause supported by deterministic repro, narrowed fail path, surviving disproof tests, and a consistent experiment ledger.

  • reproduction steps
  • traced fail paths
  • falsified hypotheses

By the numbers

  • Enforces 4 ordered debugging steps before any fix proposal

Files

SKILL.mdMarkdownGitHub ↗

Debug Mantra

Four-step discipline for any debug session. Recite verbatim, then apply in order.

Recite this — verbatim, as the first thing in your first response

Mantra:
1. First is reproducibility. Can the issue be reproduced reliably?
2. Know the fail path. Debugger first; then source trace + knob enumeration; then in-code instrumentation.
3. Question your hypothesis. What would disprove it?
4. Every run is a breadcrumb. Cross-reference all of them.

Then begin work.

---

1. Reproduce reliably

Build a runnable repro before anything else.

  • Reliable repro → capture the exact steps, inputs, and environment as a runnable artifact: failing test, curl script, CLI invocation, replay harness.
  • Flaky repro → the bug is not yet debuggable. Raise the rate first: loop the trigger, parallelise, add stress, narrow timing windows, inject sleeps. 50% flake is debuggable; 1% is not.
  • No repro at all → stop. Say so explicitly. Ask the user for env access, captured artifacts (HAR, log dump, core), or permission to instrument. Do not proceed to hypothesise.

Target: a fast (1–5 s), deterministic pass/fail signal. Pin time, seed the RNG, freeze network, isolate filesystem.

2. Know the fail path

Once reproducible, find where the code breaks and what stops it from breaking. The differential narrows the search. Try in this order — escalate only when the prior tactic fails.

1. Attach a debugger. If the env supports it, attach and step to the failure site. One breakpoint beats ten logs. Do this before turning any knobs. 2. Source trace + knob enumeration. If no debugger (or it can't reach the bug), trace the code path end-to-end and list every knob that can influence the outcome:

  • config flags, env vars, feature toggles
  • branch conditions, input shape
  • timing, concurrency, build options

Each knob is a candidate axis to flip in the differential. Flip one at a time. 3. In-code instrumentation. If outside knobs can't move the failure, go inside: printf / log statements at the suspected fail site, dump the relevant internal state. Tag every probe with a unique prefix (e.g. [DBG-a4f2]) so cleanup is a single grep. Let the trace show where reality diverges from your model.

3. Falsify the hypothesis

When a candidate root cause surfaces, scrutinise it before testing it.

  • Does it actually explain the symptom end-to-end? Walk it through.
  • What is the simplest proof? What is the cleanest disproof?
  • Run the disproof first. If the hypothesis survives, it's real. If it dies, you saved yourself from chasing a phantom.
  • Generate 3–5 ranked hypotheses, not one. Single-hypothesis thinking anchors on the first plausible idea.

4. Every run is a breadcrumb

Maintain a running ledger of every experiment in this session. Each entry: what changed, what happened, what it ruled in or out.

  • When a new hypothesis surfaces, walk the ledger. Does it hold for every prior observation, not just the most recent?
  • If any past run contradicts it, the hypothesis is wrong or incomplete — refine or discard.
  • When in doubt, design the single experiment whose outcome makes it certain. Run that next, instead of churning on adjacent runs.
  • Update the ledger after every run. It is your memory across the session.

---

Operating rules

  • Recite the mantra block once per debug session, in your first response. Do not re-recite mid-session.
  • Recite verbatim. Never paraphrase, shorten, or skip lines of the recital.
  • If the user says "skip the mantra" → skip the recital but still apply the four steps silently.
  • Apply the four steps in order:
  • Do not propose a fix before #1 is satisfied (reliable repro exists).
  • Do not start testing hypotheses before #2 has narrowed the fail path.
  • Do not commit to a hypothesis before #3 has tried to disprove it.
  • Do not declare a hypothesis correct until #4 confirms it against every prior breadcrumb.
  • If you catch yourself proposing a fix without a reliable repro, stop and return to step 1.
  • The mantra is a constraint you carry through the session — not advice to deliver back to the user.

Related skills

How it compares

Use debug-mantra for disciplined investigation rituals; use framework-specific profiling skills when the bottleneck is performance not correctness.

FAQ

What must happen before proposing a fix?

Step one requires a reliable reproducible failing artifact; fixes are forbidden until that exists.

What order should fail path tactics follow?

Attach a debugger first, enumerate external knobs second, and add tagged in-code instrumentation only when needed.

How should hypotheses be tested?

Generate three to five ranked hypotheses and run the cleanest disproof experiment first before confirming cause.

Is Debug Mantra safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Debuggingtesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.