bug-detective
O que ela faz
Esta skill dá à sua IA um jeito passo a passo de rastrear bugs, exceções e falhas no código. É para quem tem código quebrado e quer uma correção cuidadosa e baseada em evidências.
Quando usar
- ✓Quando você tem uma mensagem de erro, uma exceção ou um stack trace para investigar.
- ✓Quando algo está quebrado ou uma funcionalidade parou de funcionar de repente.
- ✓Quando você pergunta por que um trecho de código está falhando e a causa não é óbvia.
Link da skill
https://github.com/Galaxy-Dawn/claude-scholar/blob/main/skills/bug-detective/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Minha página de login dá erro 500 depois do último deploy. Encontre a causa e corrija.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente reúne os detalhes do erro, classifica o tipo de erro, formula possíveis causas, testa cada uma e depois aplica e verifica a correção.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
Perguntas frequentes
Que informações devo passar?
A mensagem de erro completa, o arquivo e a linha se souber, os passos para reproduzir e o que você esperava que acontecesse.
Ela chuta correções?
Não. Ela formula possíveis causas e confere cada uma antes de mudar o código.
Ela conhece padrões de erro comuns?
Sim. Inclui padrões de erro comuns para acelerar o diagnóstico.
Detalhes
Descrição original do 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.
Popularidade
- Estrelas no GitHub
- 6,0 mil
- Posição no ranking
- #14480
- Licença
- MIT
- Atualizada em
- 19/10/2026
Comentários
- …
Mais skills deste repositório
agent-identifier
6,0 milEnsina seu agente a criar agentes do Claude Code, escrevendo corretamente o nome, a descrição de gatilho, o prompt de sistema e as configurações.
architecture-design
6,0 milEnsina seu agente o layout padrão de código para projetos de aprendizado de máquina, usando padrões de fábrica e registro ao adicionar partes registráveis.
citation-verification
6,0 milEnsina seu agente a conferir cada citação de um artigo acadêmico com fontes acadêmicas confiáveis, identificando referências falsas ou erradas.
code-review-excellence
6,0 milAjuda seu agente a revisar alterações de código e pull requests com feedback claro, gentil e priorizado, que encontra bugs reais e melhora o código.
Skills parecidas
diffs
394 milPermite que seu agente gere um diff real e compartilhável das edições, como link de visualização ou arquivo de imagem, em vez de um resumo escrito à mão.
coding-agent
394 milAjuda seu agente a passar um trabalho grande de programação para o Codex, Claude Code ou OpenCode em segundo plano e acompanhar o andamento.
gh-issues
394 milAjuda seu agente a encontrar issues do GitHub, escolher quais resolver e abrir pull requests com correções, acompanhando os comentários de revisão.