Command Palette

Search for a command to run...

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

systematic-debugging

БесплатноЗапускает вложенные скриптыНе проверен

Diagnoses a reported bug, error, test failure, or unexpected behavior through a 4-phase root-cause analysis before any code changes. Use when the user reports…

FradSerот FradSer★ 598 звёзд на GitHub

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

Systematic Debugging

Slash-command Usage

Invoked via /superpowers:systematic-debugging "<symptom>" or auto-loaded by other skills when bug-fix language is detected.

When invoked as a slash command: capture $ARGUMENTS as the symptom statement and start at Phase 1 immediately. Do NOT write design documents or task files; the deliverable is the fix + a test that catches the regression, not a docs/plans/ folder.

Output discipline: Report findings inline as you complete each phase. End with: (a) root cause one-liner, (b) fix diff summary, (c) regression test path.

Recommended: run wrapped in /goal

Launch it under Claude Code's built-in /goal (v2.1.139+) so the multi-turn hypothesis → test → fix investigation continues until the regression is actually fixed:

/goal "Claude has narrated the three-part completion output (root-cause one-liner, fix diff summary, regression-test path) with the regression test passing" /superpowers:systematic-debugging "<symptom>"

/goal is a user-typed outer wrapper (a skill cannot enable it for itself mid-run), and its evaluator judges only what Claude narrates in the transcript — phrase the condition against narrated output (the printed test-run result, the three-part summary), never filesystem state. Full semantics and condition phrasing: ../../skills/references/goal-wrapper.md.

CRITICAL: Bail-Out Check (run before Phase 1)

Inspect $ARGUMENTS for "named root cause + named fix" signals. Bail out — skip the 4-phase pipeline, apply the fix and write a regression test directly — when ALL of these match:

  • $ARGUMENTS names a specific root cause (file:line, config key, or specific value), AND
  • $ARGUMENTS names a specific corrective change ("change X to Y", "add the missing flag", "fix the typo"), AND
  • The fix is localized to a single file or a single string substitution

Examples that bail out:

  • "cookie domain is .foo.com, should be foo.com — fix it"
  • "missing await at api.ts:42, add it"
  • "wrong env var name DB_HOST should be DATABASE_HOST in deploy.yaml"

Examples that DO NOT bail out (proceed to Phase 1):

  • "tests fail in CI but pass locally" (symptom only, no root cause)
  • "this is slow" (no hypothesis)
  • "I think it's the cache, can you check?" (hypothesis without confirmed root cause)

Bail-out response (output verbatim, then apply the fix + a regression test that catches the bug):

Detected named root cause and named fix. Skipping the 4-phase pipeline (calibrated for unknown root causes). Applying the fix and writing a regression test directly. To force the full pipeline, re-invoke as /superpowers:systematic-debugging --force "<symptom>".

When the user passes --force (literal token in $ARGUMENTS), skip this bail-out and proceed to Phase 1 unconditionally.

Iron Law remains for non-bail-out paths — the bail-out only fires when the user has already done the root-cause work and is handing Claude the conclusion.

Overview

Core principle: Root cause investigation must precede any fix attempt — random fixes waste time, mask underlying issues, and create new bugs. Violating the letter of this process is violating the spirit of debugging.

CRITICAL: The Iron Law

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

Fixes cannot be proposed without completing Phase 1. Each phase MUST finish before the next begins. Violating this rule produces fix-attempts that mask root causes — the failure mode this skill exists to prevent. If at any point you find yourself proposing a fix without completed Phase 1 evidence, stop and return to Phase 1.

When to Apply

Applies to ANY technical issue: test failures, production bugs, unexpected behavior, performance problems, build failures.

Especially valuable when: time pressure tempts guessing, a "quick fix" seems obvious, prior fixes failed, or the issue is not fully understood.

Do NOT skip the process because the issue appears simple, time is tight, or urgency exists — see ./references/rationalizations-and-guardrails.md for why each of those is a trap.

The Four Phases

Phase 1: Root Cause Investigation

Before attempting any fix:

  1. Consult Memory — this memory read-before step is skipped whenever the Bail-Out Check fires (symmetric with the bail-out skipping every other Phase-1-onward step): run bash "${CLAUDE_PLUGIN_ROOT}/lib/docs-index.sh" list --kind memory --status active, filter by symptom keywords, and Read the top 2-3 matches before step 1.

  2. Read Error Messages Carefully — read stack traces completely; note line numbers, file paths, error codes. Messages and warnings often contain the solution.

  3. Reproduce Consistently — identify exact steps and confirm the issue triggers reliably. If not reproducible, gather more data instead of guessing.

  4. Check Recent Changes — git diff and recent commits, new dependencies, config changes, environmental differences.

  5. **Gather Evidence in

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

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

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

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

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

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

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

Read
Grep
Glob
Edit
Write
Agent
Bash(git:*)
Bash(npm:*)
Bash(pnpm:*)
Bash(uv:*)
Bash(pip:*)
Bash(pytest:*)
Bash(python:*)
Bash(python3:*)
Bash(go:*)
Bash(cargo:*)
Bash(mvn:*)
Bash(gradle:*)
Bash(rspec:*)
Bash(bundle:*)
Bash(test:*)
Bash(${CLAUDE_PLUGIN_ROOT}/skills/systematic-debugging/find-polluter.sh:*)
Bash(${CLAUDE_PLUGIN_ROOT}/lib/docs-index.sh:*)

Вложенные файлы

find-polluter.shreferences/condition-based-waiting-example.tsreferences/condition-based-waiting.mdreferences/defense-in-depth.mdreferences/rationalizations-and-guardrails.mdreferences/root-cause-tracing.md

FAQ

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

Diagnoses a reported bug, error, test failure, or unexpected behavior through a 4-phase root-cause analysis before any code changes. Use when the user reports a bug or test failure with an unknown root cause, or invokes /superpowers:systematic-debugging "<symptom>". Not for bugs with a named root cause (edit directly).

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

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

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

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить systematic-debugging с