debug
Skill1 starsChanged 48 days agoMITView on GitHub
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.
192 other projects use a version of this.
Adopted by
Most recently taken up by
- PeanutGT/NutsSkillstheir own version, first seen Nov 8, 2026
- jskswamy/skillstheir own version, first seen Nov 8, 2026
- Firzus/agent-skillstheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
- microsoft/veronatheir own version, first seen Nov 8, 2026
Used with
Projects with it also use add-discord, add-slack and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkilladd-discord
Add Discord bot channel integration via Chat SDK.
Also in 11 projects that use this
MicrosoftSkilladd-slack
Add Slack channel integration via Chat SDK.
Also in 11 projects that use this
- +10 more from microsoft
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- anthropics/knowledge-work-plugins★ 35ksame name
- gavrielc/nanoclaw★ 31ksame name
- nanocoai/nanoclaw★ 31ksame name
- qwibitai/nanoclaw★ 31ksame name
- openai/symphony★ 27ksame name
- FalkorDB/FalkorDB★ 10ksame name
- NVIDIA/TensorRT-Model-Optimizer★ 5.6ksame name
- NVIDIA/Model-Optimizer★ 5.6ksame name
182 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository26 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-lintSkill
- skill-lintSkill
- add-ruleSkill
- bdk-implementer-return-contractSkill
- bdk-lint-toolsSkill
- bdk-rules-architectureSkill
- bdk-rules-code-qualitySkill
- bdk-rules-design-patternsSkill
- bdk-rules-languagesSkill
- bdk-rules-securitySkill
- bdk-test-toolsSkill
- commitSkill
- create-adrSkill
- create-planSkill
- crSkill
- designSkill
- explain-complex-codeSkill
- mermaid-drawerSkill
- pr-reviewSkill
- refine-rulesSkill
- setupSkill
- subagent-execute-planSkill
- test-driven-developmentSkill
- update-docsSkill
- verify-planSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 13 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 69
Validate input: If empty or vague, ask inline for details, then stop
- Distinctive: line 77
GATE: Must have enough signal to start investigation.
- Distinctive: line 98
GATE: Must identify root cause before Phase 3.
- Distinctive: line 104
Write tests that precisely reproduce bug.
- Distinctive: line 108
Follow project test conventions (check existing tests for patterns)
- Distinctive: line 109
Place tests in correct existing test file
- Distinctive: line 119
GATE: All new tests must be RED before proceeding.
- Very specific: line 133
Step 3: Ask user via AskUserQuestion:
- Distinctive: line 204
NEVER fix before writing failing test
- Distinctive: line 205
NEVER proceed past Phase 4 without user confirmation
- Distinctive: line 206
NEVER route to /bdk:create-plan without passing failing test paths
- Distinctive: line 207
NEVER scan entire codebase for gaps — only code already read
- Very specific: line 208
NEVER call any tool after AskUserQuestion in Phase 4 — turn ends there
- Distinctive: line 209
NEVER mark Phase 4 task complete before user responds
- Distinctive: line 210
NEVER start Phase 5 without first creating Phase 5 task and Phase 4 marked complete
“Common” is measured: kept by at least 6 in 10 of the 175 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
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
- Validate input: If empty or vague, ask inline for details, then stop
- Extract key signals: error type, failing component, steps to reproduce, expected vs actual
- 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
- Find entry point — locate the error component or symbol
- Trace callers — trace up the call chain
- Trace callees — trace down to dependencies
- Identify impacted paths — named execution paths through the suspected area
- Flag cascading risk — highest-risk choke points in the affected module
- Identify root cause
- Quantify blast radius — understand scope before proposing fix: find every reference to the symbols you will change, in source and in tests
- Scan for related test gaps — same class of problem in nearby code only
- 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} redGATE: 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 models
Step 3: Ask user via AskUserQuestion:
## Proposed Fix
{solution summary}
## Complexity: {LOW or HIGH}
{justification}
## What would you like to do?
1. **Fix now** — apply the inline fix and verify tests pass
2. **Create plan** — hand off to `/bdk:create-plan` with failing tests as acceptance criteria
3. **Something else** — redirect, reconsider, investigate more
{recommendation}AskUserQuestion MUST be last tool call in this phase.
HARD STOP: After calling
AskUserQuestion, output NO text, call NO tools, take NO action. Turn ends here. Phase 4 task stays open. Phase 5 does not start until user replies.
GATE: User explicitly chose option. Only then: mark Phase 4 complete, begin Phase 5.
Phase 5a: Fix Inline
Inject project tools context:
- Test tools: !
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/get_settings.py test-tools - Lint tools: !
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/get_settings.py lint-tools
- Apply minimal fix
- Re-run the same scoped command from Phase 3 via
Bash— only the tests you wrote - Confirm those tests GREEN
- Delegate to
static-analyse, passing the files you changed — it resolves the scoped lint/format and incremental typecheck forms itself. Do not ask for a project-wide sweep - Fix any issues
- Regression check: delegate to
bdk:test-runnerwith the changed source files, asking for the fast tier'srelated/scopedform. This is the one dispatch worth its spawn here — the output is large and the mapping from changed files to affected tests is exactly what the runner computes for you. Add an e2e tier only if the fix touched e2e specs or changed a public contract - Print final summary:
[debug] Done. Root cause: {one sentence} Tests added: {N} Fix applied: {brief description} Status: all tests GREEN
Phase 5b: Hand Off to /bdk:create-plan
- Print:
[debug] Routing to /bdk:create-plan - Invoke
/bdk:create-planpassing:- Root cause as feature description
- Steps to reproduce (verbatim)
- Failing test file path and test names as acceptance criteria
- Architectural constraints discovered during investigation
Key Principles
- Investigate before testing — understand first
- Tests define bug — failing test is contract
- Phase 4 is hard stop — ALWAYS wait for user decision
- Inline questions for info, AskUserQuestion for decisions
- Minimal fix — change only what failing tests require
- NEVER hardcode test or lint commands — detect from project context
Anti-Patterns
- NEVER fix before writing failing test
- NEVER proceed past Phase 4 without user confirmation
- NEVER route to /bdk:create-plan without passing failing test paths
- NEVER scan entire codebase for gaps — only code already read
- NEVER call any tool after
AskUserQuestionin Phase 4 — turn ends there - NEVER mark Phase 4 task complete before user responds
- NEVER start Phase 5 without first creating Phase 5 task and Phase 4 marked complete
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

