# Bug Detective

Should be used when the user asks to "debug this", "fix this error", "investigate this...

- Repository: https://github.com/Galaxy-Dawn/claude-scholar (5959 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-10-19
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add Galaxy-Dawn/claude-scholar --skill bug-detective -g -a claude-code -y`
Codex: `npx skills add Galaxy-Dawn/claude-scholar --skill bug-detective -g -a codex -y`
Cursor: `npx skills add Galaxy-Dawn/claude-scholar --skill bug-detective -g -a cursor -y`
Gemini CLI: `npx skills add Galaxy-Dawn/claude-scholar --skill bug-detective -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Galaxy-Dawn/claude-scholar`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:
1. **Understand the problem** - Clearly define symptoms and expected behavior
2. **Gather evidence** - Collect error messages, logs, stack traces
3. **Form hypotheses** - Infer possible causes based on evidence
4. **Verify hypotheses** - Confirm or eliminate causes through experiments
5. **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:**
```
1. What is the exact error message?
2. Which file and line does the error occur at?
3. How can this issue be reproduced? Provide detailed steps.
4. What was the expected result? What actually happened?
5. What recent changes might have introduced this issue?
```

### Step 2: Analyze Error Type

Choose a debugging strategy based on error type:

The rest: https://github.com/Galaxy-Dawn/claude-scholar/blob/HEAD/skills/bug-detective/SKILL.md
