/debug

> Systematic bug investigation: reproduce, isolate, hypothesize, fix, verify, prevent.

170 stars

Best use case

/debug is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

> Systematic bug investigation: reproduce, isolate, hypothesize, fix, verify, prevent.

Teams using /debug should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/debug/SKILL.md --create-dirs "https://raw.githubusercontent.com/Miosa-osa/canopy/main/library/skills/development/debug/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/debug/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How /debug Compares

Feature / Agent/debugStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

> Systematic bug investigation: reproduce, isolate, hypothesize, fix, verify, prevent.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# /debug

> Systematic bug investigation: reproduce, isolate, hypothesize, fix, verify, prevent.

## Usage
```
/debug "<description>" [--bisect] [--trace]
```

## What It Does
Follows a systematic debugging protocol to find and fix bugs. Generates hypotheses ranked by likelihood, tests them methodically, implements a minimal fix, and adds a regression test.

## Implementation
1. **REPRODUCE** -- create consistent reproduction steps from the description.
2. **ISOLATE** -- narrow to the smallest reproduction case. Check recent changes with `git log`.
3. **HYPOTHESIZE** -- form 2-3 specific, testable theories ranked by likelihood.
4. **TEST** -- validate hypotheses systematically, starting with most likely.
5. **FIX** -- implement minimal, targeted fix addressing root cause.
6. **VERIFY** -- confirm fix resolves the issue without regressions.
7. **PREVENT** -- add regression test to prevent recurrence.

If `--bisect`: use `git bisect` to find the commit that introduced the bug.
If `--trace`: add detailed logging to trace execution path.

## Examples
```bash
# Debug a specific issue
/debug "API returns 500 intermittently on /users endpoint"

# Use git bisect to find when bug was introduced
/debug "Search results are empty" --bisect

# Add tracing to understand execution flow
/debug "Session expires too early" --trace
```