debug

A step-by-step method for finding and fixing software bugs by reproducing the problem, writing a test that shows it, and then changing the code.

In plain words
What is it for?
Use it for unexpected behavior, errors, or failing functionality when you need to reproduce the issue, narrow down its cause, fix it, and check the result.
Why use it?
It reduces guesswork by requiring evidence about what went wrong before a fix is made.

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

Made for: Claude Code, Codex.

Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,135 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.00030 $0.01135
Opus 5 $0.00015 $0.00567
Sonnet 5 $0.00006 $0.00227
Haiku 4.5 $0.00003 $0.00113

Measured 2d ago against content hash 34b155d43dcd, 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 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.

plugins/debug/skills/debug/SKILL.md · 114 lines

How it starts

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

Skill: Systematic Debugging

You have been called to debug. DO NOT make random fixes until you understand the problem.

Principles

"A bug you can reproduce reliably is half-fixed."

Step 1: Gather symptoms

Ask the user (if not yet clear):

  • What exactly are the symptoms? (what error, what wrong output, where does it crash)
  • When does it occur? (always, randomly, only in certain environments)
  • Did it work before? If so, what is the most recent change?
  • Is there an error message / stack trace? Paste it in.

Step 2: Reproduce

Before guessing the cause, reproduce in the local environment:

  • Run the command the user described
  • Open the file, call the function, send the request — recreate the conditions that trigger the error
  • Capture the full output

If CANNOT reproduce:

  • Tell the user clearly
  • Suggest steps to gather more information (add more logging, try different env, different version)
  • DO NOT make guesses and fix blindly when reproduction has not been achieved.

Step 3: Narrow down the cause

Apply the scientific method:

  1. Observe: what exactly is the wrong output compared to the expected correct output?
  2. Hypothesize: list 2-4 plausible causes, ranked by confidence.
  3. Verify: for each hypothesis, identify the experiment to validate it (which file to read, which command to run, what to log). Start with the hypothesis that has the lowest verification cost.
  4. Narrow down: bisect — split the suspicious space in half (commit, file, function, input range) until the smallest component causing the error is found.

Tools:

  • git bisect for regressions
  • Binary search in code: comment/uncomment to split in half
  • Add logging at key points (remember to remove after fixing)
  • Reproduce with the smallest possible input that triggers the error (minimal reproducer)

Step 4: Understand the cause (root cause, NOT the symptom)

When the error location is found:

  • Why does this code cause the error? (specific mechanism, not just "it's wrong")
  • Why was it written this way? (read git blame, read old PRs)
  • Are there other places in the codebase with a similar pattern? (use Grep — fixing one place is usually not enough)

Read the full file on GitHub · 114 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. 2d ago First seen · 114 lines · 30 tokens per session scan A 34b155d43dcd

Subscribe to this mod's changes

debug is a skill published in the GitHub repository MinhThang1009/dotclaude (20 stars, last pushed 1mo ago), licensed MIT. It adds 30 tokens to every session and 1,135 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-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens