gstack-openclaw-investigate
하는 일
이 스킬은 수정 전에 원인을 먼저 찾아야 한다는 규칙으로 디버깅을 안내합니다. 오류, 예상과 다른 동작, 작동을 멈춘 기능을 마주친 개발자를 위한 스킬입니다.
사용하는 경우
- ✓에이전트에게 버그를 고치거나 오류를 조사해 달라고 요청할 때.
- ✓프로젝트에서 스택 트레이스나 예상과 다른 동작이 나타날 때.
- ✓누군가 기능이 작동을 멈췄다고 알릴 때.
스킬 링크
https://github.com/garrytan/gstack/blob/main/openclaw/skills/gstack-openclaw-investigate/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“어제 업데이트 후에 무언가 작동을 멈췄습니다. 무엇도 바꾸기 전에 근본 원인을 찾아 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 증상을 모으고, 코드 경로를 읽고, 최근 변경을 확인하며, 버그를 재현합니다. 테스트하고 고치기 전에 구체적인 가설을 밝힙니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Systematic Debugging
Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
Fixing symptoms creates whack-a-mole debugging. Every fix that doesn't address root cause makes the next bug harder to find. Find the root cause, then fix it.
Phase 1: Root Cause Investigation
Gather context before forming any hypothesis.
Collect symptoms: Read the error messages, stack traces, and reproduction steps. If the user hasn't provided enough context, ask ONE question at a time. Don't ask five questions at once.
Read the code: Trace the code path from the symptom back to potential causes. Search for all references, read the logic around the failure point.
Check recent changes:
git log --oneline -20 -- <affected-files>Was this working before? What changed? A regression means the root cause is in the diff.
Reproduce: Can you trigger the bug deterministically? If not, gather more evidence before proceeding.
Check memory for prior debugging sessions on the same area. Recurring bugs in the same files are an architectural smell.
Output: "Root cause hypothesis: ..." ... a specific, testable claim about what is wrong and why.
Phase 2: Pattern Analysis
Check if this bug matches a known pattern:
Race condition ... Intermittent, timing-dependent. Look at concurrent access to shared state.
Nil/null propagation ... NoMethodError, TypeError. Missing guards on optional values.
State corruption ... Inconsistent data, partial updates. Check transactions, callbacks, hooks.
Integration failure ... Timeout, unexpected response. External API calls, service boundaries.
Configuration drift ... Works locally, fails in staging/prod. Env vars, feature flags, DB state.
Stale cache ... Shows old data, fixes on cache clear. Redis, CDN, browser cache.
Also check:
- Known issues in the project for related problems
- Git log for prior fixes in the same area. Recurring bugs in the same files are an architectural smell, not a coincidence.
External search: If the bug doesn't match a known pattern, search for the error type online. Sanitize first: strip hostnames, IPs, file paths, SQL, customer data. Search the error category, not the raw message.
Phase 3: Hypothesis Testing
Before writing ANY fix, verify your hypothesis.
Confirm the hypothesis: Add a temporary log statement, assertion, or debug output at the suspected root cause. Run the reproduction. Does the evidence match?
If the hypothesis is wrong: Search for the error (sanitize sensitive data first). Return to Phase 1. Gather more evidence. Do not guess.
3-strike rule: If 3 hypotheses fail, STOP. Tell the user:
"3 hypotheses tested, none match. This may be an architectural issue rather than a simple bug."
Options:
- Continue investigating with a new hypothesis (describe it)
- Escalate for human review (needs someone who knows the system)
- Add logging and wait (instrument the area and catch it next time)
Red flags ... if you see any of these, slow down:
- "Quick fix for now" ... there is no "for now." Fix it right or escalate.
- Proposing a fix before tracing data flow ... you're guessing.
- Each fix reveals a new problem elsewhere ... wrong layer, not wrong code.
Phase 4: Implementation
Once root cause is confirmed:
Fix the root cause, not the symptom. The smallest change that eliminates the actual problem.
Minimal diff: Fewest files touched, fewest lines changed. Resist the urge to refactor adjacent code.
Write a regression test that:
- Fails without the fix (proves the test is meaningful)
- Passes with the fix (proves the fix works)
Run the full test suite. No regressions allowed.
If the fix touches >5 files: Flag the blast radius to the user before proceeding. That's large for a bug fix.
Phase 5: Verification & Report
Fresh verification: Reproduce the original bug scenario and confirm it's fixed. This is not optional.
Run the test suite.
Output a structured debug report:
DEBUG REPORT
- Symptom: what the user observed
- Root cause: what was actually wrong
- Fix: what was changed, with file references
- Evidence: test output, reproduction showing fix works
- Regression test: location of the new test
- Related: prior bugs in same area, architectural notes
- Status: DONE | DONE_WITH_CONCERNS | BLOCK
자주 묻는 질문
증상만 빨리 고치나요?
아니요. 땜질식 수정을 피하도록 근본 원인을 먼저 찾게 되어 있습니다.
최근 변경을 확인하나요?
네. 영향을 받은 파일의 최근 커밋 기록을 살펴봅니다.
질문도 하나요?
네. 더 많은 맥락이 필요하면 한 번에 하나씩 질문합니다.
상세 정보
작성자의 원본 설명
Use when asked to debug, fix a bug, investigate an error, or do root cause analysis, and when users report errors, stack traces, unexpected behavior, or say something stopped working.
repo: garrytan/gstack
인기도
- GitHub 스타
- 139k
- 순위
- #713
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
autoplan
139k제품, 디자인, 엔지니어링, 개발자 경험 관점에서 한 번의 실행으로 계획을 여러 각도에서 검토하도록 돕습니다.
benchmark
139k변경 전후의 페이지 속도를 측정해 웹 성능 저하를 찾아내도록 에이전트를 돕습니다.
browse
139k에이전트가 실제 웹 브라우저를 열어 페이지 흐름을 클릭하고, 스크린샷을 찍고, 콘솔 오류를 확인하도록 돕습니다.
hackernews-frontpage
139kHacker News 첫 페이지의 현재 글을 순위, 제목, 링크, 점수, 댓글 수와 함께 수집하도록 돕습니다.