phase-gated-debugging
하는 일
이 AI 도우미는 코드의 버그를 체계적으로 고치도록 돕습니다. 어떤 변경이든 하기 전에 실제 문제를 찾도록 보장하고, 5단계 절차로 서두른 수정을 막습니다.
사용하는 경우
- ✓버그가 고쳐진 것 같은데 계속 다시 나타날 때.
- ✓오류의 원인을 찾기 위한 단계별 절차가 필요할 때.
- ✓오류가 가끔 발생해 추적하기 어려운 경우.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/phase-gated-debugging/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 코드에 버그가 나타나는데 원인을 모르겠습니다. 체계적인 절차로 함께 조사해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 먼저 오류를 재현하려고 합니다. 그다음 메모를 남겨 문제가 어디서 발생하는지 파악하고, 근본 원인을 분석한 뒤에야 수정을 적용합니다. 마지막으로 오류가 정말 해결되었는지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Phase-Gated Debugging
Overview
AI coding agents see an error and immediately edit code. They guess at fixes, get it wrong, and spiral. This skill enforces a strict 5-phase protocol where you CANNOT edit source code until the root cause is identified and confirmed.
Based on claude-debug (full plugin with PreToolUse hook enforcement).
When to Use
Use this skill when:
- a bug keeps getting "fixed" without resolving the underlying issue
- you need to slow an agent down and force disciplined debugging before code edits
- the failure is intermittent, a regression, performance-related, or otherwise hard to isolate
- you want an explicit user confirmation checkpoint before any fix is applied
The Protocol
Phase 1: REPRODUCE
Run the failing command/test. Capture the exact error. Run 2-3 times for consistency.
- Do NOT read source code
- Do NOT hypothesize
- Do NOT edit any files
Phase 2: ISOLATE
Read code. Add diagnostic logging marked // DEBUG. Re-run with diagnostics. Binary search to narrow down.
- Only
// DEBUGmarked logging is allowed - Do NOT fix the bug even if you see it
Phase 3: ROOT CAUSE
Analyze WHY at the isolated location. Use "5 Whys" technique. Remove debug logging.
State: "This is my root cause analysis: [explanation]. Do you agree, or should I investigate further?"
WAIT for user confirmation. Do NOT proceed without it.
Phase 4: FIX
Remove all // DEBUG lines. Apply minimal change addressing confirmed root cause.
- Only edit files related to root cause
- Do NOT refactor unrelated code
Phase 5: VERIFY
Run original failing test — must pass. Run related tests. For intermittent bugs, run 5+ times. If verification fails: root cause was wrong, go back to Phase 2.
Bug-Type Strategies
| Type | Technique |
|---|---|
| Crash/Panic | Stack trace backward — trace the bad value to its source |
| Wrong Output | Binary search — log midpoint, halve search space each iteration |
| Intermittent | Compare passing vs failing run logs — find ordering divergence |
| Regression | git bisect — find the offending commit |
| Performance | Timing at stage boundaries — find the bottleneck |
Key Rules
- NEVER edit source code in phases 1-3 (except
// DEBUGin phase 2) - NEVER proceed past phase 3 without user confirmation
- ALWAYS reproduce before investigating
- ALWAYS verify after fixing
Example
User request:
a bug keeps getting "fixed" without resolving the underlying issue; diagnose it and return the concrete next action.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문
코드를 바로 고치면 안 되나요?
근본 원인을 이해하지 않고 고치면 문제가 더 나빠지거나 새로운 버그가 생길 수 있습니다. 이 절차는 수정이 문제의 원인을 겨냥하도록 보장합니다.
5단계는 무엇인가요?
1. 오류 재현, 2. 메모로 문제 분리, 3. 근본 원인 파악, 4. 수정 적용, 5. 오류 해결 확인입니다.
수정해도 안 되면 어떻게 되나요?
검증 단계에서 오류가 해결되지 않으면, AI는 분리 단계로 돌아가 다시 조사합니다.
상세 정보
작성자의 원본 설명
Use when debugging any bug. Enforces a 5-phase protocol where code edits are blocked until root cause is confirmed. Prevents premature fix attempts.
인기도
- GitHub 스타
- 48k
- 순위
- #5438
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.