Skip to content
Back to skills

Debug

ASecurity

Find and fix a bug at its root cause. Use for a failing test, a crash, an error, wrong output, a regression or flaky behaviour; before changing code to make a symptom go away.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentsgotestinggit

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add andeeplus/aplus --skill debug --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Debug?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Debug
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andeeplus-debug/badge)](https://www.skillsdirectory.com/skills/andeeplus-debug)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: debug
description: Find and fix a bug at its root cause. Use for a failing test, a crash, an error, wrong output, a regression or flaky behaviour; before changing code to make a symptom go away.
---

# Debug

No fix before the cause is proven.

## Rules

- **Redact secrets** before pasting any output.
- **Investigate uncertainty.** Test the next hypothesis when the evidence supports it. After three failed fixes, reassess the cause and design; ask when progress needs information or a decision you cannot establish yourself.

## Flow

1. **Read the whole error,** stack trace included, before touching code.
2. **Build a loop that goes red:** one fast, deterministic command that shows the user's exact symptom, on the surface where it happens. Run it once. A pass on another surface proves nothing. If you cannot build one, say what you tried and ask.
3. **Shrink it** while preserving the symptom. For a regression with an unknown introducing commit, use `git bisect run` when the loop can distinguish good and bad revisions.
4. **Hypothesise.** Rank plausible causes from the evidence, each falsifiable: "if X is the cause, changing Y removes the bug". Test the strongest one first, changing one thing at a time.
5. **Prove it by running code.** Add boundary logs when needed, tagged `[DEBUG-<id>]` for cleanup. Check the observation when results surprise you. If a restart removes the symptom, investigate the state and timing it resets; the cause remains unproven.
6. **Fix where it starts,** tracing the bad value to its source. Search for related instances, verify that they share the cause, fix those inside the task's scope, and report the rest. Choose the smallest durable fix using [code-quality's design rules](../code-quality/SKILL.md#dry-and-etc). Enforce the contract at the responsible boundary; synchronize races on the actual condition.
7. **Regression test first** ([testing](../testing/SKILL.md)), from the bug's [scenario](../gherkin/SKILL.md#a-bugs-scenario) when it has one. Revert the fix and see it fail, restore it and see it pass. If no clean seam exists, that is the finding.
8. **Verify:** re-run the original loop, the debug-tag grep comes back empty, and the commit or PR states the proven cause.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.