본문으로 건너뛰기
Skillpedia
일반 코딩48k · #5438

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/phase-gated-debugging/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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 // DEBUG marked 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

  1. NEVER edit source code in phases 1-3 (except // DEBUG in phase 2)
  2. NEVER proceed past phase 3 without user confirmation
  3. ALWAYS reproduce before investigating
  4. 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.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5438
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬