Best for
- Use when encountering bugs, errors, or unexpected behavior.
majiayu000/spellbook/skills/systematic-debugging/SKILL.md
Four-phase debugging framework for any technical issue. Use when encountering bugs, errors, or unexpected behavior. Prevents random fix attempts.
Decision brief
Four-phase debugging framework for any technical issue. Prevents random fix attempts.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/majiayu000/spellbook --skill "skills/systematic-debugging"Inspect the Agent Skill "systematic-debugging" from https://github.com/majiayu000/spellbook/blob/9e96aa5f52e8504cbbf9d359def29f9abcde57ce/skills/systematic-debugging/SKILL.md at commit 9e96aa5f52e8504cbbf9d359def29f9abcde57ce. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Read error messages carefully - Full stack traces - Error codes and descriptions - Timestamps and context
1. Find similar working code - Search codebase for related functionality - Look for existing patterns
1. Form a SINGLE, SPECIFIC hypothesis - "The error occurs because X" - Not "maybe it's A or B or C"
1. Create a failing test case FIRST - Reproduces the bug - Will pass when fixed
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 262 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
From obra/superpowers
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
Random fixes create new bugs. Understanding must precede solutions.
Before ANY fix attempt:
Read error messages carefully
Reproduce consistently
Check recent changes
Gather diagnostic evidence
Find similar working code
Read reference implementations completely
Compare working vs broken
Understand dependencies
Form a SINGLE, SPECIFIC hypothesis
Test with minimal changes
Accept results
Ask for help when stuck
Create a failing test case FIRST
Implement SINGLE fix
Verify the fix
If ≥3 fixes fail: STOP and question the architecture
Three consecutive failed fixes signal:
Do NOT attempt more fixes. Reassess the approach.
STOP and restart investigation if you:
## Investigation
- [ ] Read full error message/stack trace
- [ ] Reproduced issue consistently
- [ ] Checked recent changes
- [ ] Added diagnostic logging
- [ ] Traced data flow
## Analysis
- [ ] Found similar working code
- [ ] Compared working vs broken
- [ ] Understood all dependencies
## Hypothesis
- [ ] Formed single specific hypothesis
- [ ] Tested with minimal change
- [ ] Accepted results honestly
## Fix
- [ ] Created failing test case
- [ ] Implemented single fix
- [ ] Verified fix works
- [ ] No regressions
Issue: User login fails silently
Phase 1 - Investigation:
- Error: "null reference at AuthService.validate()"
- Reproduced: happens with specific user emails
- Recent change: added email normalization
Phase 2 - Analysis:
- Working logins use lowercase emails
- Failing logins have mixed case
- Normalization strips @ symbol incorrectly
Phase 3 - Hypothesis:
- "Email normalization regex is wrong"
- Test: log email before/after normalization
- Result: "[email protected]" → "testexample.com"
- Confirmed!
Phase 4 - Fix:
- Write test: normalize("[email protected]") == "[email protected]"
- Fix regex to preserve @
- Verify: test passes, logins work
Frequently asked questions
Four-phase debugging framework for any technical issue. Prevents random fix attempts.
The source record exposes this install command: npx skills add https://github.com/majiayu000/spellbook --skill "skills/systematic-debugging". Inspect the command and pinned source before running it.
Alternatives
johnqtcg/awesome-skills
Use when debugging, diagnosing, or investigating any bug, test failure, flaky test, race condition, unexpected behavior, build failure, production incident, third-party breakage, root cause analysis, or performance regression before proposing fixes
magnus919/agent-skills
4-phase root cause debugging protocol: understand bugs before fixing. Use for ANY technical issue — test failures, production bugs, unexpected behavior, performance problems, build failures, or integration issues. ESPECIALLY when under time pressure, when "one quick fix" seems obvious, or when previous fix attempts have failed.
moltis-org/moltis
Use when encountering any bug, test failure, or unexpected behavior. 4-phase root cause investigation — NO fixes without understanding the problem first.
jamditis/claude-skills-journalism
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes