Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot official · Anthropic

debug — Claude Code skill: what it does, how to install

This skill takes a bug from reproduction to root cause, a fix, and regression coverage. Use it when the symptom is clear but the cause is not.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add anthropics/knowledge-work-plugins --skill debug -a claude-code
Open on GitHub

What debug does

The skill runs a structured debugging session. It compares expected and actual behavior, identifies exact reproduction steps, and defines the scope of the issue. It then narrows the search to a component, service, or code path while checking recent deploys, configuration changes, dependencies, logs, and error messages.

Next, the agent forms and tests hypotheses, traces the code path, and separates the root cause from its symptoms. The result covers the reproduction, cause, proposed fix, side effects, edge cases, and tests that can prevent a regression. The report is organized around reproduction, root cause, fix, and prevention.

When monitoring, source control, or project tracker connectors are available, the skill can use them for logs, metrics, recent changes, related issues, and follow-up tickets. For a post-deploy failure, check access to monitoring and source control first.

What it helps with

  • reproduce a failure from an error message or stack trace
  • compare expected behavior with the observed result
  • narrow a bug to the responsible code path
  • check recent deploys, configuration changes, or dependencies
  • propose a fix and regression test

Example prompts for the agent

  • `/debug Users see an error after the deploy. Here is the stack trace; find the root cause`
  • `/debug It works in staging but fails in prod. Compare the behavior and inspect recent changes`
  • `/debug A dependency update broke handling for large payloads. Reproduce the issue and propose a regression test`

How to install debug

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/debug/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/debug/

From the same set89

The whole set →
data-visualization official anthropics Selects chart types based on data structure and produces Python visualization code in matplotlib, seaborn, and plotly. Useful for reports and research figures. Claude Code CX Codex Cursor +1 13,700installs documentation official anthropics A skill for technical writing that drafts READMEs, API references, runbooks, architecture docs and onboarding guides. Useful when the code exists but the description does not. Claude Code CX Codex Cursor +1 10,300installs build-dashboard official anthropics Builds a self-contained HTML dashboard with Chart.js charts, KPI cards, and filterable tables. Useful for turning raw data or queries into a standalone browser report. Claude Code CX Codex Cursor +1 9,100installs memory-management official anthropics This skill organizes workplace shorthand, names, and project details into files an agent can consult. It fits projects where requests rely on an internal vocabulary and shared context. Claude Code CX Codex Cursor +1 7,400installs task-management official anthropics Tracks commitments, active work, and follow-ups in a local TASKS.md file. Useful when managing project to-dos directly from the AI coding chat. Claude Code CX Codex Cursor +1 7,200installs architecture official anthropics Writes an Architecture Decision Record or reviews a system design: options, trade-offs, consequences. Useful when you have to pick between technologies. Claude Code CX Codex Cursor +1 6,700installs knowledge-synthesis official anthropics Merges search results across chats, emails, and documents into deduplicated answers with source attribution. Flags conflicting facts and scores source reliability. Claude Code CX Codex Cursor +1 6,400installs testing-strategy official anthropics This skill designs testing strategies and test plans for a project. Use it when you need test types, coverage goals, or gaps in existing checks. Claude Code CX Codex Cursor +1 6,400installs

Similar

postgresql-table-design Seth Hobson Helps design and review PostgreSQL schemas with guidance on data types, keys, constraints, indexes, and table partitioning. Claude Code CX Codex Cursor 27,780installs winui-app official openai This skill helps create, configure, and review WinUI 3 apps built with C# and the Windows App SDK. Use it for new projects or XAML issues. Claude Code CX Codex Cursor +1 3,200installs typescript-expert sickn33 A skill for TypeScript and JavaScript work: it reads your project setup, fixes type errors and speeds up type checking. Useful once a TS codebase gets big. Claude Code CX Codex Cursor +1 12,600installs openspec-verify-change openspec Verifies that code implementations match OpenSpec specs, tasks, and design documents before archiving. Useful for validation before finalizing changes. Claude Code CX Codex Cursor +1 3,500installs standup thedotmack A skill that runs a facilitated conversation between agents from different git branches and PRs. Each branch is its own voice, discusses its changes, finds overlaps, and agrees on merge order — all read-only, no real commits. Claude Code CX Codex Cursor +1 3,400installs refactor-method-complexity-reduce official github Refactors a chosen method by moving complex logic into helpers. Use it when nested conditions or branching make a method hard to follow. GitHub Copilot 9,992installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. Claude Code 1,163,035installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. Claude Code 1,141,062installs

Questions about debug

What does the debug skill do?

It guides a structured debugging session: reproduce the issue, isolate the affected code path, test hypotheses, identify the root cause, and prepare a fix with regression coverage.

What information helps debug investigate an issue?

Useful context includes the exact error message or stack trace, reproduction steps, recent changes, logs, screenshots, and expected behavior. Available monitoring, source control, and project tracker connectors add more checks.

Source text

SKILL.md · Apache-2.0
---
name: debug
description: 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.
argument-hint: "<error message or problem description>"
---

# /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.

© anthropics · Apache-2.0 · anthropics/knowledge-work-plugins

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor