systematic-debugging
4-phase debugging methodology with root cause analysis, 3-fix escalation, and scientific method enforcement.
Skill by lshtram
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/lshtram-systematic-debugging
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: research
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/systematic-debugging
What's inside
- Skill name
systematic-debugging- Description
- 4-phase debugging methodology with root cause analysis, 3-fix escalation, and scientific method enforcement.
- License
- MIT
- Instructions
- 302 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
# Systematic Debugging — Mandatory Skill
**Agent:** Analyst (Phase 1: Investigation), Builder (Phase 2: Fix)
**Phase:** DEBUG workflow — all phases
**Priority:** CRITICAL — This skill is NON-NEGOTIABLE during DEBUG workflow
---
## IRON LAW
**NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.**
Do not guess. Do not "try something." Do not apply the first fix that comes to mind.
Investigate. Understand. Then fix.
---
## The 4-Phase Debugging Process
```mermaid
graph TD
A[Bug Report / Symptom] --> B[Phase 1: Root Cause Analysis]
B --> C{Root cause identified?}
C -->|No| D[Gather more evidence]
D --> B
C -->|Yes| E[Phase 2: Pattern Analysis]
E --> F{Seen this pattern before?}
F -->|Yes| G[Check memory for previous fix]
F -->|No| H[Document as new pattern]
G --> I[Phase 3: Hypothesis & Testing]
H --> I
I --> J{Fix attempt #?}
J -->|1-3| K[Implement minimal fix]
K --> L[Write failing test FIRST]
L --> M[Apply fix]
M --> N{Tests pass?}
N -->|No| J
N -->|Yes| O[Phase 4: Verification]
O --> P[Run full test suite]
P --> Q{All pass?}
Q -->|No| R[Fix broke something else.<br/>Revert. Return to Phase 1.]
Q -->|Yes| S[Done: Document in result.md]
J -->|4+| T[STOP: 3-Fix Escalation.<br/>Write escalation.md.<br/>Present to user.]
```
---
## Phase 1: Root Cause Analysis
**Objective:** Understand WHY the bug exists, not just WHAT it does.
### Mandatory Steps
1. **Reproduce the bug.** If you can't reproduce it, you don't understand it.
- Write exact steps to trigger the bug.
- Note environment details (browser, OS, Node version, config).
- Confirm reproduction is consistent (try 3 times).
2. **Gather evidence.** Do NOT hypothesize until you have data.
- Read error messages and stack traces verbatim.
- Check logs for the time window around the failure.
- Run `git log --since="2 days ago" --oneline` to find recent changes.
- Check memory/patterns.md for similar past issues.
3. **Trace the data flow backward.**
- Start at the failure point (the error/wrong output).
- Walk backward through the code: what function called this? What data did it pass?
- At each step, verify the data is what you expect.
- The first place where data diverges from expectation is likely the root cause.
4. **Identify the root cause.**
- The root cause is the EARLIEST point in the chain where behavior diverges from specification.
- "The button doesn't work" is a symptom. "The event handler references a stale closure" is a root cause.
### Phase 1 Gate
Before proceeding to Phase 2, you MUST have:
- [ ] Reproduction steps (tested and consistent)
- [ ] Evidence collected (logs, errors, stack traces)
- [ ] Root cause identified (specific code location and mechanism)
- [ ] Root cause explains ALL symptoms (not just some)
---
## Phase 2: Pattern Analysis
**Objective:** Determine if this bug is an instance of a known pattern.
### Steps
1. **Check memory.** Read `.opencode/context/01_memory/patterns.md`:
- Has this exact bug occurred before?
- Has a similar class of bug occurred? (e.g., "stale closure" bugs)
- What was the previous fix? Did it work?
2. **Classify the bug type:**
- **Logic error:** Wrong algorithm, wrong condition, off-by-one
- **State management:** Stale state, race condition, missing update
- **Integration:** API contract mismatch, data format mismatch
- **Environment:** Config, dependency version, platform difference
- **Regression:** Worked before, broken by recent change
3. **Document the pattern** for future reference.
### Phase 2 Gate
Before proceeding to Phase 3, you MUST have:
- [ ] Memory checked for similar past issues
- [ ] Bug classified by type
- [ ] If recurring pattern: previous fix reviewed for effectiveness
---
## Phase 3: Hypothesis & Testing
**Objective:** Fix the bug using the scientific method — one variable at a time.
### The Scientific Method for Debugging
1. **State your hypothesis clearly:**
> "The bug occurs because [specific mechanism]. Fixing [specific thing] should resolve it because [reasoning]."From lshtram/nso, MIT.
More from lshtram/nso
- 0.408score
integration-verifier
lshtram
Verify integration tests and E2E scenarios, detect failures, and provide rollback options
SkillDFreshness: DClaude Code +9 - 0.408score
skill-creator
lshtram
Create or improve skills using the Claude Code skill standard.
SkillDFreshness: DClaude Code +9 - 0.406score
tdd
lshtram
Test-Driven Development enforcement with rationalization prevention, verification checklist, and delete-and-restart rule.
SkillDFreshness: DClaude Code +9 - 0.406score
router
lshtram
Intelligent intent detection and workflow routing for NSO.
SkillDFreshness: DClaude Code +9 - 0.404score
post-mortem
lshtram
Session analysis, pattern detection, and self-improvement orchestration for workflow closure.
SkillDFreshness: DClaude Code +9 - 0.404score
ui-design-system
lshtram
Comprehensive UI/UX design system skill — component generation, design tokens, accessibility, and responsive design.
SkillDFreshness: DClaude Code +9 - 0.404score
architectural-review
lshtram
Multi-expert architecture review with simplicity checklist and debate-driven analysis.
SkillDFreshness: DClaude Code +9 - 0.404score
bug-investigator
lshtram
Investigate bugs with LOG FIRST approach, regression tests, and variant coverage.
SkillDFreshness: DClaude Code +9 - 0.404score
code-reviewer
lshtram
Review code with confidence scoring (≥80), two-stage review, and CRITICAL issue blocking.
SkillDFreshness: DClaude Code +9 - 0.404score
memory-update
lshtram
Force an on-demand update of NSO memory files with comprehensive context.
SkillDFreshness: DClaude Code +9 - 0.404score
verification-gate
lshtram
IDENTIFY→RUN→READ→VERIFY→CLAIM gate function with forbidden language detection and fresh evidence requirement.
SkillDFreshness: DClaude Code +9 - 0.401score
rm-multi-perspective-audit
lshtram
Audit requirements from multiple stakeholder perspectives.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Feb 12, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/lshtram/nso
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from lshtram
- 0.408score
skill-creator
lshtram
Create or improve skills using the Claude Code skill standard.
SkillDFreshness: DClaude Code +9 - 0.408score
integration-verifier
lshtram
Verify integration tests and E2E scenarios, detect failures, and provide rollback options
SkillDFreshness: DClaude Code +9 - 0.406score
tdd
lshtram
Test-Driven Development enforcement with rationalization prevention, verification checklist, and delete-and-restart rule.
SkillDFreshness: DClaude Code +9 - 0.406score
router
lshtram
Intelligent intent detection and workflow routing for NSO.
SkillDFreshness: DClaude Code +9 - 0.405score
platform-agentic-cicd-orchestrator
lshtram
Use when doing cross-layer planning, drift reconciliation, and CI/CD promotion across UI, n8n, and backend layers
SkillDFreshness: DClaude Code +9 - 0.404score
bug-investigator
lshtram
Investigate bugs with LOG FIRST approach, regression tests, and variant coverage.
SkillDFreshness: DClaude Code +9
Cite this page
systematic-debugging skill. Agent Mart. https://agentmart.dev/skills/lshtram-systematic-debugging (last updated 2026-10-24)