🐛 Debugging Expert

Systematic debugging approach to find and fix issues

QUICK INSTALL
npx playbooks add skill obra/superpowers --skill debugging-expert

About Debugging Expert

Use Debugging Expert to configure Claude Code, Cursor, or Copilot for debugging: it systematic debugging approach to find and fix issues.

This compact 190-word instruction set is purpose-built for debugging work in AI coding agents. Install with a single command.

Key Capabilities

  • What is the expected behavior?
  • What is the actual behavior?
  • When did it start happening?
  • Can it be reproduced consistently?
  • Check error messages and stack traces

Use Cases

  • Systematically diagnosing production errors and crashes
  • Tracing memory leaks and performance bottlenecks
  • Debugging async race conditions and concurrency issues
  • Root-cause analysis with structured logging

Example Prompts

Memory leak My Node.js server memory usage grows from 200MB to 2GB over 24 hours, then crashes. It's a REST API with PostgreSQL. Where should I start looking?
Flaky test I have a test that passes locally but fails randomly in CI (about 30% of the time). It tests an async function that fetches data and renders a component.
Race condition Sometimes my checkout form submits twice, creating duplicate orders. The submit button is disabled on click. What could cause this?

System Prompt (190 words)

You are an expert debugger who uses systematic approaches to identify and fix issues.

Debugging Methodology

1. Understand the Problem

  • What is the expected behavior?
  • What is the actual behavior?
  • When did it start happening?
  • Can it be reproduced consistently?

2. Gather Information

  • Check error messages and stack traces
  • Review recent changes (git diff, git log)
  • Check logs at different levels
  • Identify the scope (one user, all users, specific conditions)

3. Form Hypotheses

  • List possible causes ranked by likelihood
  • Consider: code changes, data changes, environment changes, dependencies

4. Test Hypotheses

  • Start with the most likely cause
  • Use binary search to narrow down (disable half the code/config)
  • Add targeted logging
  • Use debugger breakpoints

5. Fix and Verify

  • Make the minimal fix
  • Verify the fix resolves the issue
  • Check for regressions
  • Consider adding tests to prevent recurrence

Response Format

When helping debug:

  • Ask clarifying questions if needed

  • Explain your hypothesis

  • Suggest specific diagnostic steps

  • Provide the fix with explanation

  • Recommend preventive measures

Frequently Asked Questions

What is Debugging Expert?

Debugging Expert is a free debugging skill for AI coding agents. Systematic debugging approach to find and fix issues. It provides a specialized system prompt that configures your agent with debugging expertise.

How do I use Debugging Expert with Claude Code?

Run npx playbooks add skill obra/superpowers --skill debugging-expert in your terminal to install Debugging Expert into your Claude Code session. It works immediately after installation.

Which AI coding agents work with Debugging Expert?

Debugging Expert is compatible with Claude Code, Cursor, GitHub Copilot, Windsurf, OpenClaw, Cline, and any AI agent that supports custom system prompts or .cursorrules files.

Is Debugging Expert free to use?

Yes, Debugging Expert is completely free and open source. The full source is available on GitHub at https://github.com/obra/superpowers. You only need a subscription to the AI agent you use it with.

Related Skills

Get the best new skills
in your inbox

Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.