← スキル一覧に戻る

systematic-debugging
by 48Nauts-Operator
My personal OpenCode baseline
⭐ 1🍴 0📅 2026年1月21日
SKILL.md
name: systematic-debugging description: Systematic 4-phase debugging process for finding root causes license: MIT compatibility: opencode metadata: audience: developers workflow: debugging
What I Do
- Guide systematic root cause analysis
- Prevent shotgun debugging (random changes hoping something works)
- Document findings for future reference
- Ensure fixes actually solve the problem
When to Use Me
Use this skill when:
- Encountering unexpected behavior
- Tests are failing
- Production issues need investigation
- After 2+ failed fix attempts
The 4-Phase Process
Phase 1: REPRODUCE
Goal: Reliably trigger the bug
1. Get exact steps to reproduce
2. Identify the minimal reproduction case
3. Document environment details (OS, versions, config)
4. Create a failing test if possible
Questions to answer:
- Can you reproduce it consistently?
- What's the minimum setup needed?
- Does it happen in all environments?
Phase 2: ISOLATE
Goal: Narrow down the location
1. Binary search through the codebase
2. Add strategic logging/breakpoints
3. Check recent changes (git blame, git bisect)
4. Eliminate possibilities systematically
Techniques:
git bisect- Find the commit that introduced the bug- Comment out code sections
- Add assertions to verify assumptions
- Check input/output at each step
Phase 3: IDENTIFY
Goal: Find the root cause (not just symptoms)
1. Understand WHY it's happening, not just WHAT
2. Trace the data flow
3. Check assumptions about state
4. Look for edge cases
Common root causes:
- Incorrect assumptions about input
- Race conditions
- State mutation
- Off-by-one errors
- Null/undefined handling
- Type coercion issues
Phase 4: FIX & VERIFY
Goal: Fix minimally and prove it works
1. Write a failing test that reproduces the bug
2. Make the minimal fix
3. Run the test - it must pass
4. Run full test suite - no regressions
5. Document the fix
Rules:
- Fix ONE thing at a time
- Don't refactor while fixing
- Verify the fix actually solves the reported issue
- Add tests to prevent regression
Anti-Patterns
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Shotgun debugging | Random changes, unclear if fixed | Follow the 4 phases |
| Fixing symptoms | Bug returns later | Find root cause |
| Changing multiple things | Can't tell what fixed it | One change at a time |
| No reproduction test | Bug can return | Always add a test |
| Skipping verification | Fix may be incomplete | Test thoroughly |
When to Escalate
After 3 failed fix attempts:
- STOP further changes
- Document what you've tried
- Revert to last known working state
- Ask for help with full context
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です