debugging-systematically
Skill11 starsChanged 47 days agoMITView on GitHub
Guides systematic debugging methodology and troubleshooting approaches. Use when investigating bugs, tracing issues, or teaching debugging patterns.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- Knowledge-Forge-AI/agentic-praxis-grimoiretheir own version, first seen Nov 8, 2026
- jjsizemore/jjskillstheir own version, first seen Nov 1, 2026
- vadimvitvickiy/vv-agent-kittheir own version, first seen Oct 20, 2026
- aaravriyer193/skillstheir own version, first seen Oct 13, 2026
- Samueladewole/claude-skillstheir own version, first seen Oct 13, 2026
- MorganOnGitHub/tackletheir own version, first seen Sep 27, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- Knowledge-Forge-AI/agentic-praxis-grimoire★ 2same name
- aaravriyer193/skills★ 1same name
- jjsizemore/jjskills★ 1same name
- MorganOnGitHub/tackle★ 0same name
- Samueladewole/claude-skills★ 0same name
- vadimvitvickiy/vv-agent-kit★ 0same name
- xuanjgcarryyou/claude-skill★ 0same name
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 repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- auditing-uiSkill
- browser-testingSkill
- capturing-product-mediaSkill
- ci-local-exportSkill
- ci-pulseSkill
- ci-quarantineSkill
- ci-statusSkill
- creating-pull-requestsSkill
- debugging-test-failuresSkill
- debugging-typescript-errorsSkill
- deps-weeklySkill
- designing-frontendSkill
- opensrcSkill
- organizing-fsd-architectureSkill
- runtime-watchSkill
- stewarding-ci-pipelineSkill
- syncing-agent-skillsSkill
- verification-before-completionSkill
- vision-drift-checkSkill
- visual-companionSkill
- writing-adrsSkill
- writing-app-copySkill
- writing-blog-postsSkill
- writing-changelogsSkill
- writing-developer-guidesSkill
- writing-for-humansSkill
- writing-to-usersSkill
- adding-config-fieldsSkill
- clarifying-requirementsSkill
- maintaining-dependenciesSkill
- maintaining-dev-playgroundSkill
- managing-specsSkill
- marketplace-devSkill
- orchestrating-parallel-workSkill
- reading-session-transcriptsSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- styling-with-tailwind-shadcnSkill
- test-driven-developmentSkill
- upgrading-runtime-dependenciesSkill
- working-in-worktreesSkill
- dorkbot-triageSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
35 rules. 0 are common, 34 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
34
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Never make changes to code you don't understand.
- Distinctive: line 65
Test hypotheses in order of:
- Distinctive: line 75
When you don't know where the bug is:
- Distinctive: line 79
If midpoint is good, bug is in second half
- Distinctive: line 80
If midpoint is bad, bug is in first half
- Distinctive: line 97
When facing complex bugs:
- Distinctive: line 113
Create automated reproduction if possible
- Distinctive: line 128
Check component receives correct data
- Distinctive: line 129
Check TanStack Query returns correct data
- Distinctive: line 130
Check Hono route returns correct data
- Distinctive: line 131
Check service returns correct data
- Distinctive: line 132
Check data store has correct data
- Distinctive: line 136
Verify data store has correct data (SQLite, JSONL transcripts, JSON state files)
- Distinctive: line 137
Verify service reads/writes correctly
- Distinctive: line 138
Verify Hono route transforms correctly
- Distinctive: line 139
Verify TanStack Query caches correctly
- Distinctive: line 140
Verify component renders correctly
- Distinctive: line 154
When debugging data issues, verify the actual data using direct inspection:
- Distinctive: line 175
If data exists in store but not in UI → Issue is in application layers
- Distinctive: line 176
If data missing from store → Issue is in write operation
- Distinctive: line 177
If data is wrong in store → Issue is in mutation logic
- Very specific: line 179
Use /debug:data for detailed data inspection or /debug:logs for server log analysis.
- Distinctive: line 269
Don't randomly change things
- Distinctive: line 270
Test one hypothesis at a time
- Distinctive: line 271
Document what you've tried
- Distinctive: line 275
Verify assumptions with evidence
- Distinctive: line 276
Check "impossible" scenarios anyway
- Distinctive: line 277
Read the actual error message carefully
- Distinctive: line 283
After 30+ minutes with no progress
- Distinctive: line 284
When you need domain knowledge
- Distinctive: line 285
When a fresh perspective would help
- Distinctive: line 300
If you have attempted 3 or more fixes without success:
- Distinctive: line 336
Check recent git changes
- Distinctive: line 337
Search for similar issues
- Distinctive: line 338
Ask for a second pair of eyes
“Common” is measured: kept by at least 6 in 10 of the 7 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
Debugging Systematically
This skill provides debugging methodology — systematic approaches to finding and fixing bugs. It covers the mental models and techniques for effective troubleshooting.
For specific debugging tools: See /debug:* commands.
Core Debugging Methodology
The Scientific Method for Bugs
- Observe — What is actually happening?
- Hypothesize — What could cause this?
- Test — Design an experiment to verify
- Analyze — Did the test confirm or refute?
- Iterate — Refine hypothesis and repeat
The Golden Rule
Understand before you fix.
Never make changes to code you don't understand. Reading and comprehending the code often reveals the bug.
Problem Articulation
Questions to Answer First
| Question | Why It Matters |
| What should happen? | Defines the expected behavior |
| What actually happens? | Identifies the discrepancy |
| When did it start? | Narrows the scope of changes |
| What changed recently? | Identifies potential causes |
| Is it reproducible? | Determines debugging approach |
Rubber Duck Method
The act of explaining code line-by-line forces you to:
- Think through logic sequentially
- Surface implicit assumptions
- Notice gaps in understanding
- Catch inconsistencies
Often, the solution becomes obvious mid-explanation.
Hypothesis Formation
Common Bug Categories
| Category | Symptoms | Check |
| Data | Wrong values, undefined | Log actual values |
| Logic | Wrong branch, off-by-one | Trace conditionals |
| Timing | Race conditions, stale data | Check async flow |
| State | Inconsistent behavior | Inspect state at each step |
| Integration | API mismatches | Verify contracts |
Ranking Hypotheses
Test hypotheses in order of:
- Likelihood — Most common causes first
- Ease of testing — Quick tests before complex ones
- Impact — High-impact issues take priority
Investigation Techniques
Binary Search Debugging
When you don't know where the bug is:
- Identify start point (known good) and end point (known bad)
- Check the midpoint
- If midpoint is good, bug is in second half
- If midpoint is bad, bug is in first half
- Repeat until isolated
Data Flow Tracing
For data issues, trace the complete path:
Input → Transform → Store → Retrieve → Transform → Output
↓ ↓ ↓ ↓ ↓ ↓
Verify Verify Verify Verify Verify VerifyLog at each step to find where data diverges from expected.
Isolation Technique
When facing complex bugs:
- Remove variables — Simplify to minimal reproduction
- Mock dependencies — Eliminate external factors
- Hardcode values — Remove dynamic inputs
- Comment out code — Find which section causes issue
Reproducing First
Never try to fix a bug you can't reproduce.
Steps to reproduce:
- Document exact steps
- Note environment (browser, OS, data state)
- Identify minimum case
- Create automated reproduction if possible
Layer-by-Layer Debugging
Project Data Flow
Component → TanStack Query → Transport → Hono Route → Service → Data Store (SQLite/JSONL/JSON)Debug from the outside in or inside out:
Outside-in (start at symptom):
- User sees wrong data
- Check component receives correct data
- Check TanStack Query returns correct data
- Check Hono route returns correct data
- Check service returns correct data
- Check data store has correct data
Inside-out (start at source):
- Verify data store has correct data (SQLite, JSONL transcripts, JSON state files)
- Verify service reads/writes correctly
- Verify Hono route transforms correctly
- Verify TanStack Query caches correctly
- Verify component renders correctly
Layer-Specific Checks
| Layer | What to Check | Tools |
| Component | Props received, render conditions, state | Browser DevTools |
| TanStack Query | Cache key, staleTime, enabled, queryFn | React Query Devtools |
| Hono Route | Zod validation, boundary check, feature flag | Network tab, server logs |
| Service | Business logic, error handling | Server logs (NDJSON) |
| Data Store | SQLite tables, JSONL files, JSON state | sqlite3, /debug:data |
Data Store Verification (Ground Truth)
When debugging data issues, verify the actual data using direct inspection:
DORK_HOME="apps/server/.temp/.dork"
# SQLite queries
sqlite3 -header -column "$DORK_HOME/dork.db" "SELECT * FROM [table] LIMIT 10;"
# Relay state files
cat "$DORK_HOME/relay/adapters.json" | python3 -m json.tool
cat "$DORK_HOME/relay/bindings.json" | python3 -m json.tool
# Server config
cat "$DORK_HOME/config.json" | python3 -m json.tool
# Server logs (NDJSON)
tail -20 "$DORK_HOME/logs/dorkos.log" | python3 -m json.toolThis establishes ground truth:
- If data exists in store but not in UI → Issue is in application layers
- If data missing from store → Issue is in write operation
- If data is wrong in store → Issue is in mutation logic
Use /debug:data for detailed data inspection or /debug:logs for server log analysis.
Common Bug Patterns
JavaScript/TypeScript
| Pattern | Example | Fix |
| Implicit coercion | "5" + 3 = "53" | Explicit conversion |
| Async not awaited | Missing await | Add await, check Promise |
| Closure capture | Loop variable captured | Use let, not var |
| Null/undefined access | obj.prop when obj is null | Optional chaining ?. |
| Reference vs value | Object mutation | Spread or clone |
React
| Pattern | Symptom | Fix |
| Stale closure | Old state in callback | Use callback form or ref |
| Missing dependency | Effect doesn't re-run | Add to dependency array |
| Infinite loop | Component re-renders forever | Check useEffect deps |
| Key issues | List items behave wrong | Use unique, stable keys |
| Server/client mismatch | Hydration errors | Check where state initializes |
Data Fetching
| Pattern | Symptom | Fix |
| Stale cache | Old data after mutation | Invalidate queries |
| Race condition | Wrong data displayed | Cancel previous requests |
| N+1 queries | Slow loading | Use include/eager loading |
| Missing error handling | Silent failures | Add try/catch, onError |
Debugging Tools
Console Methods
console.log(); // Basic output
console.table(); // Tabular data
console.group(); // Grouped output
console.time(); // Performance timing
console.trace(); // Stack trace
console.assert(); // Conditional loggingStrategic Logging
// Tag logs for filtering
console.log('[AUTH]', user);
console.log('[DATA]', response);
// Log with context
console.log('[API] Request:', { endpoint, params, timestamp: Date.now() });
// Remove before commit (or use debug library)Debugger Usage
// Break at specific point
debugger;
// Conditional break
if (someCondition) debugger;Browser DevTools
| Tab | Use For |
| Console | Errors, logs, REPL |
| Network | API calls, timing, payloads |
| Elements | DOM inspection, styles |
| Sources | Breakpoints, stepping |
| Application | Storage, cookies, cache |
| Performance | Profiling, bottlenecks |
Debugging Mindset
Stay Calm
- Bugs are normal, not personal failures
- Take breaks when frustrated
- Fresh eyes often spot issues immediately
Be Systematic
- Don't randomly change things
- Test one hypothesis at a time
- Document what you've tried
Trust Nothing
- Verify assumptions with evidence
- Check "impossible" scenarios anyway
- Read the actual error message carefully
Ask for Help
When to escalate:
- After 30+ minutes with no progress
- When you need domain knowledge
- When a fresh perspective would help
Anti-Patterns
| Don't | Instead |
| Change random things | Form hypothesis, test systematically |
| Assume you know the cause | Verify with evidence |
| Debug without reproducing | Create minimal reproduction first |
| Skip reading error messages | Read the complete error carefully |
| Add code without understanding | Understand existing code first |
| Debug in production | Reproduce locally first |
The 3-Fix Rule
If you have attempted 3 or more fixes without success:
STOP. Question the architecture.
Pattern indicating an architectural problem:
- Each fix reveals new shared state, coupling, or problems in a different place
- Fixes require "massive refactoring" to implement
- Each fix creates new symptoms elsewhere
This is NOT a failed hypothesis — this is a wrong architecture. Discuss with the user before attempting more fixes.
Supporting Techniques
condition-based-waiting.md— Replace arbitrary timeouts with condition pollingdefense-in-depth.md— Add validation at multiple layers after finding root causeroot-cause-tracing.md— Trace bugs backward through call stack to find original triggerfind-polluter.sh— Bisection script to find which test creates unwanted state
Quick Reference
Debugging Checklist
- Can I reproduce the bug?
- What changed recently?
- What does the error message say?
- What do the logs show?
- What layer is the bug in?
- What assumption might be wrong?
- Have I tested my hypothesis?
When Stuck
- Take a break (walk, coffee)
- Explain the problem out loud
- Re-read the error message
- Check recent git changes
- Search for similar issues
- Ask for a second pair of eyes
References
/debug:browser— Visual and interaction debugging/debug:api— Data flow debugging (Component → Query → Route → Service → DB)/debug:data— Direct database and state file inspection/debug:test— Test failure debugging/debug:logs— Server log analysis/debug:types— TypeScript error debugging/debug:performance— Performance debugging
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.

