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.
NewMaintained
Automatic
◆Coding pack
Last verified 8/8/2026
What it changes
Passed 18 of 22 test cases with the skill, and 19 of 22 without it.
Without skill86%
With skill82%
Checks it passed that the model alone missed
Explains that an unquoted empty variable expands to empty space causing rm to run against current directory wildcards
1 fixed17 passed either way2 still failing2 broke
Pass-rate lift
-5 pp
Tokens
+108%
Agent turns
0%
Response time
-11%
Model gemini-3.6-flashMeasured 8/8/2026v118 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
In my Bash script, I have `dir=$1` and then run `rm -rf $dir/*` to clear a cache directory. When `$1` is empty, it acts strangely. What is the root cause pattern here and how should I safely structure the command?
What was checked, without and with the skill
Checked
Without skill
With skill
Explains that an unquoted empty variable expands to empty space causing rm to run against current directory wildcards
Missed
Passed
Recommends quoting the variable and testing non-empty check like [ -n "$dir" ] or using set -u
Passed
Passed
case-04 · gemini-3.6-flash · 8/8/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md301 lines6 files
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
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:
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:
| Error Type | Characteristics | Debugging Method |