.claude/skills/bugfix/SKILL.md
Fix bugs, errors, exceptions, and unexpected behavior. Use when debugging, fixing errors, handling crashes, or when user mentions bug, error, broken, not working, crash, exception, 500 error, Application error, white screen, TypeError, undefined is not a function, or unexpected behavior.
npx skillsauth add dmitryprg-ai/cursor-develop-autorules bugfixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Principle: Fix the root cause, not the symptom.
Patching symptoms creates a growing pile of workarounds that eventually become harder to maintain than the original bug. Every bug is a signal that something in the system's design allowed it to happen.
## ERROR CAPTURED
**Command:** [what caused the error]
**Error Output:** [FULL output, don't truncate]
**Context:** File: [file], Action: [what I was doing]
Dig at least 5 levels deep. Surface-level fixes are temporary.
**Why 1:** [surface error]
-> **Why 2:** [deeper cause]
-> **Why 3:** [even deeper]
-> **Why 4:** [structural issue]
-> **Why 5:** [root cause]
ROOT CAUSE: [the real problem]
FIX: [minimal change to address root cause]
| Error Type | Likely Root Cause | Fix |
|------------|------------------|-----|
| ModuleNotFoundError | Missing package | npm install |
| TypeError | Wrong data type or null | Check actual types at runtime |
| 500 Error | Unhandled exception | Add error handling + log |
| Connection refused | Service not running | Start/restart service |
| 401 Unauthorized | Missing auth headers | Check Basic Auth + Session |
try/catch {} hides the root cause and makes the same bug resurface later in a harder-to-debug location.development
Scan codebase for technical debt and fix safely with TDD. Use to find oversized files, duplicated code, code smells, and refactor safely. Workflow - SCAN, TEST CASES, REFACTOR, VERIFY. Keywords - techdebt, tech debt, duplicates, code quality audit.
development
Test-Driven Development workflow with strict Red-Green-Refactor cycle. Use when developing features with TDD, writing tests before code, or when test-driven approach is needed. MANDATORY order - test cases table BEFORE code, failing tests BEFORE implementation.
testing
Review work session quality and capture improvements. Use at end of session, after large tasks, after series of errors, or when user asks for session review, retrospective, lessons learned. Records improvements to backlog.
data-ai
Analyze data, investigate datasets, work with CSV/parquet/pandas/dataframes. Use when analyzing data, exploring datasets, running experiments, or when user mentions data, analysis, parquet, csv, pandas, dataframe, statistics, investigation.