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/01c5d88b0139a80ac38bfe7206ea99f28b0fc999/skills/systematic-debugging/SKILL.md at commit 01c5d88b0139a80ac38bfe7206ea99f28b0fc999. 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 | 249 | 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
Alternatives
freenet/freenet-agent-skills
Methodology for debugging non-trivial problems systematically. This skill should be used automatically when investigating bugs, test failures, or unexpected behavior that isn't immediately obvious. Emphasizes hypothesis formation, parallel investigation with subagents, and avoiding common anti-patterns like jumping to conclusions or weakening tests.
obra/superpowers
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
aAAaqwq/AGI-Super-Team
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
event4u-app/agent-config
Use on a bug, test failure, crash, or unexpected behavior — enforce reproduce → isolate → hypothesize → verify before any fix; fires even on 'this is broken' / 'quick fix'.