bug-detective
Qué hace
Esta skill da a tu IA una forma paso a paso de encontrar errores, excepciones y fallos en el código. Está pensada para cualquier persona cuyo código esté roto y que quiera una solución cuidadosa y basada en pruebas.
Cuándo usarla
- ✓Cuando tienes un mensaje de error, una excepción o un stack trace que investigar.
- ✓Cuando algo está roto o una función deja de funcionar de repente.
- ✓Cuando preguntas por qué falla un fragmento de código y la causa no es obvia.
Link de la skill
https://github.com/Galaxy-Dawn/claude-scholar/blob/main/skills/bug-detective/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Mi página de inicio de sesión da un error 500 después del último despliegue. Encuentra la causa y arréglala.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente reúne los detalles del error, clasifica el tipo de error, plantea posibles causas, prueba cada una y luego aplica y verifica la solución.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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:
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 |
|---|---|---|
| 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:
Hypothesis: [problem description] causes [error phenomenon]
Verification steps:
1. [verification method 1]
2. [verification method 2]
Expected results:
- If hypothesis is correct: [expected phenomenon]
- If hypothesis is wrong: [expected phenomenon]
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
# ❌ No spaces allowed in assignment
name = "John" # Error: tries to run 'name' command
# ✅ Correct assignment
name="John"
# ❌ Missing spaces in conditional test
if[$name -eq 1]; then # Error
# ✅ Correct
if [ $name -eq 1 ]; then
2. Quoting Issues
# ❌ Variables not expanded inside single quotes
echo 'The value is $var' # Output: The value is $var
# ✅ Use double quotes
echo "The value is $var" # Output: The value is actual_value
# ❌ Using backticks for command substitution (confusing)
result=`command`
# ✅ Use $()
result=$(command)
3. Unquoted Variables
Preguntas frecuentes
¿Qué información debo dar?
El mensaje de error completo, el archivo y la línea si los conoces, los pasos para reproducirlo y lo que esperabas que pasara.
¿Adivina las soluciones?
No. Plantea posibles causas y comprueba cada una antes de cambiar el código.
¿Conoce patrones de error habituales?
Sí. Incluye patrones de error comunes para acelerar el diagnóstico.
Detalles
Descripción original del autor
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.
Popularidad
- Estrellas en GitHub
- 6,0 mil
- Posición en el ranking
- #14480
- Licencia
- MIT
- Actualizada
- 19/10/2026
Comentarios
- …
Más skills de este repositorio
agent-identifier
6,0 milEnseña a tu agente a crear agentes de Claude Code, escribiendo correctamente su nombre, su descripción de activación, su prompt de sistema y sus ajustes.
architecture-design
6,0 milEnseña a tu agente la estructura estándar para el código de proyectos de aprendizaje automático, usando patrones de fábrica y registro al añadir piezas registrables.
citation-verification
6,0 milEnseña a tu agente a comprobar cada cita de un artículo académico frente a fuentes académicas fiables, detectando referencias falsas o incorrectas.
code-review-excellence
6,0 milAyuda a tu agente a revisar cambios de código y pull requests con comentarios claros, amables y priorizados que detectan errores reales y mejoran el código.
Skills parecidas
diffs
394 milPermite que tu agente genere un diff real y compartible de los cambios, como enlace de visualización o archivo de imagen, en lugar de un resumen escrito a mano.
coding-agent
394 milAyuda a tu agente a pasar un trabajo de programación grande a Codex, Claude Code u OpenCode como trabajador en segundo plano, y después revisar su progreso.
gh-issues
394 milAyuda a tu agente a encontrar incidencias de GitHub, elegir cuáles trabajar y abrir pull requests con correcciones, incluido el seguimiento de los comentarios de revisión.