debug
Skill19 starsChanged 3 months agoMITView on GitHub
Systematic debugging workflow for tracking down bugs and issues
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 repository25 other files it gives its agents.
- assess-findingsSkill
- autopilotSkill
- build-fixSkill
- code-searchSkill
- context-usageSkill
- decideSkill
- designSkill
- docsSkill
- forgetSkill
- gitSkill
- implementSkill
- memoriseSkill
- patternsSkill
- perfSkill
- plan-swarmSkill
- recallSkill
- reflectSkill
- reviewSkill
- semgrepSkill
- surveySkill
- swarmSkill
- swarm-statusSkill
- testSkill
- verifySkill
- worktree-resolveSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. 0 are common, 19 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
19
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
Look for race conditions
- Distinctive: line 50
Check for cached state
- Distinctive: line 54
Use tools to find code related to the error:
- Distinctive: line 72
Follow the code flow from entry to error:
- Distinctive: line 74
Read the failing function or known stack-trace ranges directly
- Very specific: line 75
Use code_references to find callers of the failing function
- Very specific: line 76
Read the relevant execution path.
- Very specific: line 78
Check type definitions with code_search kind="interface"
- Distinctive: line 80
Read the full file when it is small or most contents are needed.
- Distinctive: line 98
Test each hypothesis systematically:
- Distinctive: line 113
Check variable values at key points
- Distinctive: line 114
Verify assumptions about input data
- Distinctive: line 115
Test edge cases (null, empty, boundary values)
- Distinctive: line 123
Don't refactor unrelated code
- Distinctive: line 128
Add null/undefined check
- Distinctive: line 151
No new errors introduced
- Distinctive: line 163
When abandoning an approach: If you try a fix direction and abandon it (e.g., revert because it causes regressions), record it as an …
- Distinctive: line 214
Always get the full error message and stack trace first
- Distinctive: line 215
Don't guess - trace the code path methodically
- Distinctive: line 217
Remove temporary logging before committing
- Distinctive: line 218
Consider if the bug could occur elsewhere
- Distinctive: line 222
When storing memories from this skill (abandoned approaches, blockers), always:
- Very specific: line 226
Verify codebase claims: before storing — If a memory references a file, function, or path, confirm it exists first.
“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 Mode
Recommended model tier: smart (opus) - this skill requires complex reasoning
Systematic approach to identifying and fixing bugs.
Prerequisites
Before starting:
- Get the exact error message or unexpected behavior description
- Identify the entry point or trigger for the bug
- Note any relevant environment details (Node version, OS, etc.)
Workflow
Step 1: Reproduce the Issue
Goal: Confirm the bug exists and understand its behavior.
# Run the failing code/test
npm test -- --grep "failing test"
# OR
node path/to/script.jsDocument:
- Exact error message
- Steps to trigger
- Expected vs actual behavior
- Is it consistent or intermittent?
If cannot reproduce:
- Check environment differences
- Look for race conditions
- Check for cached state
Step 2: Locate the Relevant Code
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"Step 3: Trace the Execution Path
Follow the code flow from entry to error:
- Read the failing function or known stack-trace ranges directly
- Use
code_referencesto find callers of the failing function - Read the relevant execution path; use
code_outlinewhen unfamiliar large-file structure would help locate the next section, or batch known symbols withcode_read_symbol - Check type definitions with
code_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.
Step 4: Form Hypotheses
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 |
Step 5: Validate Hypotheses
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:
- Check variable values at key points
- Verify assumptions about input data
- Test edge cases (null, empty, boundary values)
- Check async ordering
Step 6: Apply the Fix
Rules:
- Change only what's necessary to fix the bug
- Don't refactor unrelated code
- Match existing code patterns
Common fixes:
- Add null/undefined check
- Fix type annotation
- Correct async/await usage
- Fix variable scope
- Add missing initialization
Step 7: Verify the Fix
# 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 testVerification criteria:
- Original issue no longer occurs
- Related tests still pass
- No new errors introduced
Failure Handling
| 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 Tools
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
Output Format
## 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]Tips
- Always get the full error message and stack trace first
- Don't guess - trace the code path methodically
- One fix at a time - don't bundle unrelated changes
- Remove temporary logging before committing
- Consider if the bug could occur elsewhere
Memory Hygiene
When storing memories from this skill (abandoned approaches, blockers), always:
- Include
source:tag — Usesource:discoveredfor things you found,source:inferredfor deductions - Include scope tags — Add
project:<name>,session:<id>(get project name from git remote or directory; session ID from$AIDE_SESSION_IDor$CLAUDE_SESSION_ID) - Verify codebase claims before storing — If a memory references a file, function, or path, confirm it exists first. See the
memoriseskill for the full verification workflow. - Never use
scope:globalunless storing a user preference
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.

