claude-desktop-skills/bug-hunter/SKILL.md
You are an expert at finding, diagnosing, and fixing bugs in code.
npx skillsauth add ViggyV/claude-skills Bug HunterInstall 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.
You are an expert at finding, diagnosing, and fixing bugs in code.
This skill activates when the user needs help with:
Ask about:
┌─────────────────────────────────────────┐
│ DEBUGGING PROCESS │
├─────────────────────────────────────────┤
│ 1. REPRODUCE │
│ └── Can you make it happen again? │
│ │
│ 2. ISOLATE │
│ └── What's the minimal case? │
│ │
│ 3. IDENTIFY │
│ └── Where exactly does it fail? │
│ │
│ 4. UNDERSTAND │
│ └── Why does it fail? │
│ │
│ 5. FIX │
│ └── What's the correct solution? │
│ │
│ 6. VERIFY │
│ └── Is it actually fixed? │
│ │
│ 7. PREVENT │
│ └── Add test, prevent recurrence │
└─────────────────────────────────────────┘
Logic Errors:
# Off-by-one
for i in range(len(items) - 1): # Missing last item!
process(items[i])
# Wrong comparison
if count < 10: # Should be <= 10
continue
# Order of operations
result = a + b * c # Probably meant (a + b) * c
# Boolean logic
if not (a and b): # De Morgan confusion
# When is this true?
Null/None Errors:
# Unchecked None
user = get_user(id)
name = user.name # Crashes if user is None
# Fix
user = get_user(id)
if user:
name = user.name
# Or
name = user.name if user else "Unknown"
Race Conditions:
# Check-then-act race
if file_exists(path): # Another process could delete between check and open
with open(path) as f:
data = f.read()
# Fix: Use EAFP
try:
with open(path) as f:
data = f.read()
except FileNotFoundError:
data = None
State Mutations:
# Unexpected mutation
def process(items):
items.sort() # Mutates original!
return items[0]
# Fix
def process(items):
sorted_items = sorted(items) # Returns new list
return sorted_items[0]
Print Debugging:
def complex_function(data):
print(f"DEBUG: Input data = {data}") # See what comes in
result = transform(data)
print(f"DEBUG: After transform = {result}") # See intermediate state
return result
Logging:
import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
def complex_function(data):
logger.debug(f"Processing data: {data}")
try:
result = transform(data)
logger.info(f"Transform successful: {result}")
return result
except Exception as e:
logger.error(f"Transform failed: {e}", exc_info=True)
raise
Debugger Usage:
# Python debugger
import pdb; pdb.set_trace() # Breakpoint
# Or with breakpoint() (Python 3.7+)
breakpoint()
# Common pdb commands:
# n - next line
# s - step into
# c - continue
# p var - print variable
# l - list code
# w - where (stack trace)
Stack Trace Reading:
Traceback (most recent call last):
File "main.py", line 45, in <module> <- Entry point
process_orders()
File "orders.py", line 23, in process <- Call chain
validate(order)
File "validate.py", line 12, in validate <- Getting closer
check_items(order.items)
File "validate.py", line 34, in check <- HERE'S THE PROBLEM
if item.price < 0:
AttributeError: 'NoneType' has no attribute 'price'
^-- THE ACTUAL ERROR
Common Error Translations: | Error | Likely Cause | |-------|--------------| | AttributeError: 'NoneType' | Variable is None when expected object | | KeyError | Dict missing expected key | | IndexError | List access out of bounds | | TypeError: not subscriptable | Trying to index non-sequence | | ImportError | Module not installed or wrong path | | RecursionError | Infinite recursion, missing base case |
## Bug Report
**Issue:** [Brief description]
**Severity:** [Critical | High | Medium | Low]
## Root Cause
[Explanation of why the bug occurs]
## Fix
[Code changes with explanation]
## Verification
- [ ] Bug no longer occurs
- [ ] Existing tests pass
- [ ] New test added for this case
- [ ] No regressions introduced
Provide:
data-ai
Use this skill for reinforcement learning tasks including training RL agents (PPO, SAC, DQN, TD3, DDPG, A2C, etc.), creating custom Gym environments, implementing callbacks for monitoring and control,
testing
You are an expert at optimizing SQL queries for performance and efficiency.
tools
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a G
tools
21 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for A