systematic-debugging
하는 일
이 스킬은 AI가 임의의 빠른 수정 대신 계획에 따라 버그를 조사하도록 합니다. 테스트 실패, 운영 버그, 예상과 다른 동작을 마주친 개발자를 위한 스킬입니다.
사용하는 경우
- ✓테스트가 실패하거나 프로그램이 예상과 다르게 동작하는데 원인이 불분명할 때.
- ✓빠른 수정이 이미 실패해서 실제 문제를 이해해야 할 때.
- ✓빌드가 실패하거나 연동이 깨졌을 때, 수정 전에 근본 원인을 찾고 싶을 때.
스킬 링크
https://github.com/NousResearch/hermes-agent/blob/main/skills/software-development/systematic-debugging/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“로그인 페이지가 운영 환경에서만 실패하고, 제가 시도한 빠른 수정은 효과가 없었습니다. 무엇도 바꾸기 전에 근본 원인을 찾도록 도와주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 AI가 먼저 문제를 보여 주는 빠른 테스트를 만들도록 합니다. 그다음 증거를 모아 가설을 세우고, 근본 원인이 확인된 뒤에야 수정을 제안하고 테스트합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Systematic Debugging
Overview
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
Core principle: ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
Violating the letter of this process is violating the spirit of debugging.
The Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed Phase 1, you cannot propose fixes.
The Feedback Loop Rule
The feedback loop is the debugging work. Before reading code to build a theory, create or identify a tight command that can go red on the user's exact symptom and green when the bug is fixed. A tight loop is fast, deterministic, agent-runnable, and specific enough to catch this bug — not merely "doesn't crash".
When a clean repro is hard, spend disproportionate effort building the loop. Guessing without a red-capable loop is the failure mode this skill exists to prevent.
When to Use
Use for ANY technical issue:
- Test failures
- Bugs in production
- Unexpected behavior
- Performance problems
- Build failures
- Integration issues
Use this ESPECIALLY when:
- Under time pressure (emergencies make guessing tempting)
- "Just one quick fix" seems obvious
- You've already tried multiple fixes
- Previous fix didn't work
- You don't fully understand the issue
Don't skip when:
- Issue seems simple (simple bugs have root causes too)
- You're in a hurry (rushing guarantees rework)
- Someone wants it fixed NOW (systematic is faster than thrashing)
The Four Phases
You MUST complete each phase before proceeding to the next.
Phase 1: Root Cause Investigation
BEFORE attempting ANY fix:
1. Read Error Messages Carefully
- Don't skip past errors or warnings
- They often contain the exact solution
- Read stack traces completely
- Note line numbers, file paths, error codes
Action: Use read_file on the relevant source files. Use search_files to find the error string in the codebase.
2. Build a Tight Feedback Loop
- Can you trigger the user's exact symptom with one command?
- Does the command fail for this bug and only pass once the bug is fixed?
- Is it fast enough to run repeatedly?
- Is it deterministic? For flaky bugs, can you raise the reproduction rate high enough to debug?
- If not reproducible → gather more data, don't guess.
Ways to construct a loop — try in roughly this order:
- Failing test at the seam that reaches the bug: unit, integration, or end-to-end.
- HTTP script / curl against a running dev server.
- CLI invocation with fixture input, diffing stdout/stderr against expected output.
- Headless browser script (Playwright/Puppeteer) asserting on DOM, console, or network.
- Replay a captured trace: HAR, request payload, event log, queue message, or webhook body.
- Throwaway harness that boots the smallest useful slice of the system and calls the failing path.
- Property / fuzz loop when the bug is intermittent wrong output over a broad input space.
- Bisection harness suitable for
git bisect runwhen the bug appeared between two known states. - Differential loop comparing old vs new version, two configs, two providers, or two datasets.
- Human-in-the-loop script only as a last resort: script the human steps and capture their result so the loop stays structured.
Tighten the loop once it exists:
- Make it faster: cache setup, narrow scope, skip unrelated initialization.
- Make the signal sharper: assert the exact symptom, not generic success.
- Make it more deterministic: pin time, seed randomness, isolate filesystem, freeze network.
For non-deterministic bugs, the immediate goal is a higher reproduction rate, not perfection. Run the trigger 100x, parallelize, add stress, narrow timing windows, or inject sleeps. A 50% flake is debuggable; a 1% flake usually is not.
Action: Use the terminal tool to run the tight loop:
# Run a specific failing test
pytest tests/test_module.py::test_name -v
# Or run a scripted repro
python scripts/repro_bug.py
# Or run a high-repetition flaky repro
for i in {1..100}; do pytest tests/test_flake.py::test_name -q || break; done
3. Check Recent Changes
- What changed that could cause this?
- Git diff, recent commits
- New dependencies, config changes
Action:
# Recent commits
git log --oneline -10
# Uncommitted changes
git diff
# Changes in specific file
git log -p --follow src/problem
자주 묻는 질문
왜 바로 빠른 수정을 하지 않나요?
스킬은 임의의 수정이 시간을 낭비하고 새 버그를 만들 수 있으므로 근본 원인을 먼저 찾아야 한다고 말합니다.
피드백 루프란 무엇인가요?
스킬은 버그가 있으면 실패하고 고쳐지면 통과하는 빠른 명령이라고 설명합니다.
단순한 버그에도 적용하나요?
네. 스킬은 단순한 버그도 실제 원인을 가릴 수 있으므로 같은 과정을 따라야 한다고 말합니다.
상세 정보
작성자의 원본 설명
4-phase root cause debugging: understand bugs before fixing.
인기도
- GitHub 스타
- 260k
- 순위
- #625
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
agent-merge-conflict-arbiter
260k병렬로 작업한 두 에이전트 브랜치 사이의 git 병합 충돌을 중립적인 제3자로서 해결하고, 저장소에 하나의 병합 결과를 만듭니다.
antigravity-cli
260kAntigravity 명령줄 도구의 설치, 업데이트, 플러그인, 로그인, 샌드박스 문제를 해결하도록 단계별로 안내합니다.
blackbox
260k에이전트가 여러 AI 모델을 실행해 최선의 결과를 고르는 Blackbox AI 명령줄 도구에 코딩 작업을 맡기도록 돕습니다.
dynamic-workflow
260k많은 비슷한 작업을 저장된 스크립트로 실행하고, 검증된 결과만 메인 대화로 돌아오도록 에이전트에게 가르칩니다.