debug

debug is a command for Claude Code from kumaran-is/claude-code-onboarding. It costs 40 tokens per session (646 once invoked), scanned A, original, MIT.

Systematic debugging mode — loads the systematic-debugging skill and enforces root-cause-first investigation with structured output. Use when something is broken, a test fails, or behavior is unexpected.

Command for Claude Code

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/kumaran-is/claude-code-onboarding/debug
Clone the repo
git clone --depth 1 https://github.com/kumaran-is/claude-code-onboarding

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 debug

README.md
[![agentmods](https://agentmods.dev/badge/commands/kumaran-is/claude-code-onboarding/debug.svg)](https://agentmods.dev/commands/kumaran-is/claude-code-onboarding/debug)
Your own site
<a href="https://agentmods.dev/commands/kumaran-is/claude-code-onboarding/debug"><img src="https://agentmods.dev/badge/commands/kumaran-is/claude-code-onboarding/debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 646 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00040 $0.00646
Opus 5 $0.00020 $0.00323
Sonnet 5 $0.00008 $0.00129
Haiku 4.5 $0.00004 $0.00065

Measured today against content hash 1b57fe9214ce, 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 today.

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/debug.md · 74 lines

How it starts

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

Debug

Loads the systematic-debugging skill and enforces the 4-phase root-cause-first process.

Iron Law: NO fixes without root cause investigation first.

Input

$ARGUMENTS — description of the problem (e.g. "login fails intermittently", "NullPointerException in PaymentService:47", "Flutter app crashes on startup")

If $ARGUMENTS is empty, ask: "Describe the problem — paste the error message, stack trace, or reproduction steps."

Process

Load and follow systematic-debugging skill phases in order:

  1. Phase 1 — Root Cause Investigation

    • Read the error message completely (do not skim)
    • Reproduce consistently — exact steps, every time?
    • Check recent changes: git log --oneline -10, git diff HEAD~1
    • For multi-component systems: add diagnostic logging at each boundary before guessing
  2. Phase 2 — Pattern Analysis

    • Find a working equivalent in the codebase
    • List every difference between working and broken
  3. Phase 3 — Hypothesis and Testing

    • Form ONE hypothesis: "I think X is the root cause because Y"
    • Score it against alternatives using the hypothesis ranking table
    • Test minimally — one variable at a time
  4. Phase 4 — Implementation

    • Write a failing test that reproduces the bug
    • Fix the root cause, not the symptom
    • Verify: test passes, no other tests broken

Output Format

🔍 Symptom: [what is observable — exact error, stack trace, behavior]

🔎 Investigation:
- Recent changes: [git log summary or "none in past 10 commits"]
- Reproduction: [reproducible every time / intermittent / unclear]
- Evidence gathered: [what was read/logged/traced]

🎯 Root Cause: [one sentence — what is actually wrong and why]
  Hypothesis confidence: [X%] because [evidence]

✅ Fix: [the change — file:line]

🛡️ Prevention: [what would stop this class of bug recurring]

If You Hit 3+ Failed Fixes

Stop. Do not attempt Fix #4. Per systematic-debugging skill Phase 4.5:

  • Each fix revealing a new problem in a different place = architectural issue
  • Raise with the developer before continuing

Read the full file on GitHub · 74 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. today First seen · 74 lines · 40 tokens per session scan A 1b57fe9214ce

Subscribe to this mod's changes

debug is a command published in the GitHub repository kumaran-is/claude-code-onboarding (35 stars, last pushed 2mo ago), licensed MIT. It adds 40 tokens to every session and 646 once invoked, about $0.0002 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-09-03.