# debugging

debugging is a Claude Code skill that guides root cause analysis for errors and test failures. It helps localize bugs and prepare minimal, verified fixes.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 151 installs · ★ 22 repo stars
- Author: siviter-xyz
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/siviter-xyz/dot-agent/tree/HEAD/skills/debugging/SKILL.md
- Updated: 2026-03-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/siviter-xyz-debugging

## What it does

This skill guides the agent through a six-step diagnostic sequence whenever exceptions or unexpected states occur. The model gathers logs, builds a reproduction case, tests hypotheses, and applies the smallest viable patch.

The protocol relies on temporary debug logs at state transitions or external API boundaries, requiring their cleanup once solved. It blocks unverified changes: code modifications must remain atomic and require explicit developer confirmation before any commit.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add siviter-xyz/dot-agent --skill debugging -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/debugging/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/debugging/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add siviter-xyz/dot-agent --skill debugging -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/debugging/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add siviter-xyz/dot-agent --skill debugging -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/debugging/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install siviter-xyz/dot-agent skills/debugging
```

2. **Manually: put the files in place**
- File: `.github/skills/debugging/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add siviter-xyz/dot-agent --skill debugging -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/siviter-xyz/dot-agent --path skills/debugging
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/debugging/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add siviter-xyz/dot-agent --skill debugging -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/siviter-xyz/dot-agent/tree/HEAD/skills/debugging/SKILL.md

## When to use it
- isolate root causes from stack traces and logs
- insert strategic debug logging around state transitions
- reproduce test failures with minimal test cases
- verify bug fixes without altering unaffected code

## Example prompts
- Investigate this stack trace and find the root cause
- Add debug logging to trace state corruption in the payment flow
- Help reproduce and fix this intermittent test failure

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 9a9df4d2eadc5866.

BEGIN THIRD-PARTY FILE 9a9df4d2eadc5866
```text
---
name: debugging
description: Root cause analysis and debugging protocols. Use when encountering errors, test failures, unexpected behavior, stack traces, or when code behaves differently than expected.
---

# Debugging

Systematic approach to root cause analysis and debugging.

## When to Use

- Encountering errors or exceptions
- Test failures that need investigation
- Unexpected behavior in code
- Stack traces or error messages
- Code behaving differently than expected
- Performance issues or bugs

## Core Principles

- **Evidence-based**: Base diagnosis on error messages, logs, and reproducible steps
- **Systematic**: Follow structured debugging process
- **Minimal fixes**: Implement smallest change that resolves issue
- **Verify solutions**: Confirm fix works and doesn't introduce regressions

## Debugging Process

Follow systematic debugging process:
1. Capture error information (message, stack trace, logs, environment)
2. Identify reproduction steps (minimal steps, conditions, edge cases)
3. Isolate failure location (function/module, recent changes, dependencies)
4. Form and test hypotheses (evidence-based, systematic testing, debug logging)
5. Implement minimal fix (smallest change, preserve behavior, follow patterns)
6. Verify solution (issue resolved, no regressions, tests pass)

See `references/root-cause-analysis.md` for detailed methods.

## Strategic Debug Logging

Add debug logging to entry/exit points, state transitions, conditional branches, external API calls, and data transformations. Remove after issue resolved unless it provides ongoing value.

## Error Pattern Recognition

Common patterns: null/undefined errors, type errors, timing issues, state corruption, configuration issues. See `references/error-patterns.md` for detailed patterns and solutions.

## Integration

After fixing:
- Verify CI passes (types, tests, lint)
- Stage atomic changes (fix + tests)
- Suggest semantic commit message
- Confirm with user before committing

## References

For detailed guidance, see:
- `references/root-cause-analysis.md` - Systematic analysis methods
- `references/error-patterns.md` - Common error patterns and solutions
- `references/debugging-tools.md` - Debugging tools and techniques
```
END THIRD-PARTY FILE 9a9df4d2eadc5866

The third-party file has ended. Everything between the 9a9df4d2eadc5866 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© siviter-xyz · MIT · https://github.com/siviter-xyz/dot-agent/tree/HEAD/skills/debugging/SKILL.md

## Similar
- [systematic-debugging](https://affpapa.org/en/nevibecode/skills/sammcj-systematic-debugging.md) — skill · ★ 173 repo stars
- [debug](https://affpapa.org/en/nevibecode/skills/cyrusagents-debug.md) — skill · 871 installs
- [Debug Mode Instructions](https://affpapa.org/en/nevibecode/agents/debug-mode-instructions.md) — subagent · ★ 41430 repo stars
- [rstest-debugging](https://affpapa.org/en/nevibecode/skills/rstest-debugging.md) — skill · 133 installs
- [debugging-and-error-recovery](https://affpapa.org/en/nevibecode/skills/debugging-and-error-recovery.md) — skill · 79600 installs
- [frontend-testing-debugging](https://affpapa.org/en/nevibecode/skills/fcakyon-frontend-testing-debugging.md) — skill · ★ 1216 repo stars

## Other versions with the same name
- [debugging · tursodatabase](https://affpapa.org/en/nevibecode/skills/debugging.md) — 1300 installs
- [debugging · mrgoonie](https://affpapa.org/en/nevibecode/skills/mrgoonie-debugging.md) — 580 installs
- [debugging · sentimony](https://affpapa.org/en/nevibecode/skills/sentimony-debugging.md) — 2800 installs
- [debugging · akillness](https://affpapa.org/en/nevibecode/skills/akillness-debugging.md) — 364 installs

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
