debugging

A disciplined method for finding software bugs by reproducing the problem, checking what actually happened, testing one explanation at a time, and confirming the result.

In plain words
What is it for?
Use it when investigating errors, failing or unreliable tests, crashes, regressions, or production incidents.
Why use it?
It prevents guesswork, unrelated changes, and failed fixes from piling up. It also helps distinguish a real defect from expected slow or unusual behavior.

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

Made for: Claude Code, Codex.

Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,682 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.00100 $0.02682
Opus 5 $0.00050 $0.01341
Sonnet 5 $0.00020 $0.00536
Haiku 4.5 $0.00010 $0.00268

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

Security

Grade A, and why

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

sonu/skills/debugging/SKILL.md · 104 lines

How it starts

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

Debugging — hypothesis testing, not patch roulette

Debugging is a science experiment, not a repair job. You form a theory of what's wrong, make the one change that theory predicts will alter the outcome, and observe. Most debugging time is wasted by skipping that discipline: patching where the error appeared instead of where it originated, changing three things at once, or trying fixes in a loop and keeping the wreckage of the ones that failed. The rules below are the difference between an hour and a day — and between a fix and a fix-shaped bug.

How to apply this

Run the loop in order: reproduce (for a production report, pull the real event first — section 2 feeds section 1) → read → locate → hypothesize → test the hypothesis → fix → prove. Don't skip ahead to "fix" — a fix you can't connect to a confirmed cause is a guess with good posture.

And stop the line. When something unexpected breaks mid-task, this loop preempts the feature work — don't push past a failing test or broken build to keep building. Errors compound: an unfixed bug in step 3 makes steps 4–6 wrong, and the wreckage multiplies the diagnosis.

And know what isn't a defect. A system that is slow but correct hasn't failed, and running this loop at it produces hypotheses no reproduction can settle — that is [[performance]], which borrows the one-change rule below and adds the baseline that decides whether a change was worth keeping.


1. Reproduce it first — no reproduction, no fix

You cannot verify a fix for something you cannot make happen. Before theorizing, make the failure occur on demand: the exact command, input, and state that triggers it. Then shrink it — smallest input, fewest steps — because every element you remove is a suspect eliminated.

If you can't reproduce it, that's not a dead end; reproducing it is now the task — and it has moves, bucketed by what varies. Timing-dependent? Add timestamps around the suspect area, widen the race window with artificial delays (sleep/setTimeout at the suspected interleaving point), run under load or concurrency to raise the collision probability. Environment-dependent? Diff runtime versions, env vars, and data state (an empty vs. populated database changes whole code paths); try reproducing in CI, where the environment is clean. State-dependent? Run the failing scenario in isolation versus after other operations — a difference means leaked state; hunt globals, singletons, shared caches (a failing test gets this first: run it alone to rule out test pollution). Truly random? Log defensively at the suspected site, alert on the exact error signature, write down the observed conditions, and revisit on recurrence — that's a plan, not a shrug. A "fix" shipped against an unreproduced bug is a coin flip you can't even watch land.

Read the full file on GitHub · 104 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 104 lines · 100 tokens per session scan A 5d37760f02c2

Subscribe to this mod's changes

debugging is a skill published in the GitHub repository PrabhdeepSingh/claude-plugins (3 stars, last pushed 2d ago), licensed MIT. It adds 100 tokens to every session and 2,682 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

dummy-dataset

Generate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Use when creating test data, building mock datasets, or generating sample data for development and demos.

phuryn/pm-skills · 48 tokens

outcome-roadmap

Transform an output-focused roadmap into an outcome-focused one that communicates strategic intent. Rewrites initiatives as outcome statements reflecting user and business impacts. Use when shifting to outcome roadmaps, making a roadmap more strategic, or rewriting feature lists as outcomes.

phuryn/pm-skills · 53 tokens

release-notes

Generate user-facing release notes from tickets, PRDs, or changelogs. Creates clear, engaging summaries organized by category (new features, improvements, fixes). Use when writing release notes, creating changelogs, announcing product updates, or summarizing what shipped.

phuryn/pm-skills · 57 tokens

retro

Facilitate a structured sprint retrospective — what went well, what didn't, and prioritized action items with owners and deadlines. Use when running a retrospective, reflecting on a sprint, creating action items from team feedback, or learning how to run effective retros.

phuryn/pm-skills · 52 tokens

shipping-artifacts

The durable documentation set that makes an AI-built (vibe-coded) app reviewable before shipping. A small core every app needs — architecture, user/permission flows, permissions, variables/secrets, and a test-coverage map — plus conditional docs added only when they apply: emails, scheduled work, SEO, and embedded…

phuryn/pm-skills · 120 tokens

competitive-battlecard

Create sales-ready competitive battlecards comparing your product against a specific competitor — positioning, feature comparison, objection handling, and win/loss patterns. Use when preparing sales teams, creating competitive materials, or responding to 'why not competitor X?'.

phuryn/pm-skills · 52 tokens