New to Claude Skills? Learn how to install them →

anthropics on GitHub

Debug

OfficialFree

Systematic debugging for effective issue resolution.

Get this skill

Free · Opens the source repo

What Debug does

The Debug skill provides a structured approach to diagnosing and fixing software issues. It guides users through a four-step process: reproduce, isolate, diagnose, and fix. This systematic method ensures that developers and designers can effectively identify the root cause of bugs and propose appropriate solutions. By triggering the skill with relevant error messages or descriptions of unexpected behavior, users can streamline their debugging process and reduce the time spent on troubleshooting.

The first step, reproduce, focuses on understanding the discrepancy between expected and actual behavior. Users are prompted to detail the reproduction steps and the scope of the issue, which helps in pinpointing when and how the problem arose. The second step, isolate, involves narrowing down the potential sources of the issue by reviewing recent changes, logs, and error messages. This helps to identify the component or code path that may be causing the problem.

In the diagnosis phase, users are encouraged to form hypotheses and trace the code path to uncover the root cause, rather than merely addressing symptoms. Finally, the fix step involves proposing a solution, considering potential side effects, and suggesting tests to prevent future regressions. This comprehensive approach not only aids in resolving current issues but also contributes to a more robust development process.

Debug is particularly useful for developers and designers who encounter complex issues in their code or application behavior. It is designed for situations where the cause of a problem is not immediately obvious, making it an essential tool for maintaining software quality and reliability.

When to use it

Use this skill when dealing with unclear bugs or unexpected behavior, particularly when error messages or stack traces are available.

When not to use it

This skill may not be suitable for straightforward issues that can be quickly resolved without a structured approach.

What you can build with it

Unclear Error Messages

When encountering an error message that is not straightforward, use Debug to systematically analyze and resolve the issue.

Post-Deployment Issues

If something breaks after a deployment, Debug can help isolate the changes and identify the root cause.

Behavior Divergence

When behavior diverges between environments, such as staging and production, Debug can assist in diagnosing the differences.

How to install Debug

View source

1. Install with the skills CLI

npx skills add anthropics/knowledge-work-plugins/debug --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by anthropics

/debug

If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md.

Run a structured debugging session to find and fix issues systematically.

Usage

/debug $ARGUMENTS

How It Works

┌─────────────────────────────────────────────────────────────────┐
│                       DEBUG                                        │
├─────────────────────────────────────────────────────────────────┤
│  Step 1: REPRODUCE                                                │
│  ✓ Understand the expected vs. actual behavior                   │
│  ✓ Identify exact reproduction steps                             │
│  ✓ Determine scope (when did it start? who is affected?)        │
│                                                                    │
│  Step 2: ISOLATE                                                   │
│  ✓ Narrow down the component, service, or code path             │
│  ✓ Check recent changes (deploys, config changes, dependencies) │
│  ✓ Review logs and error messages                                │
│                                                                    │
│  Step 3: DIAGNOSE                                                  │
│  ✓ Form hypotheses and test them                                 │
│  ✓ Trace the code path                                           │
│  ✓ Identify root cause (not just symptoms)                      │
│                                                                    │
│  Step 4: FIX                                                       │
│  ✓ Propose a fix with explanation                                │
│  ✓ Consider side effects and edge cases                          │
│  ✓ Suggest tests to prevent regression                           │
└─────────────────────────────────────────────────────────────────┘

What I Need From You

Tell me about the problem. Any of these help:

  • Error message or stack trace
  • Steps to reproduce
  • What changed recently
  • Logs or screenshots
  • Expected vs. actual behavior

Output

## Debug Report: [Issue Summary]

### Reproduction
- **Expected**: [What should happen]
- **Actual**: [What happens instead]
- **Steps**: [How to reproduce]

### Root Cause
[Explanation of why the bug occurs]

### Fix
[Code changes or configuration fixes needed]

### Prevention
- [Test to add]
- [Guard to put in place]

If Connectors Available

If ~~monitoring is connected:

  • Pull logs, error rates, and metrics around the time of the issue
  • Show recent deploys and config changes that may correlate

If ~~source control is connected:

  • Identify recent commits and PRs that touched affected code paths
  • Check if the issue correlates with a specific change

If ~~project tracker is connected:

  • Search for related bug reports or known issues
  • Create a ticket for the fix once identified

Tips

  1. Share error messages exactly — Don't paraphrase. The exact text matters.
  2. Mention what changed — Recent deploys, dependency updates, and config changes are top suspects.
  3. Include context — "This works in staging but not prod" or "Only affects large payloads" narrows things fast.

Frequently asked questions about Debug

Similar skills