debug
Debug issues through structured investigation, failing test creation, and targeted fixes.
Skill by broneq
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/broneq-debug
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/debug
Tools it pre-approves 3
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
AskUserQuestionBash(python3${CLAUDE_PLUGIN_ROOT}/scripts/*)
What's inside
- Skill name
debug- Description
- Debug issues through structured investigation, failing test creation, and targeted fixes. Use when the user provides an error message, traceback, steps-to-reproduce, or describes unexpected behavior.
- License
- MIT
- Allowed tools
- AskUserQuestion, Bash(python3, ${CLAUDE_PLUGIN_ROOT}/scripts/*)
- Instructions
- 198 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (1)
- SKILL.md
SKILL.md (first lines)
# Debug
> Relies on BDK foundation (STARTUP_INSTRUCTIONS.md) for project context.
Diagnose bugs via structured investigation, reproduce with failing tests, then fix or plan.
**Announce at start:** "Using debug to investigate the issue."
**Core principle**: Understand first → test second → confirm with user → fix third.
**Run the phases strictly in order. Announce each one as you enter it** (`[debug] Phase 2: Investigate`), and do not enter the next phase until the current one is fully done:
- Phase 1: Parse Input
- Phase 2: Investigate
- Phase 3: Write Failing Tests
- Phase 4: Propose & Wait for User Decision ← **HARD STOP**
Phase 4 is a hard stop: you present the proposal, then end your turn. Do not begin Phase 5, do not start editing, and do not decide the path yourself — no matter how obvious the fix looks. Only an actual user reply releases the stop; a background task completing, a hook firing, or your own reasoning does not.
**After the user responds**: announce Phase 5 as the path they chose — "Fix Inline" or "Hand off to /bdk:create-plan" — then proceed.
---
## Decision Flow
```dot
digraph debug_flow {
rankdir=TB
node [shape=box, style="rounded,filled", fillcolor="#f0f0f0"]
start [label="Phase 1\nParse Input", fillcolor="#d4edda"]
investigate [label="Phase 2\nInvestigate"]
tests [label="Phase 3\nWrite Failing Tests"]
decide [label="Phase 4\nPropose & ASK USER\n(HARD STOP)", fillcolor="#fff3cd", shape=octagon]
fix [label="Phase 5a\nFix Inline + Verify"]
plan [label="Phase 5b\nHand off to /bdk:create-plan"]
done [label="Done", fillcolor="#d4edda", shape=doublecircle]
start -> investigate
investigate -> tests
tests -> decide
decide -> fix [label="user: 'Fix now'"]
decide -> plan [label="user: 'Create plan'"]
decide -> investigate [label="user: 'Something else'"]
fix -> done
plan -> done
}
```
---
## The 5-Phase Workflow
### Phase 1: Parse Input
1. **Validate input**: If empty or vague, ask inline for details, then **stop**
2. **Extract key signals**: error type, failing component, steps to reproduce, expected vs actual
3. **Print summary**:
```
[debug] Issue: {one-line summary}
[debug] Signals: error={exception class or "none"}, component={file/class or "unknown"}
```
**GATE**: Must have enough signal to start investigation.
---
### Phase 2: Investigate
1. **Find entry point** — locate the error component or symbol
2. **Trace callers** — trace up the call chain
3. **Trace callees** — trace down to dependencies
4. **Identify impacted paths** — named execution paths through the suspected area
5. **Flag cascading risk** — highest-risk choke points in the affected module
6. **Identify root cause**
7. **Quantify blast radius** — understand scope before proposing fix: find every reference to the symbols you will change, in source and in tests
8. **Scan for related test gaps** — same class of problem in nearby code only
9. **Print investigation summary**:
```
[debug] Root cause: {one sentence}
[debug] Affected: {file path}:{line range}
[debug] Test gaps found: {N}
```
**GATE**: Must identify root cause before Phase 3.
---
### Phase 3: Write Failing Tests
Write tests that precisely reproduce bug. Tests RED until fix applied.
**Rules:**
- Each test concrete: specific input values, specific expected outcome
- Follow project test conventions (check existing tests for patterns)
- Place tests in correct existing test file
Inject test command: !`python3 ${CLAUDE_PLUGIN_ROOT}/scripts/get_settings.py test-tools`
Confirm the new tests are RED by running the matching tier's `scoped` form on the test file(s) you just wrote, **directly via `Bash`** — substitute `{files}` with those paths. No agent spawn: one test file's output is a few lines, and the spawn costs more wall-clock than the run. Never the `full` form of any tier, and never an e2e tier unless the tests you wrote *are* e2e specs.
```
[debug] Failing tests confirmed: {N} red
```
**GATE**: All new tests must be RED before proceeding.
---
### Phase 4: Propose Solution & Ask User (HARD STOP)
**Mandatory checkpoint. STOP and wait for user decision.**
**Step 1**: Describe proposed solution (what changes, why it fixes root cause, risks)
**Step 2**: Assess complexity:
- **LOW** (inline fix): isolated change affecting one function/call site
- **HIGH** (route to /bdk:create-plan): affects many call sites, introduces new abstractions, changes shared data modelsFrom broneq/bdk, MIT.
More from broneq/bdk
- 0.592score
explain-complex-code
broneq
Generate comprehensive architecture documentation for complex code modules with Mermaid diagrams and examples.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
design
broneq
Design partner for any feature.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
pr-review
broneq
Review GitHub PRs from URLs - templated inline comments, summary, and a verdict you confirm/override before it posts via gh.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
mermaid-drawer
broneq
BDK's shared Mermaid standard - diagram type selection, node budget, and a palette verified legible in light and dark themes.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
cr
broneq
Run code review with dynamic agent scaling (3-13 agents based on change size).
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
create-adr
broneq
Create Architecture Decision Records (ADRs) based on MADR template.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
agent-lint
broneq
Lint a BDK agent file for best practices and portability.
SkillAFreshness: A★ 1Claude Code +9 - 0.586score
create-plan
broneq
Create comprehensive implementation plan with exploration and trade-off analysis
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
add-rule
broneq
Capture one lesson or convention as a properly-homed rule — routed to .claude/rules/, a doc comment, or a test signpost; dedupes and respects budgets.
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
bdk-lint-tools
broneq
Project-configured lint/format/typecheck commands from .bdk/settings.json.
SkillAFreshness: A★ 1Claude Code +9 - 0.583score
skill-lint
broneq
Lint a BDK skill or agent file for best practices and portability.
SkillAFreshness: A★ 1Claude Code +9 - 0.581score
bdk-test-tools
broneq
Project-configured test commands from .bdk/settings.json.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 6
- Last commit (this folder)
- Sep 25, 2026 (1 month ago)
- Last release
- Sep 25, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/broneq/bdk
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from broneq
- 0.592score
explain-complex-code
broneq
Generate comprehensive architecture documentation for complex code modules with Mermaid diagrams and examples.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
design
broneq
Design partner for any feature.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
cr
broneq
Run code review with dynamic agent scaling (3-13 agents based on change size).
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
mermaid-drawer
broneq
BDK's shared Mermaid standard - diagram type selection, node budget, and a palette verified legible in light and dark themes.
SkillAFreshness: A★ 1Claude Code +9 - 0.589score
pr-review
broneq
Review GitHub PRs from URLs - templated inline comments, summary, and a verdict you confirm/override before it posts via gh.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
agent-lint
broneq
Lint a BDK agent file for best practices and portability.
SkillAFreshness: A★ 1Claude Code +9
Cite this page
debug skill. Agent Mart. https://agentmart.dev/skills/broneq-debug (last updated 2026-10-24)