debugging

A step-by-step method for finding and fixing bugs, regressions, and unexpected behavior. It starts with reproducing the problem, isolates its cause, verifies a hypothesis, applies a focused fix, and adds a test to prevent recurrence.

In plain words
What is it for?
Use it to investigate errors, trace regressions, diagnose intermittent or environment-specific failures, implement root-cause fixes, and add regression tests.
Why use it?
It reduces guesswork and avoids hiding symptoms with workarounds, while preserving a test for the problem that was fixed.

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

Made for: Claude Code, Codex.

Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 308 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.00045 $0.00308
Opus 5 $0.00023 $0.00154
Sonnet 5 $0.00009 $0.00062
Haiku 4.5 $0.00005 $0.00031

Measured yesterday against content hash 8c6c81655873, 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.

templates/skills/debugging/SKILL.md · 32 lines

What it actually says

Skill: Debugging

Root cause analysis. Fix causes, not symptoms.

Protocol

  1. Reproduce — Confirm the bug is reproducible. Get exact error, stack trace, input that triggers it.
  2. Isolate — Binary search the call stack. Last correct state? First incorrect state?
  3. Hypothesize — One hypothesis. What single change would cause this behavior?
  4. Verify — Test hypothesis with minimal reproduction. Add log or assertion to confirm.
  5. Fix — Fix only the root cause. Don't fix symptoms or add guards around bugs.
  6. Prevent — Add a test that would have caught this. Document the invariant.

Heuristics

  • Recent change? Check git log. Regression = diff caused it.
  • Intermittent? Look for race conditions, shared state, external timing.
  • Only in prod? Check environment differences: config, data scale, concurrency.
  • Works locally? Check dependency versions, build artifacts, env vars.

Anti-patterns

  • Adding workarounds without understanding root cause
  • Fixing multiple things simultaneously (masks which fix worked)
  • Guessing without a reproduction case
  • Adding try/catch to hide errors instead of fix them
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 · 32 lines · 45 tokens per session scan A 8c6c81655873

Subscribe to this mod's changes

debugging is a skill published in the GitHub repository hautc-it/cil (1 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 308 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.