debugging-strategies

debugging-strategies is a skill for Claude Code, Codex from MadAppGang/claude-code. It costs 35 tokens per session (2,290 once invoked), scanned A, original, MIT.

A language-independent method for finding and fixing software bugs. It covers reproducing a problem, reading stack traces, isolating the failing code, testing possible causes, and checking the fix.

In plain words
What is it for?
Use it to investigate stack traces, add breakpoints or logging, narrow down failing code paths, verify fixes, and add regression tests.
Why use it?
It replaces guesswork with a repeatable way to trace errors back to their underlying cause and prevent them from returning.

Skill for Claude CodeCodex

Part of the dev plugin — 47 skills, 12 commands, 14 agents shipped together

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/madappgang/claude-code/debugging-strategies
Any agent
npx skills add MadAppGang/claude-code --skill debugging-strategies
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/claude-code

Made for: Claude Code, Codex.

Or install dev, the plugin that ships this one along with the rest of its 47 skills, 12 commands, 14 agents.

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 debugging-strategies

README.md
[![agentmods](https://agentmods.dev/badge/skills/madappgang/claude-code/debugging-strategies.svg)](https://agentmods.dev/skills/madappgang/claude-code/debugging-strategies)
Your own site
<a href="https://agentmods.dev/skills/madappgang/claude-code/debugging-strategies"><img src="https://agentmods.dev/badge/skills/madappgang/claude-code/debugging-strategies.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,290 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.00035 $0.02290
Opus 5 $0.00017 $0.01145
Sonnet 5 $0.00007 $0.00458
Haiku 4.5 $0.00003 $0.00229

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

Security

Grade A, and why

debugging-strategies 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.

plugins/dev/skills/core/debugging-strategies/SKILL.md · 393 lines

How it starts

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

Universal Debugging Strategies

Overview

Language-agnostic debugging techniques and strategies applicable across all technology stacks.

Debugging Methodology

The Scientific Method for Debugging

  1. Observe: Gather information about the bug
  2. Hypothesize: Form theories about the cause
  3. Predict: What would confirm/refute each theory?
  4. Test: Run experiments to validate
  5. Conclude: Identify root cause and fix

Systematic Approach

1. Reproduce the bug reliably
2. Isolate the failing code path
3. Trace backwards from the error
4. Identify the root cause
5. Verify the fix
6. Add tests to prevent regression

Error Analysis

Stack Trace Reading

Read stack traces bottom to top:

Error: Cannot read property 'name' of undefined
    at formatUser (src/utils/format.ts:42)      ← Error thrown here
    at processUsers (src/services/user.ts:28)    ← Called from here
    at UserList.render (src/components/UserList.tsx:15)
    at App.render (src/App.tsx:8)                ← Entry point

Focus on YOUR code - skip framework/library internals initially.

Error Categories

Category Examples Common Causes
Null/Undefined Cannot read property 'x' of undefined Missing data, async timing
Type Errors x is not a function Wrong type, typo
Logic Errors Wrong output, no error Incorrect conditions
Runtime Errors Out of bounds, division by zero Invalid input
Async Errors Unhandled promise rejection Missing error handler
Network Errors Timeout, connection refused API down, wrong URL

Debugging Techniques

Binary Search (Bisection)

When the bug is somewhere in a large codebase:

1. Find a known good state (commit, version)
2. Find current bad state
3. Test the midpoint
4. Narrow to half with bug
5. Repeat until found

Git bisect:

git bisect start
git bisect bad                    # Current commit is broken
git bisect good v1.0.0           # v1.0.0 was working
# Git checks out midpoint, test it
git bisect good/bad              # Mark and continue

Read the full file on GitHub · 393 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 · 393 lines · 35 tokens per session scan A b81ab42775a8

Subscribe to this mod's changes

debugging-strategies is a skill published in the GitHub repository MadAppGang/claude-code (279 stars, last pushed 5mo ago), licensed MIT. It adds 35 tokens to every session and 2,290 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.

Related

Other skills, from other repositories