debug

A debugging workflow for bugs, failed tests, unexpected behavior, slowdowns, and build or integration failures. It requires finding the underlying cause before proposing a fix.

In plain words
What is it for?
Use it to investigate technical failures, build a focused way to reproduce them, inspect project context, and narrow the problem before changing code.
Why use it?
It replaces guesswork with a repeatable feedback loop, such as a failing test or another clear pass-or-fail check. This makes it easier to test hypotheses and avoid unrelated fixes.

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

Made for: Claude Code, Codex.

Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,585 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.00038 $0.02585
Opus 5 $0.00019 $0.01293
Sonnet 5 $0.00008 $0.00517
Haiku 4.5 $0.00004 $0.00259

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

skills/debug/SKILL.md · 219 lines

How it starts

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

Debug

Part of the Build/Verify phases — see the workflow skill for tiers and sequencing.

Random fixes waste time and create new bugs. Quick patches mask underlying issues.

The Iron Law: NO FIXES WITHOUT ROOT-CAUSE INVESTIGATION FIRST.

Use for any technical issue — test failures, production bugs, unexpected behavior, performance problems, build failures, integration issues. Especially when under time pressure, when "just one quick fix" seems obvious, or when previous fixes didn't work. Debugging discipline is tier-independent: a T1 bug still gets a root cause (the process is fast for simple bugs).

Phase 0 — Read the local context

Before exploring, read the nearest CONTEXT.md and .handoff/ state if they exist — a correct mental model of the modules involved beats an hour of tracing.

Phase 1 — Build a feedback loop

This is the skill; everything else is mechanical. A tight pass/fail signal that goes red on this bug is what bisection, hypotheses, and instrumentation all consume. Without one, no amount of staring at code helps. Spend disproportionate effort here.

Ways to construct one, roughly in order:

  1. Failing test at whatever seam reaches the bug — unit, integration, e2e.
  2. Curl / HTTP script against a running dev server.
  3. CLI invocation with a fixture input, diffing stdout against known-good.
  4. Headless browser script (Playwright) — drives the UI, asserts on DOM/console/network.
  5. Replay a captured trace — save a real request/payload/event log, replay it in isolation.
  6. Throwaway harness — minimal subset of the system exercising the bug path.
  7. Property/fuzz loop — for "sometimes wrong output", run 1000 random inputs.
  8. Bisection harness — bug appeared between two known states? Automate the check and git bisect run it.
  9. Differential loop — same input through old vs new version, diff outputs.

Then tighten it: faster (cache setup, narrow scope), sharper (assert the exact symptom, not "didn't crash"), deterministic (pin time, seed RNG, isolate filesystem). A 2-second deterministic loop is a debugging superpower; a 30-second flaky one is barely better than none.

Read the full file on GitHub · 219 lines

Files

What ships with it

3 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. 2d ago First seen · 219 lines · 38 tokens per session scan A c9749016fc01

Subscribe to this mod's changes

debug is a skill published in the GitHub repository AbdurRafay2004/handoff (4 stars, last pushed 1mo ago), licensed MIT. It adds 38 tokens to every session and 2,585 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-31.

Related

Other skills, from other repositories

checkpoint

Write the current working state (task, decisions, files touched, open problems, next steps) to .amber/STATE.md so it survives compaction and session restarts. Use when the user asks to checkpoint/save state, before risky long operations, when context feels heavy, or before ending a work session.

yanfeid/claude-amber · 62 tokens

focus

Declare a focus contract for the current task to keep context lean — scopes which files/dirs are in play, bans out-of-scope exploration, and routes broad searches to subagents. Use when starting a task, when the user says "focus on X", or when the session is drifting across unrelated parts of the codebase.

yanfeid/claude-amber · 66 tokens

react

React UI patterns for apps/ui—Effects vs rendering, TanStack Query for all server data, useMemo, keys, event handlers. Start here when creating or editing React components.

ctxpipe-ai/ctxpipe · 38 tokens

diet

Audit what is eating the context window in this project (CLAUDE.md size, MCP servers, rules that should be skills) and produce a concrete slimming plan with estimated token savings. Use when the user complains about context filling up fast, frequent compaction, or asks to optimize/reduce context usage.

yanfeid/claude-amber · 61 tokens

resume

Reload saved working state from .amber/ (STATE.md, FOCUS.md, checkpoint.md) and continue the previous task. Use when the user says resume/continue where we left off, or at the start of a session in a project that has an .amber directory.

yanfeid/claude-amber · 55 tokens

project-memory

Use when resuming work after chat loss, switching AI models, migrating context to a new agent or workspace, or maintaining long-running research and project memory across sessions. Manages roadmap, decision log, hypotheses, research evidence, and recovery checkpoints as separate canonical files so no single transcript…

tasuku-9/project-memory-skill · 179 tokens