/vibeworks-library:debugging-systematicfrom vibeworks-library
Teaches a scientific debugging process: observe, hypothesize, test, and root-cause errors. Includes binary search isolation, hypothesis ranking, and reproducible bug analysis.
Ships in vibeworks-library. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Debugging is not guessing. It is a scientific process: observe the symptom, form a hypothesis, predict the outcome of a test, and run the test. Repeat until the root cause is found.
Before changing anything, collect all available information.
Checklist:
Key question: Can I reproduce this bug reliably? If not, gathering more observations is the priority.
Based on the evidence, propose a specific, falsifiable explanation.
Good hypothesis format:
"The crash occurs because
user.profileis null when the user has not completed onboarding, and line 47 accessesuser.profile.namewithout a null check."
Bad hypothesis:
"Something is wrong with the user object."
Rules:
Before touching the code, predict what you will see IF your hypothesis is correct.
Examples:
user.profile on line 45 will print null for users created after January 1."Execute one change at a time. Observe whether the prediction matches.
Rules:
When you have no idea where the bug lives, use binary search to narrow it down.
git bisect start
git bisect bad # Current commit is broken
git bisect good <commit> # This commit was known to work
# Git checks out the midpoint. Test it.
git bisect good # or git bisect bad
# Repeat until git identifies the first bad commit.
git bisect reset
Error: Cannot read properties of null (reading 'name') <-- Error type + message
at getUserName (src/services/user.js:47:22) <-- YOUR CODE (start here)
at handleRequest (src/routes/profile.js:12:15) <-- Caller
at Layer.handle (node_modules/express/lib/router.js:5) <-- Framework (skip)
at next (node_modules/express/lib/router.js:13) <-- Framework (skip)
Reading order:
| Error Message | Likely Cause |
|---|---|
Cannot read properties of null/undefined | Missing null check; variable not initialized |
TypeError: X is not a function | Wrong import; typo in method name; variable shadowing |
RangeError: Maximum call stack exceeded | Infinite recursion; circular reference |
ECONNREFUSED / ETIMEDOUT | External service is down or misconfigured |
ENOENT: no such file or directory | Wrong path; missing file; CWD is not what you expect |
SyntaxError: Unexpected token | Malformed JSON; wrong file format; encoding issue |
[ENTRY] Function name, input parameters (sanitized)
[STATE] Key variable values at decision points
[BRANCH] Which branch of a conditional was taken
[EXIT] Return value or thrown exception
DEBUG -> Detailed variable dumps (temporary, remove after fixing)
INFO -> Flow markers ("entered function X", "querying database")
WARN -> Unexpected but handled conditions ("retrying after timeout")
ERROR -> Unhandled exceptions and failures
# Add a unique tag so you can find and remove all debug logs later
print("[DEBUG-ISSUE-123] user_id:", user_id, "profile:", profile)
When done, search for [DEBUG-ISSUE-123] and remove all instances.
< vs <=), array indices (0-based vs 1-based), string slicing (inclusive vs exclusive end).NullPointerException, Cannot read properties of undefined.sleep(500)) to amplify timing windows. If the bug becomes more or less frequent, it is a race.After fixing a non-trivial bug, document what happened:
## Bug Post-Mortem: [ISSUE-ID] [Short title]
### Summary
One-sentence description of the bug and its impact.
### Timeline
- [timestamp] Bug reported by [who/what]
- [timestamp] Reproduced in [environment]
- [timestamp] Root cause identified
- [timestamp] Fix deployed
### Root Cause
Detailed technical explanation of why the bug occurred.
### Fix
What was changed and why. Link to the commit/PR.
### Detection
How was the bug caught? Could we have caught it earlier?
### Prevention
What process or technical change would prevent this class of bug?
- [ ] Added regression test: [link]
- [ ] Added monitoring/alerting: [details]
- [ ] Updated documentation: [link]
- [ ] Other: [details]
### Lessons Learned
What did we learn that applies beyond this specific bug?
Explain the problem out loud (or in writing) step by step. Articulating assumptions often reveals which one is wrong.
Strip away everything not related to the bug:
The act of creating a minimal reproduction often reveals the cause.
If it used to work:
git bisect for large ranges.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub claude-code-community-ireland/claude-code-resources --plugin vibeworks-library34 skills in this plugin
/agent-developmentAgent DevelopmentThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins./api-designREST and API design principles — resource naming, HTTP methods, status codes, pagination, versioning, and error responses. Reference when designing or reviewing APIs./architecture-decision-recordADR format and methodology for documenting significant technical decisions with context, alternatives considered, and consequences. Use when making or documenting architectural decisions./branch-strategyBranch naming conventions, Git Flow vs trunk-based development, feature branch lifecycle, and release strategies. Reference when creating branches, planning releases, or choosing a branching model./code-review-checklistComprehensive code review criteria covering correctness, readability, maintainability, security, performance, and testing. Reference when reviewing code changes or preparing code for review./command-developmentCommand DevelopmentThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.Other plugins' skills for the same job