systematic-debugging
БесплатноЗапускает вложенные скриптыНе проверенYou MUST use this whenever something is broken, before proposing or making any fix, including quick fixes and when the user is in a hurry: a bug, a failing or…
от davila7★ 34 631 звезда на GitHubОб этом скилле
Systematic Debugging
Guessing at fixes feels fast and is slow. Each guess that half-works hides the real cause a little deeper, and the third patch usually breaks something the first one touched. This skill makes you find out why before you change anything.
The Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you have not finished Phase 1, you cannot propose a fix. Not a "quick one to try", not "while we investigate". Suggesting a fix in your reply counts as proposing one.
The process scales. For a simple bug the four phases take a minute: read the error, confirm the cause, write the failing check, fix it. You never skip them, you just move through them quickly.
When to use
Any technical problem: test failures, production bugs, unexpected behavior, performance regressions, build or CI failures, integration issues, flaky tests.
Use it especially when:
- There is time pressure (emergencies make guessing tempting)
- One quick fix looks obvious
- You or someone else already tried a fix that did not work
- You do not fully understand the issue
Phase 1: Root cause investigation
Before attempting ANY fix:
Read the error completely. The whole message and stack trace, not the first line. Note file paths, line numbers and error codes. Errors often state the exact problem.
Reproduce it. Find the exact steps or command that trigger it, and check whether it happens every time. If you cannot reproduce it, gather more data (logs, instrumentation); do not guess.
Check what changed.
git diff, recent commits, new dependencies, config and environment differences. If there is a known-good commit and a command that shows the bug, let git find the culprit:git bisect start <bad> <good> && git bisect run <repro-command>, thengit bisect resetto return to your branch before you change anything.Gather evidence across component boundaries. When the system has layers (CI → build → deploy, UI → API → database, CLI → config → child process), do not guess which layer breaks. Add temporary logging at each boundary, run once, and let the output show where good data turns bad:
# Layer 1: CI job echo "API_TOKEN in job: $([ -n "${API_TOKEN:-}" ] && echo SET || echo UNSET)" # Layer 2: build script echo "config file: ${CONFIG_PATH:-<unset>}"; test -r "${CONFIG_PATH:-}" && echo readable # Layer 3: the service at startup node -e 'console.log("NODE_ENV=", process.env.NODE_ENV)'Log whether a secret is set, never its value. Then investigate the one layer the evidence points at.
Trace the data backward. When the error surfaces deep in a call stack, ask where the bad value came from, then what called that, and keep going until you reach the source. Fix at the source, not where it crashed. Full technique:
references/root-cause-tracing.md.
Done when you can say what is wrong and why, backed by something you observed, not something you assumed.
Phase 2: Pattern analysis
- Find working code in the same codebase that does something similar.
- Read the reference completely. If you are following a pattern, a library's docs or an example, read every line before applying it. Skimming is how "I adapted it slightly" bugs are born.
- List every difference between the working and the broken case, however small. Do not assume "that can't matter".
- Check dependencies: the config, environment, versions and assumptions the broken code relies on.
Phase 3: Hypothesis and testing
- State one hypothesis: "X is the root cause because Y." Be specific.
- Test it with the smallest possible experiment: a log line, a debugger check, or a temporary change. One variable at a time. Revert any code change once it has answered the question; the real fix comes in Phase 4, after the failing test.
- Check the result. Confirmed: go to Phase 4. Not confirmed: form a new hypothesis from what you learned. Do not stack another change on top of a failed one; revert it first.
- When you don't know, say so. "I don't understand X yet" is a valid status. Research more or ask the user instead of pretending.
Phase 4: Implementation
- Write a failing test first. The smallest reproduction you can
automate: a unit test, or a one-off script if the project has no test
framework. Run it and watch it fail for the reason you expect. If a
test-driven-developmentskill is installed, follow it here. - Make one fix that addresses the root cause. No "while I'm here" improvements, no bundled refactors.
- Verify. The new test passes, the existing tests still pass, and the
original symptom is gone when you rerun the reproduction from Phase 1.
If a
verification-before-completionskill is installed, follow it before you claim success. - Clean up the temporary logging and scripts from Phase 1.
Установить systematic-debugging в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл systematic-debugging?
You MUST use this whenever something is broken, before proposing or making any fix, including quick fixes and when the user is in a hurry: a bug, a failing or red test, a build or CI failure, a crash, a performance problem, unexpected behavior. Finds the root cause in four phases (investigate, compare, test one hypothesis, fix with a failing test first) instead of guessing, and stops after three failed fixes to question the design. Not for writing new features.
Как установить скилл systematic-debugging?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл systematic-debugging запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic