/aide:debugfrom aide
Provides a structured debugging workflow for tracking down bugs: reproduce, locate code, trace execution, form hypotheses, and validate.
Ships in aide. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Recommended model tier: smart (opus) - this skill requires complex reasoning
Systematic approach to identifying and fixing bugs.
Before starting:
Goal: Confirm the bug exists and understand its behavior.
# Run the failing code/test
npm test -- --grep "failing test"
# OR
node path/to/script.js
Document:
If cannot reproduce:
Use tools to find code related to the error:
# Search for function mentioned in stack trace
mcp__plugin_aide_aide__code_search query="functionName" kind="function"
# Navigate an unfamiliar large suspect file when its structure is needed
mcp__plugin_aide_aide__code_outline file="path/to/file.ts"
# Get symbols in suspect file
mcp__plugin_aide_aide__code_symbols file="path/to/file.ts"
# Search for error message text in code
Grep for "error message text"
Follow the code flow from entry to error:
code_references to find callers of the failing functioncode_outline when unfamiliar large-file structure
would help locate the next section, or batch known symbols with code_read_symbolcode_search kind="interface"Read the full file when it is small or most contents are needed. Extra navigation rounds can outweigh smaller responses; use outlines when they resolve missing context.
Based on the error type, consider these causes:
| Symptom | Likely Causes |
|---|---|
| "undefined is not a function" | Variable is null/undefined, wrong import |
| "Cannot read property of undefined" | Missing null check, async timing issue |
| "Type error" | Type mismatch, wrong function signature |
| "Maximum call stack" | Infinite recursion, circular reference |
| "Network error" | Bad URL, CORS, timeout, server down |
| "State not updating" | Mutation instead of new object, missing dependency |
Test each hypothesis systematically:
# Add temporary logging
console.log('DEBUG: variable =', JSON.stringify(variable));
# Check with debugger
node --inspect-brk script.js
# Run specific test
npm test -- --grep "test name"
Validation checklist:
Rules:
Common fixes:
# Run the originally failing test/scenario
npm test -- --grep "failing test"
# Run related tests
npm test -- --grep "related feature"
# Run full test suite to check for regressions
npm test
Verification criteria:
| Situation | Action |
|---|---|
| Cannot reproduce | Check environment, add logging to narrow down |
| Multiple bugs intertwined | Fix one at a time, verify after each |
| Fix causes new failures | Revert, analyze dependencies, try different approach |
| Root cause is in dependency | Check for updates, file issue, implement workaround |
| Bug is in async code | Add proper await, check Promise chains |
When abandoning an approach: If you try a fix direction and abandon it (e.g., revert because it causes regressions), record it as an abandoned approach so future sessions don't repeat it:
./.aide/bin/aide memory add --category=abandoned \
--tags=reason:<why>,approach:<what>,project:<name>,session:<id>,source:discovered \
"ABANDONED: <what was tried>. REASON: <why>. ALTERNATIVE: <new direction>. CONTEXT: <details>"
mcp__plugin_aide_aide__code_outline - Navigate unfamiliar large files when their structure is neededmcp__plugin_aide_aide__code_search - Find functions, classes, types involved in the bugmcp__plugin_aide_aide__code_symbols - List all symbols in a filemcp__plugin_aide_aide__code_references - Find all callers of a functionmcp__plugin_aide_aide__memory_search - Check for related past issues## Debug Report: [Issue Title]
### Problem
[What was happening vs what should happen]
### Reproduction
[Steps to reproduce the issue]
### Root Cause
[Identified cause with file:line reference]
[Why the bug occurred]
### Fix Applied
[What was changed and why]
### Verification
- Original issue: FIXED
- Related tests: PASS
- Full suite: PASS
### Prevention
[Optional: How to prevent similar bugs]
When storing memories from this skill (abandoned approaches, blockers), always:
source: tag — Use source:discovered for things you found, source:inferred for deductionsproject:<name>,session:<id> (get project name from git remote or directory; session ID from $AIDE_SESSION_ID or $CLAUDE_SESSION_ID)memorise skill for the full verification workflow.scope:global unless storing a user preferenceWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
26 skills in this plugin
/assess-findingsTriage static analysis findings, grade them against recorded decisions, and accept noise or irrelevant items/autopilotFull autonomous execution - keeps working until all tasks are verified complete/build-fixFix build, lint, and type errors/code-searchLocate definitions, investigate callers and change impact, explore file structure, and read selected source/context-usageAnalyze current session context and token usage from OpenCode SQLite database/decideFormal decision-making interview for architectural choicesnpx claudepluginhub jmylchreest/aide --plugin aideOther plugins' skills for the same job