bug-detective

Diagnose code errors and exceptions using a systematic debugging workflow.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Clay-HHK/claude-skills --skill bug-detective-clay-hhk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bug-detective
Source: https://github.com/Clay-HHK/claude-skills/tree/main/bug-detective
Command: npx skills add https://github.com/Clay-HHK/claude-skills --skill bug-detective-clay-hhk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Debugging errors, exceptions, and unexpected behavior often becomes an unstructured guessing game. This Skill provides a systematic, hypothesis-driven debugging workflow that helps you locate root causes faster and apply verified fixes instead of trial-and-error patching. ## Core Features & Use Cases - Structured Debugging Workflow: A five-step process covering problem understanding, error type analysis, root cause location, hypothesis verification, and fix validation. - Error Pattern Library: Common error patterns for Python, JavaScript/TypeScript, and Bash/Zsh, including mutable default arguments, closure issues, unquoted shell variables, and async error handling. - Debugging Tool Guidance: Usage instructions for pdb, Node.js Inspector, git bisect, and shell debugging flags like set -x and set -euo pipefail. - Use Case: When a Python script throws an IndexError or a Bash script silently deletes the wrong files, activate this Skill to walk through evidence gathering, hypothesis testing, and a verified fix with regression prevention. ## Quick Start Debug this error and find the root cause using a systematic debugging workflow.

Frequently Asked Questions about bug-detective

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a Python error systematically?▼

Start by collecting the complete error message, stack trace, and reproduction steps. Then classify the error type, use binary search or logging to locate the source, form a hypothesis about the cause, and verify it before applying a fix.

How to debug Bash scripts that fail silently?▼

Run the script with bash -x to trace each command, and add set -euo pipefail at the top to exit on errors, catch undefined variables, and fail on broken pipes. Use trap handlers to log the failing line number.

What are common Python error patterns to check first?▼

Frequent culprits include mutable default arguments, modifying a list while iterating, closure variable binding in loops, using is for value comparison, and forgetting to call super().__init__(). Checking these patterns first often resolves bugs quickly.

Why does my shell script variable lose its value inside a loop?▼

Piping into a while loop creates a subshell, so variable changes do not persist outside it. Use input redirection or process substitution like done < file.txt instead of cat file.txt | while read to keep the variable in the current shell.

When should I use a debugger instead of print statements?▼

Use pdb or Node.js Inspector when you need to inspect variable state step by step, examine complex call stacks, or pause execution conditionally. Print or log statements work better for quick traces and production diagnostics.