Command Palette

Search for a command to run...

Назад к скиллам
скилл № 56390

dev-loop-debugging-strategy

Use when the user reports a bug, error message, stack trace, crash, memory leak, flaky failure or asks to find the cause or do root cause analysis. Produces a…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить dev-loop-debugging-strategy в Claude Code и Claude Desktop

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

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

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

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

Debugging Strategy

Purpose

Apply systematic debugging methodologies — root cause analysis, scientific method for debugging, log analysis, and tool-assisted tracing — to identify, isolate, and resolve software defects efficiently.

Agent Protocol

Trigger

Exact user phrases: "debugging", "debug strategy", "how to debug", "root cause", "bug reproduction", "debugging methodology", "log analysis", "troubleshooting", "debug this", "why is this broken".

Input Context

  • Environment (local dev, CI, staging, production)
  • Bug characteristics (reproducible, intermittent, regression, performance, crash)
  • Available tools (debugger, profiler, logs, APM, metrics)
  • Language and framework (affects available debugging tools)
  • Recent changes (deployments, dependency updates, config changes)
  • Error symptoms (error message, stack trace, incorrect output, crash dump)

Output Artifact

Debugging plan with hypothesis, isolation strategy, reproduction steps, and root cause analysis.

Response Format

Symptom: {observed vs expected}
Reproduction: {steps | not yet reproducible}
Hypotheses (ranked): {H1 -> test}, {H2 -> test}
Isolation: {bisect/binary search/minimal repro}
Root cause: {cause + evidence}
Fix + regression test: {change, test name}

Completion Criteria

  • Bug reproduction steps documented and confirmed
  • Initial hypothesis formed with expected vs actual behavior
  • Debugging tooling selected and configured
  • Isolation strategy applied (binary search, eliminate variables)
  • Root cause identified and documented
  • Fix implemented and verified
  • Regression test added to prevent recurrence
  • Postmortem notes documented (if warranted)

Max Response Length

200 lines.

Framework/Methodology

Debugging Decision Tree

What type of bug?
├── Application crash (exception, segfault, panic)
│   → Stack trace analysis → crash dump → core dump → last known good
├── Incorrect behavior (wrong output, wrong state)
│   → Scientific method: hypothesis → experiment → observe → conclude
│   → Binary search on commits: git bisect
├── Intermittent failure (race condition, timing)
│   → Stress testing → logging → thread/async analysis → happens-before
├── Performance regression (slow response, high CPU/memory)
│   → Profiler → flame graph → heap dump → load testing
├── Integration failure (API, database, network)
│   → Request/response logging → mock → dependency isolation
└── Environmental issue (wrong config, missing dependency)
    → Config diff → environment comparison → fresh install

The Scientific Method for Debugging

1. Observe:   What is the symptom? When does it happen? What changed?
2. Hypothesize: What could cause this? Rank by probability.
3. Predict:   If hypothesis is correct, what else would we expect?
4. Experiment: Design a test to validate or invalidate the hypothesis.
5. Analyze:   Did the result match the prediction?
6. Conclude:  If validated → fix. If invalidated → refine hypothesis (goto 2).

Debugging Levels (Eskil Steenberg's Model)

Level 0: No methodology — random changes hoping something works
Level 1: Observation — reading error messages, stack traces
Level 2: Isolation — binary search, eliminate variables
Level 3: Tooling — debuggers, profilers, log analysis
Level 4: Scientific method — hypothesis-driven, systematic
Level 5: Prevention — tests, type systems, assertions prevent bugs

Workflow

Step 1: Reproduce (Always the First Step)

Create a minimal, deterministic reproduction:

reproduction_steps:
  environment: "Node.js 24, macOS 15, PostgreSQL 16"
  prerequisites:
    - "npm install"
    - "docker compose up -d db"
  steps:
    - "Run: npm run dev"
    - "Navigate to /settings"
    - "Click 'Save' with empty name field"
    - "Expected: Validation error shown"
    - "Actual: Page crashes with TypeError"
  frequency: "100% reproducible"
  regression: true
  last_known_good: "v1.2.0"

If not reproducible:

  • Check environment differences (local vs CI vs production)
  • Check data differences (production data may trigger edge case)
  • Check timing (race condition, async timing)
  • Add extensive logging
  • Use session replay tools (FullStory, LogRocket, Sentry)

Step 2: Gather Data

# Stack trace analysis
# Look for: YOUR code in the trace (not third-party), null reference, type error

# Binary search commits (git bisect)
git bisect start
git bisect bad          # Current commit is broken
git bisect good v1.0.0  # Last known good
# Git checks out the midpoint; test it:
npm test
git bisect good         # or git bisect bad
# Repeat until commit identified

# Log analysis
kubectl logs -l app=myapp --tail=100 --since=10m > logs.txt
# Look for: error, exception, fatal, timeout, 500, stack trace, correlation ID

# Thread dump analysis (Java)
jstack <pid> > threaddump.txt
# Look for: BLOCKED threads, DEADLOCK, stuck threads

# Core dump analysis (C/C++/Rust)
gdb /path/to/binary core.dump
Полный SKILL.md на GitHub

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

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

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

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

  • references/debugging-strategy-advanced.md
  • references/debugging-strategy-fundamentals.md
  • references/debugging-techniques.md
  • references/debugging-workflow.md
  • references/production-debugging.md
  • references/remote-debugging.md
  • references/tool-specific.md
  • references/toolchain.md

FAQ

Что делает скилл dev-loop-debugging-strategy?

Use when the user reports a bug, error message, stack trace, crash, memory leak, flaky failure or asks to find the cause or do root cause analysis. Produces a hypothesis-driven debugging plan: reproduce, isolate, bisect, instrument, fix and regression test. Not for speeding up slow code (use dev-loop-performance-profiler).

Как установить скилл dev-loop-debugging-strategy?

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

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

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

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

Сравнить dev-loop-debugging-strategy с