debugging

mandersogit's avatarfrom mandersogit

Systematic approach to debugging Python code - use when user encounters errors or unexpected behavior

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 9, 2025

When & Why to Use This Skill

This Claude skill provides a systematic and rigorous framework for debugging Python applications. It streamlines the error-resolution process by guiding users through reproduction, information gathering, hypothesis testing, and verification. By utilizing integrated tools like bash and grep, it helps developers quickly isolate root causes, resolve unexpected behaviors, and ensure code stability across various execution environments.

Use Cases

  • Error Resolution: Efficiently diagnosing and fixing Python runtime exceptions and complex stack traces.
  • Logic Correction: Investigating and rectifying instances where code produces incorrect or unexpected outputs despite running without crashes.
  • Test Failure Analysis: Identifying the underlying causes of failing unit tests or integration tests to maintain CI/CD health.
  • Performance Optimization: Systematically investigating performance bottlenecks and resource leaks to improve application efficiency.
  • Regression Verification: Ensuring that new code fixes are properly validated and do not introduce secondary issues into the codebase.
namedebugging
descriptionSystematic approach to debugging Python code - use when user encounters errors or unexpected behavior
licenseMIT
difficultyintermediate
languagepython

Debugging Skill

[TEST-PLUGIN-SKILL: debugging]

When to Use This Skill

Use this skill when:

  • User reports an error or exception
  • Code produces unexpected output
  • Tests are failing
  • Performance issues need investigation

Systematic Debugging Process

  1. Reproduce the Issue

    • Get exact error message
    • Identify minimal reproduction steps
  2. Gather Information

    • Check stack trace
    • Review recent changes
    • Check logs
  3. Form Hypothesis

    • What could cause this behavior?
    • What assumptions might be wrong?
  4. Test Hypothesis

    • Add logging/print statements
    • Use debugger breakpoints
    • Write minimal test case
  5. Fix and Verify

    • Make minimal change
    • Run tests
    • Confirm fix doesn't break other things