debug

debug is a skill for Claude Code from shennawardana23/skillme. It costs 94 tokens per session (1,156 once invoked), scanned A, original, Apache-2.0.

A four-phase method for fixing one software bug: reproduce it, isolate where it occurs, diagnose its cause, and apply a fix.

In plain words
What is it for?
Use it when you have a specific error, stack trace, or unexpected behavior and need to verify the cause before fixing it.
Why use it?
It replaces guesswork with evidence from the exact failure, execution path, inputs, and environment.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skillme plugin — 137 skills, 2 commands 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/shennawardana23/skillme/debug
Any agent
npx skills add shennawardana23/skillme --skill debug
Clone the repo
git clone --depth 1 https://github.com/shennawardana23/skillme

Made for: Claude Code.

Or install skillme, the plugin that ships this one along with the rest of its 137 skills, 2 commands.

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/skills/shennawardana23/skillme/debug.svg)](https://agentmods.dev/skills/shennawardana23/skillme/debug)
Your own site
<a href="https://agentmods.dev/skills/shennawardana23/skillme/debug"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,156 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.00094 $0.01156
Opus 5 $0.00047 $0.00578
Sonnet 5 $0.00019 $0.00231
Haiku 4.5 $0.00009 $0.00116

Measured 5d ago against content hash d88f133777af, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 5d 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.

skills/debug/SKILL.md · 92 lines

How it starts

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

Debug

Iron law

Do not guess. Do not apply a fix until you understand the root cause. Every fix must follow from evidence. "It might be X" is not sufficient — "evidence Y proves it is X" is.

Phase 1: reproduce

Establish a minimal reproduction before doing anything else:

  1. What exact input or action triggers the issue?
  2. What is the expected outcome? What is the actual outcome (exact error message, full stack trace)?
  3. Is it deterministic or intermittent?
  4. When did it start? What changed?

If you cannot reproduce it, you cannot fix it with confidence.

Phase 2: isolate

Narrow down the location:

  1. Binary search — which layer does the failure originate in?
  2. Remove variables — disable features, mock dependencies one at a time.
  3. Check inputs — is the problem in the data, not the code?
  4. Check environment — does it fail in prod but not dev, and why specifically?

For Go: check whether go test -race reveals it; add log.Printf("[DEBUG] state=%v", state) at layer boundaries; use dlv (Delve) for interactive stepping when a print-based binary search stalls.

Phase 3: diagnose

Identify the root cause with evidence: trace the execution path from input to failure; check every assumption (types, nil-ness, ordering, timing); for panics, read the stack trace top-to-bottom — the root cause is usually the deepest frame, not the one at the top where the panic surfaced.

Phase 4: fix

  1. Fix the root cause, not a symptom.
  2. Write a test that would have caught this bug — it should fail without the fix and pass with it.
  3. Check whether the same bug pattern exists in similar code elsewhere in the codebase.
  4. Update documentation if the behavior was wrong but previously undocumented as correct.

Common Go patterns

Symptom Likely cause Check
nil pointer dereference Unguarded pointer use Add a nil check before dereference
goroutine leak Missing stop signal Add a context.Context or done channel
data race Concurrent map/slice mutation Add a mutex, or use sync.Map
context deadline exceeded Missing timeout propagation Pass ctx into every blocking call on the path
unexpected log output Wrong logger instance Check which logger got wired at construction
test flakiness Time-dependent assertion Use an eventually/poll pattern instead of a fixed sleep

Read the full file on GitHub · 92 lines

Files

What ships with it

5 files 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. 5d ago First seen · 92 lines · 94 tokens per session scan A d88f133777af

Subscribe to this mod's changes

debug is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 8d ago), licensed Apache-2.0. It adds 94 tokens to every session and 1,156 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

systematic-debugging

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

obra/superpowers · 21 tokens

coding-protocol

Risk-scaled repo execution and code-evidence protocol. Skip architecture-only work, explanation, contract-preserving prose, and status. Use for contract changes, debugging, code review, implementation plans, and Git mutation; mixed tasks: only those parts.

lencx/skills · 54 tokens

fix-bug

Resolves a single bug from any starting evidence — Dash0 telemetry (span / log / web event / RUM error link), raw stack trace, error message, code pointer (file:line), screen recording, Linear ticket URL, or free-text symptom. Classifies the input, triages complexity (Phase 0.5) to pick between a fast lane and a full…

mthines/agent-skills · 343 tokens

holistic-analysis

Forces a full holistic re-analysis when a fix or refactor isn't working. Instead of continuing to patch in isolation, this skill triggers a structured step-back analysis that traces the entire execution path end-to-end — from entry point to exit — analyzing each block, every contract boundary, and the full data flow.…

mthines/agent-skills · 224 tokens

ci-auto-fix

Diagnoses a failed CI check, classifies it with an explicit verdict (code-bug | workflow-bug | dep-bug | env-bug | flaky | unsure), confidence-gates the fix (>=90 auto, 80-89 ask, <80 escalate), applies it, pushes, and iteratively verifies until CI passes — reverting the last commit if a brand-new failure appears.…

mthines/agent-skills · 154 tokens

playwright-trace-analyzer

Analyzes Playwright E2E trace.zip archives (and bare trace JSONL when unpacked). Extracts the action timeline, network waterfall, console errors, and DOM-snapshot anchors, then identifies the highest-impact problems (flaky waits, slow selectors, network bottlenecks, hung actions, unhandled console errors, navigation…

mthines/agent-skills · 232 tokens