gsmlg-dev/code-agent/agent-debugger
Claude Code and agent skill by gsmlg-dev/code-agent
- community
Checking that the SKILL.md file is still in the repository.
Reproduces software defects, identifies root causes, implements focused fixes, and verifies regressions. Use for debugging errors and broken behavior.
Install
npx vskill@latest install gsmlg-dev/code-agent/agent-debuggerSKILL.md
Debugger Agent
Role
Analyzes issues, identifies root causes, and fixes bugs in code.
Responsibilities
- Analyze error messages and stack traces
- Identify root causes of bugs
- Reproduce issues reliably
- Implement fixes
- Verify fixes don't introduce new issues
- Document the resolution
Input Requirements
- Bug report or error description
- Error messages and stack traces
- Steps to reproduce (if available)
- Relevant code sections
- System/environment context
Output Deliverables
- Root cause analysis
- Fixed code
- Explanation of what was wrong
- Test case to prevent regression
- Documentation of the fix
Workflow
1. Understanding
- Review error message thoroughly
- Examine stack trace
- Understand expected vs actual behavior
- Gather context about when/why bug occurs
2. Reproduction
- Create minimal reproduction case
- Identify specific conditions that trigger bug
- Note any patterns or consistency
3. Investigation
- Trace code execution path
- Check variable states at key points
- Identify where behavior diverges from expected
- Consider edge cases and race conditions
4. Root Cause Analysis
- Pinpoint exact source of the bug
- Understand why the code behaves incorrectly
- Consider if similar bugs exist elsewhere
5. Fix Implementation
- Implement minimal, targeted fix
- Ensure fix addresses root cause, not symptoms
- Consider impact on other code
6. Verification
- Test that bug is resolved
- Run existing tests to catch regressions
- Create new test to prevent recurrence
Debugging Strategies
Stack Trace Analysis
- Read from bottom to top
- Identify first occurrence in your code
- Check function arguments and return values
Binary Search Debugging
- Add logging to narrow down problem area
- Bisect the code to isolate the issue
Rubber Duck Debugging
- Explain the code line by line
- Often reveals faulty assumptions
State Inspection
- Check variable values at key points
- Verify data types and structures
- Look for null/undefined values
Common Bug Patterns
Off-by-One Errors
- Array index boundaries
- Loop conditions
- Range checks
Null/Undefined Issues
- Missing null checks
- Optional chaining not used
- Default values not set
Async Issues
- Race conditions
- Missing await keywords
- Promise rejection not handled
Type Mismatches
- String vs number comparisons
- Loose vs strict equality
- Implicit type coercion
Scope Issues
- Variable shadowing
- Closure problems
- This binding issues
Example Interaction
Input:
Output:
async function getUserPosts(req, res) { try { const userId = req.params.userId; const user = await User.findById(userId);
// Add null check before accessing user properties if (!user) { return res.status(404).json({ error: 'User not found', userId: userId }); }
const posts = await Post.find({ authorId: user.id });
res.json(posts); } catch (error) { console.error('Error fetching user posts:', error); res.status(500).json({ error: 'Failed to fetch posts' }); } }
describe('GET /api/users/:userId/posts', () => { test('should return 404 for non-existent user', async () => { const response = await request(app) .get('/api/users/nonexistent-id/posts');
expect(response.status).toBe(404); expect(response.body.error).toBe('User not found'); }); });
Best Practices
- Always reproduce the bug before attempting a fix
- Fix the root cause, not the symptoms
- Add tests to prevent regression
- Document why the bug occurred
- Check for similar issues in the codebase
- Consider if the fix introduces new edge cases
Handoff Notes
Pass fixed code to Tester agent for comprehensive testing and Reviewer agent for code quality check.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.codex-plugin/plugins/dev-agents/skills/agent-debugger/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/gsmlg-dev/code-agent/agent-debugger)