debug

A structured debugging method based on gathering evidence, testing possible causes, and confirming the root cause.

In plain words
What is it for?
Use it to reproduce a bug, inspect errors and environment details, test likely explanations, and verify the confirmed cause.
Why use it?
It replaces guesswork with a repeatable investigation that records observations, hypotheses, experiments, and results.

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/fall-out-bug/sdp/debug
Any agent
npx skills add fall-out-bug/sdp --skill debug
Clone the repo
git clone --depth 1 https://github.com/fall-out-bug/sdp

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 548 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.00548
Opus 5 $0.00007 $0.00274
Sonnet 5 $0.00003 $0.00110
Haiku 4.5 $0.00001 $0.00055

Measured yesterday against content hash 7b69f169b205, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debug 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 yesterday.

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.

prompts/skills/debug/SKILL.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

@debug - Systematic Debugging

Evidence-based debugging using scientific method. Not "try stuff and see" -- systematic investigation.


EXECUTE THIS NOW

When user invokes @debug "<issue>":

Phase 1: OBSERVE - Gather Facts

Goal: Collect evidence WITHOUT forming hypotheses

Actions:

  1. Read error messages/logs completely
  2. Check git diff for recent changes
  3. Verify environment (Python version, dependencies)
  4. Check configuration files
  5. Reproduce the bug consistently

Output: Observation log with timestamps, error messages, environment state

Phase 2: HYPOTHESIZE - Form Theories

Goal: Create testable theories about root cause

Process:

  1. List ALL possible causes (brainstorm)
  2. Rank by likelihood (use evidence)
  3. Select TOP theory to test first
  4. Define falsification test

Output: Hypothesis list with ranked theories

Phase 3: EXPERIMENT - Test Theories

Goal: Run targeted tests to confirm/deny hypotheses

Actions:

  1. Design minimal experiment
  2. Run ONLY the experiment
  3. Record result objectively
  4. Move to next hypothesis if denied

Output: Experiment results with pass/fail

Phase 4: CONFIRM - Verify Root Cause

Goal: Confirm root cause and verify fix

Actions:

  1. Reproduce bug with root cause isolated
  2. Implement minimal fix
  3. Verify fix resolves issue
  4. Add regression test

Output: Root cause report + fix


When to Use

  • Tests failing unexpectedly
  • Production incidents
  • Bug reports with unclear cause
  • Performance degradation
  • Integration failures

Common Pitfalls

Pitfall Problem
Skipping observation Jumping to conclusions
Testing multiple things Can't isolate cause
Confirmation bias Only looking for proving evidence
Stopping at first fix Not understanding WHY it worked

Exit Criteria

  • Root cause identified
  • Fix implemented and verified
  • Regression test added

See Also

  • @bugfix - Quality bug fixes (P1/P2)
  • @hotfix - Emergency fixes (P0)
  • @issue - Bug classification and routing

Read the full file on GitHub · 106 lines

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. yesterday First seen · 106 lines · 14 tokens per session scan A 7b69f169b205

Subscribe to this mod's changes

debug is a skill published in the GitHub repository fall-out-bug/sdp (19 stars, last pushed 2mo ago), licensed MIT. It adds 14 tokens to every session and 548 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.