skill

Debug

Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.

Anthropic4.80+ installsVetted

About

# /debug

> If you see unfamiliar placeholders or need to check which tools are connected, see [CONNECTORS.md](../../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

```markdown ## 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.

Install

Run this command

git clone https://github.com/anthropics/knowledge-work-plugins && cp -r knowledge-work-plugins/engineering/skills/debug ~/.claude/skills/

Works with

claude appclaude codeclaude apicursorcodexwindsurfclinezed

Manual steps

Clone the repository and copy the `engineering/skills/debug` folder into your Claude skills directory. Compatible with Claude Code, Cursor, Codex, and any Agent Skills-compatible agent.

View source
License: Apache-2.0By Anthropic

Frequently asked questions

What is the Debug skill?

Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.

How do I install Debug?

Run this in your terminal:

git clone https://github.com/anthropics/knowledge-work-plugins && cp -r knowledge-work-plugins/engineering/skills/debug ~/.claude/skills/
Which AI tools does Debug work with?

It works with claude_app, claude_code, claude_api, cursor, codex, windsurf, cline, zed.

Who made Debug?

Anthropic, released under the Apache-2.0 license.

Is Debug free?

Yes, it is free to use under the Apache-2.0 license.

Related assets

More curated picks in Development & Code.

All Debug alternatives →
skillclaude_appclaude_codeclaude_api
npx skills add google/agents-cli
Google Agents Cli Adk Code
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent",…358,165+
skillclaude_appclaude_codeclaude_api
npx skills add google/agents-cli
Google Agents Cli Workflow
This skill should be used when the user wants to "develop an agent", "build an agent using ADK", "run the agent locally", "debug agent code", "test an…357,749+
skillclaude_appclaude_codeclaude_api
npx skills add google/agents-cli
Google Agents Cli Eval
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze…357,721+
skillclaude_appclaude_codeclaude_api
npx skills add google/agents-cli
Google Agents Cli Deploy
This skill should be used when the user wants to "deploy an agent", "deploy my ADK agent", "set up CI/CD", "configure secrets", "troubleshoot a deploy…357,661+
skillclaude_appclaude_codeclaude_api
npx skills add google/agents-cli
Google Agents Cli Publish
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini Enterprise", "publish to G…357,490+
skillclaude_appclaude_codeclaude_api
npx skills add prisma/skills
Prisma Cli
Prisma ORM CLI commands reference covering init, generate, migrate, db, dev, complete, studio, validate, format, debug, and mcp. Use for ORM/database…309,452+

Audit before you install

Run any source through our checks - AI visibility, security, performance, and stack detection.

More in Development & Code