
systematic-debugging
Structured debugging methodology — reproduce, isolate, hypothesize, verify. Covers git bisect, binary search, logging, and minimal reproduction.
- Installs
- 551
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill systematic-debugging- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads systematic-debugging automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Systematic Debugging
Debug methodically instead of randomly changing code.
The Process
1. Reproduce
Before anything else, reproduce the bug reliably:
- Get the exact steps to trigger the issue
- Note the expected vs actual behavior
- Confirm it happens consistently (not intermittent)
- Record the environment (OS, Node version, browser, etc.)
If you can't reproduce it, you can't fix it. Ask for more details.
2. Isolate
Narrow down where the bug lives:
Binary search the codebase:
- Comment out half the system → does the bug persist?
- If yes, the bug is in the remaining half → repeat
- If no, the bug is in the commented-out half → repeat
Git bisect:
git bisect start
git bisect bad # current commit is broken
git bisect good <sha> # this commit was working
# Git checks out the midpoint — test it
git bisect good # or git bisect bad
# Repeat until it finds the first bad commit
git bisect reset # when done
Isolate by layer:
- Is it frontend or backend? (Check network tab)
- Is it the database? (Query directly)
- Is it the API? (curl the endpoint)
- Is it the component? (Render it in isolation)
3. Hypothesize
Form a specific, testable hypothesis:
- "The bug is caused by X because Y"
- Not "something is wrong with the data"
- Good: "The
userIdis null because the auth middleware doesn't run on this route"
4. Test the Hypothesis
Write the smallest possible test that proves/disproves your hypothesis:
- Add a
console.logor breakpoint at the suspected location - Check the value of the suspected variable
- If your hypothesis is wrong, go back to step 3 with new information
- If it's right, you've found the bug
5. Fix and Verify
- Apply the minimal fix
- Verify the original reproduction steps no longer trigger the bug
- Check for regressions — did the fix break anything else?
- Write a test that would have caught this bug
Debugging Tools
| Scenario | Tool |
|---|---|
| "It worked before" | git bisect |
| "I don't know where this runs" | Add logging at entry/exit of suspect functions |
| "The data looks wrong" | Inspect at each transformation step |
| "It only fails in production" | Compare env vars, check logs, try to reproduce with prod data locally |
| "It's intermittent" | Look for race conditions, timing issues, or uninitialized state |
| "The error message is useless" | Search the codebase for where that error is thrown |
Common Bug Patterns
- Off-by-one: Array indices, pagination, date ranges
- Null/undefined: Missing optional chaining, uninitialized state
- Race condition: Async operations completing in unexpected order
- Stale closure: React useEffect/useCallback capturing old values
- Type coercion:
==vs===, string vs number comparisons - Missing await: Forgetting
awaiton async functions - Environment mismatch: Works locally, fails in CI/prod due to different env vars or versions
Rules
- Never guess — always verify with evidence
- Fix the root cause, not the symptom
- If you've spent 15 minutes without progress, step back and re-isolate
- Document what you tried so you don't repeat failed approaches
FAQ
What does the systematic-debugging skill do?
Structured debugging methodology — reproduce, isolate, hypothesize, verify. Covers git bisect, binary search, logging, and minimal reproduction.
How do I install systematic-debugging?
Run npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill systematic-debugging in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/systematic-debugging/ (personal) or .claude/skills/systematic-debugging/ (project).
Which AI agents can use systematic-debugging?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is systematic-debugging safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains systematic-debugging?
It is published by spencerpauly in spencerpauly/awesome-cursor-skills. It has 551 recorded installs.
More from spencerpauly/awesome-cursor-skills
visual-qa-testing
spencerpauly/awesome-cursor-skills
Visually QA a web application by launching it in Cursor's built-in browser, taking screenshots, checking console errors, and auditing network requests. Use after making UI changes to verify they look correct.
auditing-security
spencerpauly/awesome-cursor-skills
Perform a systematic security audit of a codebase, checking for OWASP Top 10 vulnerabilities, secrets exposure, and insecure patterns.
responsive-testing
spencerpauly/awesome-cursor-skills
Open the app in Cursor's browser at multiple viewport sizes, screenshot each, and report any layout breakage.
suggesting-cursor-rules
spencerpauly/awesome-cursor-skills
When the user repeats the same correction or convention multiple times, suggest a Cursor rule to encode it permanently.
grinding-until-pass
spencerpauly/awesome-cursor-skills
Keep iterating on code changes until the tests pass, the build succeeds, or linting is clean. Runs in a tight loop of fix → run → check → repeat. Use when you want the agent to autonomously grind through test failures or build errors.
verifying-in-browser
spencerpauly/awesome-cursor-skills
After making code changes, start the dev server, open the app in Cursor's built-in browser, and verify everything works — check rendering, console errors, and network health. Use proactively after any UI or API change.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.