systematic-debugging

A step-by-step method for finding the underlying cause of a software bug before changing code. It uses reproduction, evidence from errors and code history, and small tests of one explanation at a time.

In plain words
What is it for?
Use it to reproduce a bug, trace incorrect data, compare related code, inspect recent changes, test possible causes, and write a failing test before applying a fix.
Why use it?
It reduces guesswork and avoids patches that only hide symptoms or create new failures.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/0xranx/agentbrief/systematic-debugging
Any agent
npx skills add 0xranx/agentbrief --skill systematic-debugging
Clone the repo
git clone --depth 1 https://github.com/0xranx/agentbrief

Made for: Claude Code, Codex.

Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 400 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.00400
Opus 5 $0.00007 $0.00200
Sonnet 5 $0.00003 $0.00080
Haiku 4.5 $0.00001 $0.00040

Measured 3d ago against content hash 94987a19271a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

systematic-debugging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

briefs/devops-sre/skills/systematic-debugging/SKILL.md · 47 lines

What it actually says

Methodology from obra/superpowers (MIT)

Systematic Debugging

Core rule: find the root cause before writing any fix.

Phase 1 -- Root Cause Investigation

  1. Reproduce the bug with the simplest possible input.
  2. Read the actual error message / stack trace. Do NOT guess.
  3. Trace the data flow backwards from the failure site to the origin.
  4. Identify the earliest point where observed behavior diverges from expected.

Phase 2 -- Pattern Analysis

  1. Search the codebase for similar patterns (same API, same data path).
  2. Check recent changes (git log, git blame) near the failure site.
  3. Look for related open issues or past fixes for the same component.
  4. Note if the bug is deterministic or intermittent -- intermittent implies concurrency, timing, or external state.

Phase 3 -- Hypothesis Testing

  1. Form exactly one hypothesis at a time.
  2. Design a minimal experiment that can confirm or refute it.
  3. Run the experiment. Read the output fully.
  4. If refuted, discard the hypothesis and return to Phase 1 or 2. Do NOT patch and hope.

Phase 4 -- Implementation

  1. Write a failing test that demonstrates the root cause.
  2. Apply the smallest change that makes the test pass.
  3. Run the full test suite to check for regressions.
  4. Verify the original reproduction case is resolved.
  5. Document why the bug happened, not just what you changed.

Anti-patterns to Avoid

  • Shotgun debugging: making multiple changes at once.
  • Fixing symptoms instead of root causes.
  • Claiming "fixed" without re-running the reproduction case.
  • Skipping the hypothesis step and jumping straight to code changes.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 47 lines · 14 tokens per session scan A 94987a19271a

Subscribe to this mod's changes

systematic-debugging is a skill published in the GitHub repository 0xranx/agentbrief (45 stars, last pushed 5mo ago), licensed MIT. It adds 14 tokens to every session and 400 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.