debugging-strategies

A set of methods for finding the cause of difficult or unpredictable software bugs. It uses repeatable reproduction, narrowing the failure to a specific part, testable explanations, and small fixes.

In plain words
What is it for?
Use it for production defects, unclear test failures, unfamiliar legacy code, and intermittent or flaky tests. It requires failing code or a scenario, source code, and an environment where the problem can be investigated.
Why use it?
It replaces guesswork with a process that makes the cause of a failure easier to verify.

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/kraitdev/skill.md/debugging-strategies
Any agent
npx skills add KraitDev/skiLL.Md --skill debugging-strategies
Clone the repo
git clone --depth 1 https://github.com/KraitDev/skiLL.Md

Made for: Claude Code, Codex.

Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,577 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.00017 $0.01577
Opus 5 $0.00009 $0.00788
Sonnet 5 $0.00003 $0.00315
Haiku 4.5 $0.00002 $0.00158

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

Security

Grade A, and why

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

skills/dev-tools/debugging-strategies/SKILL.md · 178 lines

How it starts

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

Debugging Strategies

Purpose

"Guess and check" programming wastes hours. This skill replaces randomness with the scientific method: reproduce the bug reliably, isolate the failing component via binary search, formulate testable hypotheses, and apply minimal fixes. The goal is deterministic bug resolution, not random fixes that seem to work.

When to use

  • Investigating a defect reported in production
  • Facing a failing test with no obvious root cause
  • Understanding unfamiliar or undocumented legacy code
  • Debugging intermittent failures (flaky tests)

When NOT to use

  • Performance optimization (use Caching Strategies or Database Query Optimization)
  • Code review (use Code Review Guidelines)
  • Architecture decisions (different concern)

Inputs required

  • Failing code, test, or end-to-end scenario
  • Ability to reproduce the failure
  • Source code and execution environment

Workflow

  1. Reproduce the Bug: Consistently replicate the failure state. If you CANNOT reproduce it, STOP (get more details). Write a failing test.
  2. Isolate the Subsystem: Use binary search (comment out code halves, use git bisect, add logging) to locate the exact module causing the issue
  3. Formulate Hypothesis: Propose WHY the failure is happening based on logs, stack traces, and code inspection
  4. Test Hypothesis: Add targeted logging or step through debugger to verify assumptions about state/variables at runtime
  5. Apply Minimal Fix: Change ONLY what's necessary to make the test pass (single line if possible)
  6. Verify Fix: Confirm the failing test now passes, and no other tests break
  7. Add Regression Test: Ensure this bug never reoccurs

Rules

  • MUST establish a reproducible test BEFORE changing code
  • MUST only change one variable or line at a time during hypothesis testing
  • MUST NOT apply multiple changes simultaneously (makes diagnosis impossible)
  • MUST use binary search for isolation (comment out halves, not random guessing)
  • MUST formulate a hypothesis before adding logging or changes
  • MUST keep the fix minimal (change only what caused the bug)

Read the full file on GitHub · 178 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. yesterday First seen · 178 lines · 17 tokens per session scan A c637c5fc7141

Subscribe to this mod's changes

debugging-strategies is a skill published in the GitHub repository KraitDev/skiLL.Md (7 stars, last pushed 2mo ago), licensed MIT. It adds 17 tokens to every session and 1,577 once invoked, about $0.0001 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

evaluate-pattern-adoption

Run or plan this repository's pattern-adoption evidence evaluation locally with signed-in Codex agents. Use when asked to refresh stale evidence, assess stable or exploratory patterns, evaluate one or all catalog patterns, discover possible new patterns, or prepare a reviewable evidence PR without model-backed GitHub…

PaulDuvall/ai-development-patterns · 68 tokens

contributing-to-awesome-claude

Use when writing, testing, or preparing ANY contribution or pull request to the JSONbored/awesome-claude (HeyClaude) repo — adding a community content entry (agent/MCP server/skill/hook/command/rule/guide/collection/statusline), or making a platform/code change (website, registry package, MCP package, scripts). The…

JSONbored/awesome-claude · 209 tokens

contributor-pipeline-gardening

Maintenance of the contributor issue pipeline for JSONbored/awesome-claude (HeyClaude) — closing issues that are already done but not marked so, and keeping a small, high-value contributor-available backlog stocked with real website/content/feature/bugfix work. Runs every 24h via a dedicated scheduled task. Invoke for…

JSONbored/awesome-claude · 196 tokens

skills

本目录保存按需阅读的项目参考文档。根目录 CLAUDE.md 负责最小项目上下文与硬性约定;本文档用于选择更详细的专题文档。.

neopen/video-clip-agent · 0 tokens

rails-audit-skill

Perform comprehensive technical reviews of Ruby on Rails applications. Runs automated analysis tools (RubyCritic, Brakeman, bundler-audit, Gitleaks, Debride, linters, SimpleCov, Rails stats, Rails ERD), analyzes code for architecture, security, authorization (Pundit/CanCanCan), dead code, and design issues, and…

rubyroidlabs/rails-audit-skill · 118 tokens

documentation-standards

This skill should be used when the user asks to "write documentation", "create docs", "document code", "improve documentation", "documentation best practices", "diataxis", "technical writing", "API documentation", "user guide", mentions documentation quality, documentation structure, or needs guidance on software…

hculap/better-code · 71 tokens