galaxy-dawn/claude-scholar/bug-detective
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "debug this", "fix this error", "investigate this bug", "troubleshoot this issue", "find the problem", "something is broken", "this isn't working", "why is this failing", or reports errors/exceptions/bugs. Provides systematic debugging workflow and common error patterns.
Install
npx vskill@latest install galaxy-dawn/claude-scholar/bug-detectiveSKILL.md
Bug Detective
A systematic debugging workflow for investigating and resolving code errors, exceptions, and failures. Provides structured debugging methods and common error pattern recognition.
Core Philosophy
Debugging is a scientific problem-solving process that requires:
- Understand the problem - Clearly define symptoms and expected behavior
- Gather evidence - Collect error messages, logs, stack traces
- Form hypotheses - Infer possible causes based on evidence
- Verify hypotheses - Confirm or eliminate causes through experiments
- Resolve the issue - Apply fixes and verify
Debugging Workflow
Step 1: Understand the Problem
Before starting to debug, clarify the following information:
Required information to collect:
- Complete error message content
- Exact location of the error (filename and line number)
- Reproduction steps (how to trigger the error)
- Expected behavior vs actual behavior
- Environment info (OS, versions, dependencies)
Question template:
Step 2: Analyze Error Type
Choose a debugging strategy based on error type:
| Error Type | Characteristics | Debugging Method | |
|---|---|---|---|
| Syntax Error | Code cannot be parsed | Check syntax, bracket matching, quotes | |
| Import Error | ModuleNotFoundError | Check module installation, path config | |
| Type Error | TypeError | Check data types, type conversions | |
| Attribute Error | AttributeError | Check if object attribute exists | |
| Key Error | KeyError | Check if dictionary key exists | |
| Index Error | IndexError | Check list/array index range | |
| Null Reference | NoneType/NullPointerException | Check if variable is None | |
| Network Error | ConnectionError/Timeout | Check network connection, URL, timeout settings | |
| Permission Error | PermissionError | Check file permissions, user permissions | |
| Resource Error | FileNotFoundError | Check if file path exists |
Step 3: Locate the Problem Source
Use the following methods to locate the issue:
1. Binary Search Method
- Comment out half the code, check if the problem persists
- Progressively narrow the scope until the problematic code is found
2. Log Tracing
- Add print/logging statements at key locations
- Track variable value changes
- Confirm code execution path
3. Breakpoint Debugging
- Use debugger breakpoint functionality
- Step through code execution
- Inspect variable state
4. Stack Trace Analysis
- Find the call chain from the stack trace in the error message
- Determine the direct cause of the error
- Trace back to the root cause
Step 4: Form and Verify Hypotheses
Hypothesis framework:
Step 5: Apply Fix
After fixing, verify:
- The original error is resolved
- No new errors have been introduced
- Related functionality still works correctly
- Tests added to prevent regression
Python Common Error Patterns
1. Indentation Errors
2. Mutable Default Arguments
3. Closure Issues in Loops
4. Modifying a List While Iterating
5. Using is for String Comparison
6. Forgetting to Call super().__init__()
JavaScript/TypeScript Common Error Patterns
1. this Binding Issues
2. Async Error Handling
3. Object Reference Comparison
Bash/Zsh Common Error Patterns
1. Spacing Issues
2. Quoting Issues
3. Unquoted Variables
4. Variable Scope in Loops
5. Array Operations
6. String Comparison
7. Command Failure Continues Execution
Common Debugging Commands
Python pdb Debugger
Node.js Inspector
Git Bisect
Bash Debugging
Preventive Debugging
1. Use Type Checking
2. Input Validation
3. Defensive Programming
4. Logging
Debugging Checklist
Before Starting
- [ ] Obtain the complete error message
- [ ] Record the stack trace of the error
- [ ] Confirm reproduction steps
- [ ] Understand expected behavior
During Debugging
- [ ] Check recent code changes
- [ ] Use binary search to locate the issue
- [ ] Add logs to trace variables
- [ ] Verify hypotheses
After Resolution
- [ ] Confirm the original error is fixed
- [ ] Test related functionality
- [ ] Add tests to prevent regression
- [ ] Document the problem and solution
Additional Resources
Reference Files
For detailed debugging techniques and patterns:
- `references/python-errors.md` - Python error details
- `references/javascript-errors.md` - JavaScript/TypeScript error details
- `references/shell-errors.md` - Bash/Zsh script error details
- `references/debugging-tools.md` - Debugging tools usage guide
- `references/common-patterns.md` - Common error patterns
Example Files
Working debugging examples:
- `examples/debugging-workflow.py` - Complete debugging workflow example
- `examples/error-handling-patterns.py` - Error handling patterns
- `examples/debugging-workflow.sh` - Shell script debugging example
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/bug-detective/SKILL.md
Popularity
- Repository stars
- 2,976
- Repository forks
- 246
- 7-day trend score
- 40
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 31 Mar 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/galaxy-dawn/claude-scholar/bug-detective)