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".

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/awesome_agent_skills/debugger

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentação

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 < n vs i <= n)
  • Array bounds (arr[len(arr)] instead of arr[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:

  1. Full error stack trace
  2. Server logs around failure time
  3. Example request that fails

Hypotheses (Priority Order)

  1. Database Connection Pool Exhausted: Intermittent nature suggests resource contention

    • Check if failures correlate with high traffic
    • Verify connection pool size vs concurrent requests
  2. Async Operation Not Awaited: Race condition in code

    • Review async/await usage
    • Check for missing await keywords
  3. Unhandled Promise Rejection: Some error paths not caught

    • Search for promises without .catch() or try/catch

Investigation Steps

  1. 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 });
      }
    });
    
  2. Monitor Connection Pool

    db.on('acquire', () => {
      console.log(`[POOL] Connection acquired (${db.pool.size}/${db.pool.max})`);
    });
    
  3. 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)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

academic-researcher

Academic research assistant for literature reviews, paper analysis, and scholarly writing. Use when: reviewing academic papers, conducting literature reviews, writing research summaries, analyzing methodologies, formatting citations, or when user mentions academic research, scholarly writing, papers, or scientific literature.

chatgpt-app-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build ChatGPT apps with interactive widgets using mcp-use and OpenAI Apps SDK. Use when creating ChatGPT apps, building MCP servers with widgets, defining React widgets, working with Apps SDK, or when user mentions ChatGPT widgets, mcp-use widgets, or Apps SDK development.

code-reviewer

Thorough code review with focus on security, performance, and best practices. Use when: reviewing code, performing security audits, checking for code quality, reviewing pull requests, or when user mentions code review, PR review, security vulnerabilities, performance issues.

content-creator

Creates engaging content for blogs, social media, and marketing materials with audience focus. Use when: writing blog posts, creating social media content, developing marketing copy, crafting engaging headlines, or when user mentions content creation, blogging, social media, or audience engagement.

content-writer

Writes marketing copy for landing pages, emails, and social media posts. Use when creating promotional content, sales copy, or brand messaging.

data-analyst

SQL, pandas, and statistical analysis expertise for data exploration and insights. Use when: analyzing data, writing SQL queries, using pandas, performing statistical analysis, or when user mentions data analysis, SQL, pandas, statistics, or needs help exploring datasets.

decision-helper

Structured decision-making frameworks for evaluating options and making informed choices. Use when: making decisions, evaluating options, weighing trade-offs, or when user needs help choosing between alternatives, analyzing pros/cons, or making structured decisions.

deep-research

Comprehensive research assistant that synthesizes information from multiple sources with citations. Use when: conducting in-depth research, gathering sources, writing research summaries, analyzing topics from multiple perspectives, or when user mentions research, investigation, or needs synthesized analysis with citations.

editor

Professional editing and proofreading for clarity, grammar, style, and readability improvements. Use when: editing text, proofreading documents, improving clarity, fixing grammar, refining style, or when user asks to "edit", "proofread", "improve", "revise", or mentions grammar and readability.

email-drafter

Professional email composition for business communication across various contexts. Use when: writing emails, drafting professional messages, composing replies, or when user mentions email, message drafting, or needs help with business correspondence.

fact-checker

Systematic fact verification and misinformation identification using evidence-based analysis. Use when: verifying claims, checking facts, identifying misinformation, evaluating source credibility, or when user asks to "fact check", "verify", "is this true", or mentions claims that need validation.

fullstack-developer

Modern web development expertise covering React, Node.js, databases, and full-stack architecture. Use when: building web applications, developing APIs, creating frontends, setting up databases, deploying web apps, or when user mentions React, Next.js, Express, REST API, GraphQL, MongoDB, PostgreSQL, or full-stack development.

mcp-apps-builder

**MANDATORY for ALL MCP server work** - mcp-use framework best practices and patterns. **READ THIS FIRST** before any MCP server work, including: - Creating new MCP servers - Modifying existing MCP servers (adding/updating tools, resources, prompts, widgets) - Debugging MCP server issues or errors - Reviewing MCP server code for quality, security, or performance - Answering questions about MCP development or mcp-use patterns - Making ANY changes to server.tool(), server.resource(), server.prompt(), or widgets This skill contains critical architecture decisions, security patterns, and common pitfalls. Always consult the relevant reference files BEFORE implementing MCP features.

mcp-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build Model Context Protocol (MCP) servers with mcp-use framework. Use when creating MCP servers, defining tools/resources/prompts, working with mcp-use, bootstrapping MCP projects, or when user mentions MCP development, tools, resources, or prompts.

meeting-notes

Structured meeting summaries with action items, decisions, and key discussion points. Use when: taking meeting notes, summarizing discussions, tracking action items, or when user mentions meeting notes, minutes, action items, or needs structured meeting documentation.

project-planner

Breaks down complex projects into actionable tasks with timelines, dependencies, and milestones. Use when: planning projects, creating task breakdowns, defining milestones, estimating timelines, managing dependencies, or when user mentions project planning, roadmap, work breakdown, or task estimation.

python-expert

Senior Python developer expertise for writing clean, efficient, and well-documented code. Use when: writing Python code, optimizing Python scripts, reviewing Python code for best practices, debugging Python issues, implementing type hints, or when user mentions Python, PEP 8, or needs help with Python data structures and algorithms.

sprint-planner

Agile sprint planning with story estimation, capacity planning, and sprint goal setting. Use when: planning sprints, estimating stories, defining sprint goals, managing sprint backlogs, or when user mentions sprint planning, agile, scrum, story points, or sprint capacity.

strategy-advisor

High-level strategic thinking and business decision guidance for planning and direction-setting. Use when: making strategic decisions, evaluating business options, setting direction, analyzing trade-offs, or when user mentions strategy, business planning, competitive analysis, or long-term planning.

technical-writer

Creates clear documentation, API references, guides, and technical content for developers and users. Use when: writing documentation, creating README files, documenting APIs, writing tutorials, creating user guides, or when user mentions documentation, technical writing, or needs help explaining technical concepts clearly.

Habilidades Relacionadas