bug-detective
하는 일
이 스킬은 AI에게 코드의 버그, 예외, 실패를 추적하는 단계별 방법을 제공합니다. 코드가 망가졌고 신중하며 증거에 기반한 수정을 원하는 사람을 위한 것입니다.
사용하는 경우
- ✓조사할 오류 메시지, 예외 또는 스택 트레이스가 있을 때.
- ✓무언가 고장 나거나 갑자기 기능이 멈췄을 때.
- ✓코드가 실패하는 이유를 묻는데 원인이 분명하지 않을 때.
스킬 링크
https://github.com/Galaxy-Dawn/claude-scholar/blob/main/skills/bug-detective/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“지난 배포 후 제 로그인 페이지에서 500 오류가 납니다. 원인을 찾아서 고쳐 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 오류 세부 정보를 모으고, 오류 유형을 분류하고, 가능한 원인을 세운 다음 각각을 시험합니다. 그다음 수정을 적용하고 검증합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
어떤 정보를 주어야 하나요?
전체 오류 메시지, 알고 있다면 파일과 줄 번호, 재현 단계, 기대했던 동작을 알려 주세요.
수정을 추측하나요?
아니요. 가능한 원인을 세우고 각각 확인한 뒤에야 코드를 바꿉니다.
흔한 오류 패턴을 아나요?
네. 진단을 빠르게 하도록 흔한 오류 패턴을 포함하고 있습니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 6.0k
- 순위
- #14480
- 라이선스
- MIT
- 업데이트
- 2026. 10. 19.
댓글
- …
이 저장소의 다른 스킬
agent-identifier
6.0k에이전트가 이름, 트리거 설명, 시스템 프롬프트, 설정을 올바르게 갖춘 Claude Code 에이전트를 만들도록 가르칩니다.
architecture-design
6.0k에이전트가 등록 가능한 부품을 추가할 때 팩토리와 레지스트리 패턴을 쓰는 머신러닝 프로젝트 구조를 가르칩니다.
citation-verification
6.0k에이전트가 논문의 인용을 신뢰할 수 있는 자료와 대조해 가짜이거나 잘못된 참고 문헌을 찾도록 가르칩니다.
code-review-excellence
6.0k에이전트가 코드 변경을 검토해 실제 버그를 찾고, 명확하고 친절하며 우선순위가 있는 피드백을 주도록 돕습니다.