Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

debugging

БесплатноБез исполняемых скриптовНе проверен

ALWAYS load when investigating bugs, failures, or unexpected behavior - ensures root cause analysis before attempting fixes.

ProteoWizardот ProteoWizard★ 21 звезда на GitHub4 установки в других каталогах

Об этом скилле

Debugging Mode

Trust comes from verifiers, not from the LLM. Every technique below is a way to build a verifier the model cannot talk around: a failing test, a printf line, a diff that is either zero or nonzero. The trustworthiness of any conclusion in this mode is bounded above by the strength of the verifier that produced it. See ai/docs/validation-cycle-principles.md for the full framing.

When investigating bugs, failures, or unexpected behavior, shift into debugging mode. This is fundamentally different from development mode.

Core Documentation

Read these files before investigating:

  1. ai/docs/debugging-principles.md - Complete methodology

    • Cycle time analysis
    • Printf debugging techniques
    • Bisection methodology
    • Long-cycle/intermittent strategies
    • Diagnostic output toolkit
  2. ai/docs/leak-debugging-guide.md - Handle/memory leak specifics

    • For leak-specific workflows, load the leak-debugging skill instead

The First Questions

Always start by answering these:

  1. Can it be reproduced? → Determines entire strategy
  2. What is the cycle time? → How long to confirm presence/absence?
  3. Can cycle time be reduced? → Invest effort here first
  4. What is reproduction confidence? → 100% vs intermittent

Quick Reference: Strategy by Cycle Time

Cycle Time Strategy
< 1 min Printf debugging, rapid bisection, be self-sufficient
1-60 min Batch diagnostics, careful hypothesis
Hours+ Statistical bisection or strategic instrumentation
Intermittent only Fix the message, measure per-execution rate, soak (see below)

Critical Principle: Fix the Message Before the Bug

If the failure message cannot say what happened, improving it is the first fix, not a detour.

See ai/docs/debugging-principles.md → "Intermittent Test Failures" for the full method, the soak recipe, and worked numbers. Key points:

  • A mute assertion is itself the bug to fix first - distinct from the printf instrumentation below, which targets a code path you already suspect
  • Count executions, not suite runs - the denominator decides whether a flake looks hopeless or trivially soakable
  • Run a control before blaming your own change - suites have a baseline flake rate

Critical Principle: Self-Sufficiency

Never ask the user about runtime behavior you can observe yourself.

When cycle time is fast:

  • Don't ask "is it the same object?" → Add Console.WriteLine($"Instance: {RuntimeHelpers.GetHashCode(obj)}")
  • Don't ask "what thread?" → Add Console.WriteLine($"Thread: {Thread.CurrentThread.ManagedThreadId}")
  • Don't ask the user to run the debugger → Instrument the code with printf statements and run the test yourself

You can answer your own questions faster and more comprehensively than any human operating a debugger.

Critical Principle: Prove It From Inside — Never Assert From Outside

Never claim to know what code does at runtime from reading it. Instrument and observe.

See ai/docs/debugging-principles.md → "Prove It From Inside" for the full methodology, failure modes, and examples. Key points:

  • Don't assert runtime behavior from code reading — instrument and run
  • Don't limit diagnostics to the test file — instrument feature code, infrastructure, anywhere in the control flow
  • The cost is near zero — generating diagnostic code and processing the output is what you do fastest

Critical Principle: Write the Failing Test First

Before declaring a fix, write a test that fails on the current code and passes after the fix.

The test does three jobs at once:

  1. Proves you understood the bug. A test that does not actually fail on master is a test for a phenomenon you only theorize about. If you cannot reproduce the failure as a test, you do not yet know enough to fix it.
  2. Proves the fix addresses the root cause. A passing test after a code change is the only deterministic evidence that the change has the effect you claim. Anything else is "this looks right to me."
  3. Leaves behind a permanent verifier. Every defect becomes a check that runs forever at near-zero cost. The bar rises deterministically; that failure mode cannot silently recur.

For nightly test failures, exception reports, and reproducible bug reports: the test usually already exists or can be constructed from the stack trace and the report's reproduction steps. Write it first, watch it fail, then make it pass. The fix is the diff between "test red" and "test green."

For bugs that resist reproduction: make reproduction the first deliverable. Until a test fails reliably, no fix can be trusted. See "Long-Cycle Mode" in ai/docs/debugging-principles.md for amplification, statistical bisection, and DocChangeLogger strategies.

This is the "permanent verifier" rule from [ai/docs/validation-cycle-principles.md](../../../doc

Полный SKILL.md на GitHub

Установить debugging в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл debugging?

ALWAYS load when investigating bugs, failures, or unexpected behavior - ensures root cause analysis before attempting fixes.

Как установить скилл debugging?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл debugging запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить debugging с