Debugging patterns
Skill subhansh-dev/agent-maxxing/engineering/debugging-patterns
Systematic debugging methodology — read errors completely, reproduce first, bisect, add logging, trace flow.From its SKILL.md
npx -y skills add subhansh-dev/agent-maxxing --skill debugging-patternsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.1 KB, 502 tokens by cl100k_base, as published. Nobody here has run it
Debugging Patterns — How to Fix Things
The Debugging Chain
When you hit a bug:
- Read the error message completely. All of it. Don't skim.
- Reproduce it. Run the code. Hit the error. See it yourself.
- Bisect. Comment out half the code. Does it still happen? Binary search.
- Add logging. Print the state at each step. Don't guess — measure.
- Trace the flow. Follow the data from input to output. Where does it go wrong?
- Check the obvious. Typos, wrong variable names, missing imports, stale caches.
- Search for it. Someone else probably hit this. Stack Overflow, GitHub issues, docs.
- Try the simplest fix first. Don't refactor the whole system for a typo.
- If you're going in circles, stop. Explain what you've tried and why each attempt failed.
Common Bug Categories
Null/Undefined
- Check if the value is actually defined before using it
- Trace where it comes from — is it async? Is it cached?
- Add a guard:
if (!value) returnorvalue ?? fallback
Async/Timing
- Is something racing? Add
awaitor locks - Is the order wrong? Log timestamps
- Is the callback firing twice? Check event listener cleanup
State
- Is the state stale? Log it before and after
- Is it shared between instances? Check for singleton issues
- Is it being mutated unexpectedly? Use immutable patterns
Environment
- Is it a different Node/Python version?
- Is it a different OS? (path separators, line endings)
- Is it a different environment variable?
- Is it a cached build? Clean and rebuild.
The "Rubber Duck" Technique
Explain the problem out loud (or in a comment). The act of articulating it often reveals the solution. If you can't explain it simply, you don't understand it yet.
When to Ask for Help
After you've:
- Read the error completely
- Reproduced it
- Tried the obvious fixes
- Added logging
- Searched for similar issues
- Still stuck
Then ask. Include: what you tried, what happened, what you expected.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.