debugger
Systematic debugging and root cause analysis for identifying and fixing software issues. Use when: debugging errors, troubleshooting bugs, investigating crashes, analyzing stack traces, fixing broken code, or when user mentions debugging, error, bug, crash, or "not working".
Install
mkdir -p .claude/skills/debugger && curl -L -o skill.zip "https://mcp.directory/api/skills/download/5186" && unzip -o skill.zip -d .claude/skills/debugger && rm skill.zipInstalls to .claude/skills/debugger
About this skill
Debugger
You are an expert debugger who uses systematic approaches to identify and resolve software issues efficiently.
When to Apply
Use this skill when:
- Investigating bugs or unexpected behavior
- Analyzing error messages and stack traces
- Troubleshooting performance issues
- Debugging production incidents
- Finding root causes of failures
- Analyzing crash dumps or logs
- Resolving intermittent issues
Debugging Process
Follow this systematic approach:
1. Understand the Problem
- What is the expected behavior?
- What is the actual behavior?
- Can you reproduce it consistently?
- When did it start happening?
- What changed recently?
2. Gather Information
- Error messages and stack traces
- Log files and error logs
- Environment details (OS, versions, config)
- Input data that triggers the issue
- System state before/during/after
3. Form Hypotheses
- What are the most likely causes?
- List hypotheses from most to least probable
- Consider: logic errors, data issues, environment, timing, dependencies
4. Test Hypotheses
- Use binary search to narrow down location
- Add logging/print statements strategically
- Use debugger breakpoints
- Isolate components
- Test with minimal reproduction case
5. Identify Root Cause
- Don't stop at symptoms - find the real cause
- Verify with evidence
- Understand why it wasn't caught earlier
6. Fix and Verify
- Implement fix
- Test the fix thoroughly
- Ensure no regressions
- Add tests to prevent recurrence
Debugging Strategies
Binary Search
1. Identify code region (start → end)
2. Check middle point
3. If bug present → search left half
4. If bug absent → search right half
5. Repeat until isolated
Rubber Duck Debugging
- Explain the code line by line
- Often reveals the issue through verbalization
- Clarifies assumptions
Add Strategic Logging
# At function entry
print(f"[DEBUG] function_name called with: {args}")
# At decision points
print(f"[DEBUG] Condition X is {condition_result}")
# Before/after state changes
print(f"[DEBUG] Before: {state}, After: {new_state}")
Bisect Method (for regressions)
# Find which commit introduced the bug
git bisect start
git bisect bad HEAD
git bisect good <last-known-good-commit>
# Test each revision until found
Common Bug Patterns
Off-by-One Errors
- Loop indices (
i < nvsi <= n) - Array bounds (
arr[len(arr)]instead ofarr[len(arr)-1])
Null/Undefined References
- Check variables before use
- Verify API responses have expected fields
Race Conditions
- Async operations completing in unexpected order
- Shared state without proper locking
Type Mismatches
- String vs number comparisons
- Implicit type coercion issues
Stale State
- Cached values not updated
- Closure capturing old variables
Output Format
Structure debugging analysis as:
## Problem Statement
[Clear description of the issue]
## Environment
- [Relevant version/config info]
## Error Analysis
[Error message/stack trace analysis]
## Hypotheses (Priority Order)
1. **[Most Likely]**: [Reasoning]
2. **[Second Most Likely]**: [Reasoning]
3. **[Less Likely]**: [Reasoning]
## Investigation Steps
1. [What to check first]
2. [How to verify hypothesis]
3. [Next steps based on results]
## Root Cause
[Once identified, explain the underlying issue]
## Fix
[Specific code changes needed]
## Prevention
[How to avoid this in the future]
Example
User Report: "My API returns 500 errors randomly"
Debugging Response:
Problem Statement
API endpoint returns HTTP 500 errors intermittently. Not all requests fail - some succeed.
Environment
- Node.js version?
- Database type?
- Request rate/concurrency?
Error Analysis
Need to see:
- Full error stack trace
- Server logs around failure time
- Example request that fails
Hypotheses (Priority Order)
-
Database Connection Pool Exhausted: Intermittent nature suggests resource contention
- Check if failures correlate with high traffic
- Verify connection pool size vs concurrent requests
-
Async Operation Not Awaited: Race condition in code
- Review async/await usage
- Check for missing await keywords
-
Unhandled Promise Rejection: Some error paths not caught
- Search for promises without .catch() or try/catch
Investigation Steps
-
Add Detailed Logging
app.post('/api/endpoint', async (req, res) => { console.log('[DEBUG] Request received:', req.body); try { const result = await someOperation(); console.log('[DEBUG] Operation succeeded'); res.json(result); } catch (error) { console.error('[ERROR] Operation failed:', error.stack); res.status(500).json({ error: error.message }); } }); -
Monitor Connection Pool
db.on('acquire', () => { console.log(`[POOL] Connection acquired (${db.pool.size}/${db.pool.max})`); }); -
Check for Unhandled Rejections
process.on('unhandledRejection', (reason, promise) => { console.error('[FATAL] Unhandled Promise Rejection:', reason); });
Next Steps
Deploy logging changes and monitor for patterns in:
- Time of day
- Specific user data
- Server resource usage (CPU, memory, connections)
More by Shubhamsaboo
View all skills by Shubhamsaboo →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversCoroot offers a robust data observability platform with Prometheus process monitoring, software network monitoring, and
AI-driven control of live Chrome via Chrome DevTools: browser automation, debugging, performance analysis and network mo
Use Chrome DevTools for web site test speed, debugging, and performance analysis. The essential chrome developer tools f
Easily debug Node.js with real-time breakpoints and variable inspection directly in your conversation using Node.js Debu
Ultra (Multi-AI Provider) unifies OpenAI, Gemini, and Azure models, tracking usage, estimating costs, and offering 9 dev
Frida enables dynamic instrumentation and debugging for mobile and desktop apps, offering advanced process management an
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.