systematic-debugging
Disciplined methodology to isolate bugs through hypothesis-driven testing. Form hypotheses, test them with minimal changes, narrow scope systematically. Use…
от sethdford★ 51 звезда на GitHub
Установить systematic-debugging в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Systematic Debugging
Disciplined approach to finding root cause by treating debugging as a scientific investigation, not a guessing game.
Context
You are guiding systematic bug investigation. Your role is to:
- Help formulate clear, testable hypotheses about the failure
- Design minimal experiments to test each hypothesis
- Eliminate impossible causes systematically
- Narrow the problem space with each iteration
- Document findings to prevent regression
Debugging is hypothesis-driven experimentation, not random code inspection or prayer-driven programming.
Domain Context
Based on Zeller's Why Programs Fail and Robert C. Martin's discipline of debugging:
- Reproducibility: If you can't reproduce the bug consistently, it's a ghost. Spend time here.
- Isolation: What conditions trigger it? Code path, specific data, timing, environment?
- Hypothesis: What do you think went wrong? Must be falsifiable (testable).
- Experiment Design: Minimal change to test hypothesis. Change one thing at a time.
- Iteration: Each failed hypothesis narrows the search space. No progress = reassess assumptions.
- Root Cause vs Symptom: Fix the root cause, not the symptom. Symptoms can hide real problems.
- Debugger > Print Statements: Debuggers let you inspect state at breakpoints. Prints are for logging, not debugging.
When to Use This Skill
- Bug is reported but you can't reproduce it yet
- Bug reproduced but root cause is unclear
- Bug has been "fixed" multiple times but keeps appearing (symptom-fixing)
- Bug is intermittent or timing-dependent
- Bug affects multiple systems and cause is uncertain
- Post-mortem: understanding why a bug happened to prevent recurrence
Prerequisites
Before systematic debugging:
- Read the Error Message: Carefully. It often points to the real issue.
- Check Git History: When did this start? What changed?
- Understand the Feature: How is the code supposed to work?
- Reproduce Locally: If possible, get the bug to happen on your machine with minimal setup
- Isolate Variables: Can you narrow it down to a specific input, code path, or environment?
Instructions (Detailed)
1. Reproduce the Bug Consistently
This is 80% of debugging. If you can't reproduce it, you can't debug it.
Approach:
- Get exact steps: "Click button X, fill field Y, click submit"
- Record inputs: The exact data that triggers the bug
- Record environment: OS, browser, version, dependencies
- Record timing: Does it happen immediately or after delay?
- Try to make it fail every time
Example:
Bug: Payment processing fails intermittently
Steps to reproduce:
1. Create order with 3+ items
2. Apply discount code "SAVE10"
3. Click "Process Payment"
4. Observe: 50% of time, get "Transaction timeout error"
If you achieve 100% reproduction, you're done with Step 1. If it's still intermittent, explore:
- Race conditions (timing)
- Concurrency issues (multiple requests)
- Environment-specific problems (network, database)
- Data-specific problems (certain inputs always fail)
2. Gather Data at Failure Time
Collect evidence:
- Stack trace: Full error with line numbers
- Logs: Application logs around failure time
- System state: Memory, CPU, disk at failure
- Network traces: If network-involved
- Database state: What data was in the database?
- Request/response: What input triggered the failure?
Tools:
- Debugger breakpoints to inspect variables
- Application logs (log level: DEBUG or TRACE for this area)
- Network inspector (browser DevTools or Wireshark)
- Database queries (EXPLAIN plans, slow query logs)
- System profiling (strace, ltrace, perf for C code)
Example output:
Stack trace:
TypeError: Cannot read property 'apply_discount' of undefined
at PaymentProcessor.js:42 (apply_discount())
at Order.js:88 (process())
Logs:
[2026-03-11 14:23:45] INFO: Order created, id=12345
[2026-03-11 14:23:46] DEBUG: Discount code "SAVE10" applied
[2026-03-11 14:23:47] ERROR: Cannot read property 'apply_discount' of undefined
Database state at failure:
SELECT * FROM orders WHERE id=12345;
id | discount_code | processed_at
12345 | SAVE10 | NULL
Request:
POST /orders/12345/process
Content-Type: application/json
{ "payment_method": "credit_card" }
3. Form a Hypothesis
Based on the data, make a testable guess:
Bad hypotheses (not falsifiable):
- "The code is broken"
- "Concurrency issue"
- "Network problem"
Good hypotheses (falsifiable, specific):
- "The discount object is undefined when
apply_discount()is called" - "The discount code is not being set correctly in the Order object"
- "The payment processing function expects discount to be a float, but it's receiving a string"
Hypothesis template:
"If [condition], then [observable result]. When I check [specific place], I expect to find [specific data]."
Example:
"If the discount code is not being parsed corre
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Grep - 03
Glob - 04
Write - 05
Edit - 06
Bash
Вложенные файлы
- examples/example-output.md
- template.md
FAQ
Что делает скилл systematic-debugging?
Disciplined methodology to isolate bugs through hypothesis-driven testing. Form hypotheses, test them with minimal changes, narrow scope systematically. Use when bugs are unclear or reproduce intermittently.
Как установить скилл systematic-debugging?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл systematic-debugging запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…