Command Palette

Search for a command to run...

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

debug-phase

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

Systematic debugging techniques including error classification, root cause analysis (5 Whys), reproduction strategies, and error documentation. Use when…

marcusgollот marcusgoll★ 97 звёзд на GitHub

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

Provide systematic debugging techniques for error investigation, root cause analysis, and fix implementation. Ensures errors are properly classified, root causes identified (not symptoms), and solutions documented to prevent recurrence. Debug errors systematically:
  1. Reproduce error consistently (100% reliable reproduction)
  2. Classify by type (syntax/runtime/logic/integration/performance) and severity (critical/high/medium/low)
  3. Isolate root cause using binary search, logging, breakpoints, or 5 Whys
  4. Implement fix with failing test first (TDD)
  5. Add regression tests to prevent recurrence
  6. Document in error-log.md with ERR-XXXX ID

Key principle: Fix root causes, not symptoms. Use 5 Whys to drill down.

Before debugging:

  • Error can be reproduced (even if intermittent, identify conditions)
  • Logs available (application logs, stack traces, network logs)
  • Development environment set up for testing

Check error-log.md for similar historical errors before starting.

**Search for similar errors**

Check error-log.md for past occurrences:

# Search by error message
grep -i "connection timeout" error-log.md

# Search by component
grep "Component: StudentProgressService" error-log.md

# Search by error type
grep "Type: Integration" error-log.md

If similar error found:

  • Review previous fix (workaround or root cause?)
  • Check if error recurred (>2 occurrences = need permanent fix)
  • Note patterns (same component, same conditions, timing)

If recurring error: Prioritize permanent fix over workaround.

**Reproduce error consistently**

Create minimal reproduction:

  1. Gather context: error message, stack trace, timestamp, user actions, environment
  2. Create minimal test case that triggers error 100% of time
  3. If intermittent: identify conditions (timing, data state, race conditions)

Example reproduction:

# API error
curl -X POST http://localhost:3000/api/endpoint \
  -H "Content-Type: application/json" \
  -d '{"field": "value"}'

# Frontend error
# 1. Navigate to /dashboard
# 2. Click "Load Data" button
# 3. Error appears in console

Validation: Can trigger error reliably before proceeding.

**Classify error**

By type:

  • Syntax: Code doesn't compile/parse (typos, missing brackets, linting errors)
  • Runtime: Code runs but crashes (null pointer, type error, uncaught exception)
  • Logic: Code runs but wrong result (calculation error, wrong branch taken)
  • Integration: External dependency fails (API timeout, database connection, service unavailable)
  • Performance: Code works but too slow (timeout, memory leak, N+1 queries)

By severity:

  • Critical: Data loss, security breach, total system failure
  • High: Feature broken, blocks users from core functionality
  • Medium: Feature degraded, workaround exists
  • Low: Minor UX issue, cosmetic, no functional impact

Example classification:

Type: Integration (API call to external service fails)
Severity: High (dashboard doesn't load, blocks teachers)
Component: StudentProgressService.fetchExternalData()
Frequency: 30% of requests (intermittent)

See references/error-classification.md for detailed matrix.

**Isolate root cause**

Use systematic techniques:

Binary search (for large codebases):

  • Add logging at midpoint of suspected code
  • If error before midpoint → investigate first half
  • If error after midpoint → investigate second half
  • Repeat until narrowed to specific function

Increase logging:

# Add debug logs around suspected area
logger.debug(f"Before API call: student_id={student_id}, params={params}")
response = api.fetch_data(student_id)
logger.debug(f"After API call: status={response.status}, data_len={len(response.data)}")

Use breakpoints (interactive debugging):

# Python
python -m pdb script.py

# Node.js
node inspect server.js

# Browser (Chrome DevTools)
# Set breakpoints, inspect variables, step through code

Check assumptions:

  • Is variable the value you expect? (log it, don't assume)
  • Is function being called when you expect? (add entry/exit logs)
  • Are external dependencies available? (health check endpoints)

Apply 5 Whys (drill down to root cause):

1. Why did dashboard fail to load?
   → API call to external service timed out

2. Why did API call timeout?
   → Request took >30 seconds (timeout limit)

3. Why did request take >30 seconds?
   → External service response time was 45 seconds

4. Why was external service so slow?
   → Requesting too much data (1000 records instead of 10)

5. Why requesting 1000 records?
   → Missing pagination parameter in API call

Root cause: Missing pagination parameter causes over-fetching

Validation: Root cause identified (not just symptoms). Can expl

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

Установить debug-phase в Claude Code и Claude Desktop

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

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

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

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

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

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

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

references/common-error-patterns.mdreferences/debugging-techniques.mdreferences/error-classification.mdreferences/error-log-template.md

FAQ

Что делает скилл debug-phase?

Systematic debugging techniques including error classification, root cause analysis (5 Whys), reproduction strategies, and error documentation. Use when debugging errors, investigating failures, analyzing stack traces, fixing bugs, or documenting errors in error-log.md. (project)

Как установить скилл debug-phase?

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

Скилл debug-phase запускает скрипты?

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

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

Сравнить debug-phase с