debug-phase
БесплатноБез исполняемых скриптовНе проверенSystematic debugging techniques including error classification, root cause analysis (5 Whys), reproduction strategies, and error documentation. Use when…
от marcusgoll★ 97 звёзд на GitHubОб этом скилле
- Reproduce error consistently (100% reliable reproduction)
- Classify by type (syntax/runtime/logic/integration/performance) and severity (critical/high/medium/low)
- Isolate root cause using binary search, logging, breakpoints, or 5 Whys
- Implement fix with failing test first (TDD)
- Add regression tests to prevent recurrence
- Document in error-log.md with ERR-XXXX ID
Key principle: Fix root causes, not symptoms. Use 5 Whys to drill down.
- 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.
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.
Create minimal reproduction:
- Gather context: error message, stack trace, timestamp, user actions, environment
- Create minimal test case that triggers error 100% of time
- 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.
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.
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
Установить debug-phase в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic