dev-debug

dev-debug is a command for Claude Code from christopherlouet/claude-base. It costs 0 tokens per session (372 once invoked), scanned A, original, MIT.

A structured method for finding the underlying cause of a software bug and fixing it. It covers reproducing the problem, investigating evidence, verifying the fix, and adding a regression test.

In plain words
What is it for?
Use it to analyze symptoms, logs, network requests, stack traces, or commit history, then apply and verify a focused fix.
Why use it?
It replaces guesswork with a repeatable investigation and helps prevent the same bug from returning.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

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 commands/christopherlouet/claude-base/dev-debug
Clone the repo
git clone --depth 1 https://github.com/christopherlouet/claude-base

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dev-debug

README.md
[![agentmods](https://agentmods.dev/badge/commands/christopherlouet/claude-base/dev-debug.svg)](https://agentmods.dev/commands/christopherlouet/claude-base/dev-debug)
Your own site
<a href="https://agentmods.dev/commands/christopherlouet/claude-base/dev-debug"><img src="https://agentmods.dev/badge/commands/christopherlouet/claude-base/dev-debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 372 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.1 $0.00000 $0.00372
Opus 5 $0.00000 $0.00186
Sonnet 5 $0.00000 $0.00074
Haiku 4.5 $0.00000 $0.00037

Measured 2d ago against content hash fdb40827d3ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

dev-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 2d 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.

.claude/commands/dev/dev-debug.md · 54 lines

What it actually says

Agent DEBUG

Methodical and systematic bug diagnostic and resolution.

Problem to analyze

$ARGUMENTS

Goal

Identify the root cause of a bug and fix it definitively, adding protections to prevent its recurrence.

Use the dev-debug skill for the detailed methodology (4 phases: Observation, Hypotheses, Investigation, Verification).

Workflow

  1. Reproduce: Confirm, isolate, collect info (symptom, env, frequency)
  2. Analyze: Logs, console, network, stack trace, git history
  3. Hypothesize: Hypothesis matrix (probability + validation test)
  4. Investigate: 5 Whys technique, git bisect for regressions
  5. Fix: Minimal fix at the root cause
  6. Prevent: Regression test

Expected output

Diagnostic

  • Symptom: Description of the observed behavior
  • Root cause: Identified fundamental cause
  • Impacted files: List with descriptions
  • Culprit commit: Hash (if found via bisect)

Solution

  • Applied fix: Description of the correction
  • Added test: Regression test
  • Verification: Bug fixed, tests pass, no side effects
Agent When to use it
/work:work-explore Understand the code context
/dev:dev-tdd Add regression tests
/work:work-commit Commit the fix

IMPORTANT: Never fix symptoms. Always find the root cause.

YOU MUST add a test that would have caught this bug.

YOU MUST document the root cause to prevent recurrence.

Think hard about why this bug was not detected earlier.

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. 2d ago First seen · 54 lines · 0 tokens per session scan A fdb40827d3ce

Subscribe to this mod's changes

dev-debug is a command published in the GitHub repository christopherlouet/claude-base (5 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 372 tokens. 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-09-03.