Debugging patterns
Skill subhansh-dev/agent-maxxing/engineering/debugging-patterns
95+ agent skills, 19 UI components, 7 system prompts from Claude Fable 5, GPT-5.5, Gemini CLI & more. Self-fine-tune your agent: paste one prompt and it reads every skill, internalizes patterns, and becomes elite. Works with Claude Code, Codex, Cursor, OpenCode + 60 more agents.
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.
What its author says it does
Copied from the file, not written here
Systematic debugging methodology — read errors completely, reproduce first, bisect, add logging, trace flow.
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.
Gives 1 of the 12 instructions most debug triage skills give in 502 tokens
Counted across 839 of the 1,149 authors here whose files we hold, read 2026-08-07
- Investigate root cause before proposing any fixin 102 of 839, across 67 files
- Read error messages completelyhere, and in 89 of 839, across 49 files
- Create a failing test case before fixingin 84 of 839, across 46 files
- Reproduce the issue consistentlyin 82 of 839, across 41 files
- Change one variable at a timein 82 of 839, across 42 files
- Check recent changesin 74 of 839, across 36 files
- Write the regression test before fixingin 74 of 839, across 40 files
- Fix the root cause not the symptomin 60 of 839, across 45 files
- Implement a single fix at a timein 59 of 839, across 20 files
- Trace data flow backward to the sourcein 50 of 839, across 20 files
- Remove all debug instrumentationin 49 of 839, across 13 files
- Form a single hypothesisin 48 of 839, across 18 files
Said here and by no other author read
- bisect the code to locate the bug
- add logging to observe the state
- check for typos and obvious mistakes
- try the simplest fix first
- stop and explain attempts if going in circles
- ask for help after exhausting debugging steps
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.