debug

debug is a skill for Claude Code, Codex from tahirraufkeeyu/software-development-agent-stack--sdas. It costs 66 tokens per session (1,737 once invoked), scanned A, original, MIT.

A structured debugging guide for investigating bugs, failing tests, unexpected results, and production incidents. It works through reproduction, isolation, a likely cause, verification, a fix, and a regression test.

In plain words
What is it for?
Use it to diagnose regressions, flaky tests, environment-specific failures, and other behaviour that differs from what was expected.
Why use it?
It helps prevent fixes that only hide a symptom or happen to work once, while keeping the investigation clear and repeatable.

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/tahirraufkeeyu/software-development-agent-stack--sdas/debug
Any agent
npx skills add tahirraufkeeyu/software-development-agent-stack--sdas --skill debug
Clone the repo
git clone --depth 1 https://github.com/tahirraufkeeyu/software-development-agent-stack--sdas

Made for: Claude Code, Codex.

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/tahirraufkeeyu/software-development-agent-stack--sdas/debug.svg)](https://agentmods.dev/skills/tahirraufkeeyu/software-development-agent-stack--sdas/debug)
Your own site
<a href="https://agentmods.dev/skills/tahirraufkeeyu/software-development-agent-stack--sdas/debug"><img src="https://agentmods.dev/badge/skills/tahirraufkeeyu/software-development-agent-stack--sdas/debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,737 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.00066 $0.01737
Opus 5 $0.00033 $0.00869
Sonnet 5 $0.00013 $0.00347
Haiku 4.5 $0.00007 $0.00174

Measured 4d ago against content hash 66ab3076d0b1, 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 4d 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.

departments/developers/skills/debug/SKILL.md · 123 lines

How it starts

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

When to use

  • User pastes an error, stack trace, failing test, or describes incorrect behaviour.
  • Something works in staging but fails in production (or vice versa).
  • A commit or dependency upgrade introduced a regression; git bisect is the right tool.
  • A flaky test needs diagnosis (not just a retry).

Do not use this skill to write new features, to review a PR, or to answer "how do I use library X" — those are separate skills.

Inputs

  • Symptom description, with as much context as the user has: error message, stack trace, steps to reproduce, environment (OS, runtime version, recent deploys).
  • Access to logs, metrics, or a reproducible environment if possible.

Outputs

  • A short session report with six sections: Symptom, Reproduction, Isolation, Hypothesis, Verification, Fix + Regression test.
  • A patch that fixes the root cause (not just the symptom).
  • At least one new automated test that fails on the pre-fix code and passes on the post-fix code.

Tool dependencies

  • Read, Grep, Glob, Edit for code.
  • Bash for the test runner, git bisect, git log, and language-specific debuggers (pdb, node --inspect, dlv, lldb, rust-gdb).
  • Optional: a log aggregator MCP, or a profiler when the bug is performance-shaped.

Procedure

  1. Symptom: restate the bug in one sentence. Include the expected behaviour next to the observed behaviour. If these two sentences are not both concrete and observable, ask the user to make them so before continuing.
  2. Reproduce locally. A bug you cannot reproduce you cannot fix with confidence. Steps:
    • Capture the exact input and environment.
    • Reduce to the smallest failing case: shrink the input, strip unrelated configuration, run with a single worker, drop from integration to unit scope if possible.
    • If the bug needs a specific wall-clock or RNG, fake them.
    • If it is race-conditiony, run the repro in a loop (while pytest -x; do :; done) for at least a minute or use a deterministic scheduler.
    • If it is environment-specific, document the minimal environment. Never skip this step with "I'll just trust the logs".
  3. Isolate with binary search. If the bug appeared after some change, run git bisect:
    git bisect start
    git bisect bad HEAD
    git bisect good <last-known-good>
    git bisect run <script-that-exits-nonzero-on-bug>
    
    For data-shape bugs, bisect inputs instead of commits: halve the failing input until the minimum repro is obtained.
  4. Hypothesise. Before editing any code, write down the hypothesis: "the bug is caused by X because Y, which implies the symptom Z". If you cannot finish that sentence, you do not understand the bug yet — go back to step 2.
  5. Verify the hypothesis. Make a cheap observation that would distinguish the hypothesis from its competitors: add a log, set a breakpoint, run an assertion, query the DB. Confirm the hypothesis matches reality end-to-end — not "the symptom went away" but "the predicted intermediate state is present".
  6. Fix the root cause, not the symptom. A patch that makes the failing test pass can still be a coincidence. Specifically:
    • If you added a null-check, explain why the value is null and whether upstream is the real fault.
    • If you added a retry, explain why the first attempt fails and whether retry is an acceptable policy.
    • If you added a try/except, explain what invariant was actually violated. Record the causal chain in the report.
  7. Add a regression test. The test must fail on the pre-fix code and pass after. Invoke the test-writer skill to place and name it conventionally. If the bug was a race, the test must deterministically reproduce it (synchronised scheduler, controlled clock); a probabilistic test is unacceptable.
  8. Verify the fix does not regress neighbours. Run the full test suite plus any integration/e2e gates. For performance bugs, run the relevant benchmark.
  9. Write the report. Keep it short; link logs and commits rather than pasting them. Example format below.

Read the full file on GitHub · 123 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. 4d ago First seen · 123 lines · 66 tokens per session scan A 66ab3076d0b1

Subscribe to this mod's changes

debug is a skill published in the GitHub repository tahirraufkeeyu/software-development-agent-stack--sdas (18 stars, last pushed 4mo ago), licensed MIT. It adds 66 tokens to every session and 1,737 once invoked, about $0.0003 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

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 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