debugging
Skill2 starsChanged 8 months agoMITView on GitHub
Structured root-cause investigation for bugs and failures.
116 other projects use a version of this.
Adopted by
Most recently taken up by
- thistleknot/skillstheir own version, first seen Nov 8, 2026
- DevNewbie1826/skillstheir own version, first seen Nov 8, 2026
- MasihMoafi/skillstheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- idavidov13/agentic-playwrighttheir own version, first seen Nov 8, 2026
- profdorly/ultimate-dev-skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use Problem-Solving Techniques, media-processing 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.
truongtv22SkillProblem-Solving Techniques
Apply systematic problem-solving techniques for complexity spirals (simplification cascades), innovation blocks (collision-zone thinking), recurring patterns (meta-pattern recognition), assumption constraints (inversion exercise), scale uncertainty (scale game), and dispatch when stuck. Techniques derived from Microsoft Amplifier project patterns adapted for immediate application.
Also in 4 projects that use this
mrgoonieSkillmedia-processing
Process multimedia files with FFmpeg (video/audio encoding, conversion, streaming, filtering, hardware acceleration) and ImageMagick (image manipulation, format conversion, batch processing, effects, composition). Use when converting media formats, encoding videos with specific codecs (H.264, H.265, VP9), resizing/cropping images, extracting audio from video, applying filters and effects, optimizing file sizes, creating streaming manifests (HLS/DASH), generating thumbnails, batch processing images, creating composite images, or implementing media processing pipelines. Supports 100+ formats, hardware acceleration (NVENC, QSV), and complex filtergraphs.
Also in 6 projects that use this
JetBrainsSkillssr
Guide for using Structural Search and Replace in IntelliJ. Use when creating or modifying SSR inspections or search patterns.
Also in 3 projects that use this
mrgoonieSkillweb-frameworks
Build modern full-stack web applications with Next.js (App Router, Server Components, RSC, PPR, SSR, SSG, ISR), Turborepo (monorepo management, task pipelines, remote caching, parallel execution), and RemixIcon (3100+ SVG icons in outlined/filled styles). Use when creating React applications, implementing server-side rendering, setting up monorepos with multiple packages, optimizing build performance and caching strategies, adding icon libraries, managing shared dependencies, or working with TypeScript full-stack projects.
Also in 6 projects that use this
DevNewbie1826Skillremove-ai-slops
Remove AI-generated code slop from branch changes or an explicit file list while preserving behavior, including junk tests (prose pins, source greps, copied inventories, mock echoes), each proven by its class rule before a cut. Use when asked to remove slop, clean AI code, deslop, clean up generated code, strip slop, prune junk tests, or review generated-code cleanup. Start by locking behavior with regression tests, then use the category and workflow references.
Also in 3 projects that use this
DevNewbie1826Skillprogramming
MUST USE for work on Python, Rust, TypeScript, JavaScript, or Go source files and project manifests, and whenever a test or spec file is written, reshaped, reviewed, or deleted. Triggers: write or edit code; add, change, or delete a test; test authoring gate; junk tests; new project; Go HTTP service (gin lane); Bubble Tea TUI; CJK IME; Connect-Go RPC; sqlc or pgx; branded IDs; exhaustive matching; unsafe Rust; Miri; oversized file; refactoring; logging, log levels, structured logging, or observability; arena, allocator, bumpalo, const fn, const generics, compile-time programming, zero-allocation APIs, bitfields, repr, scope guards, errdefer-style cleanup, Zig-like patterns, zero-copy parsing, packed data, or FFI; Rust public API design or macros.
Also in 3 projects that use this
- +6 more from mrgoonie
Other versions116 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 116
- tursodatabase/turso★ 25ksame name
- JetBrains/intellij-community★ 21ksame name
- DetachHead/rebased★ 6.5ksame name
- mrgoonie/claudekit-skills★ 2.2ksame name
- JetBrains/MPS★ 1.7ksame name
- danieleteti/delphimvcframework★ 1.4ksame name
- glommer/pgmicro★ 1.2ksame name
- karrioapi/karrio★ 799same name
- rapidaai/voice-ai★ 755same name
- i-am-manware/Manware-s-AI-Learning-Toolkit★ 717same name
106 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 repository18 other files it gives its agents.
- auditingSkill
- bootstrappingSkill
- executingSkill
- finalizingSkill
- guardingSkill
- handling-reviewSkill
- ideatingSkill
- isolatingSkill
- orchestratingSkill
- parallelizingSkill
- planningSkill
- precisionSkill
- requesting-reviewSkill
- runbookSkill
- scaffoldingSkill
- skill-craftingSkill
- tddSkill
- verifyingSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 104 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
If Phase 1 is incomplete, no fix proposals allowed.
- Distinctive: line 40
If non-reproducible: gather more data — do not guess
- Distinctive: line 48
When the system spans multiple layers (CI pipeline, API chain, build tooling):
- Distinctive: line 67
If implementing a known pattern, read the reference implementation completely — no skimming
- Distinctive: line 78
Do not layer fixes on top of each other
- Distinctive: line 96
Stop and reconsider fundamentals: Is the current approach viable, or is inertia the only reason to continue?
- Distinctive: line 125
Use this when: the investigation touches 5+ files, spans multiple tool calls, or you catch yourself re-reading earlier findings.
- Distinctive: line 129
If any of these thoughts arise, return to Phase 1 immediately:
“Common” is measured: kept by at least 6 in 10 of the 104 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
Constraint
NO FIXES WITHOUT ROOT CAUSE INVESTIGATIONIf Phase 1 is incomplete, no fix proposals allowed. Period.
When to Activate
Any technical malfunction: test failures, runtime errors, unexpected behavior, performance regressions, build breaks, integration mismatches.
Activate especially when:
- Time pressure makes guessing tempting
- An "obvious quick fix" presents itself
- Previous attempts have not resolved the issue
- The failure mechanism is not fully understood
Investigation Protocol
Complete each phase sequentially. Do not skip ahead.
Phase 1: Root Cause Investigation
1. Read error output thoroughly
- Full stack traces, not just the top frame
- Note line numbers, file paths, error codes
- Warnings preceding the error often contain the answer
2. Reproduce consistently
- Determine exact trigger steps
- Confirm it repeats reliably
- If non-reproducible: gather more data — do not guess
3. Check recent changes
git diff,git log --oneline -10- New dependencies, config modifications, environment drift
4. Instrument multi-component boundaries
When the system spans multiple layers (CI pipeline, API chain, build tooling):
For EACH component boundary:
- Log inputs entering the component
- Log outputs leaving the component
- Verify config/env propagation across the boundary
- Run once, collect evidence, identify the failing seam5. Trace data flow backward
See references/root-cause-tracing.md for the full technique.
Short version: start at the crash site, ask "where did this bad value come from?", trace upstream until you reach the originating mutation. Fix there.
Phase 2: Pattern Comparison
- Locate analogous working code in the same codebase
- If implementing a known pattern, read the reference implementation completely — no skimming
- Diff working vs. broken — list every difference, however trivial
- Map dependencies: config, environment, shared state, ordering assumptions
Phase 3: Hypothesis Testing
- State one hypothesis explicitly: "X causes the failure because Y"
- Make the smallest possible change to test it — one variable only
- Evaluate:
- Confirmed → proceed to Phase 4
- Refuted → form a new hypothesis from the new evidence
- Do not layer fixes on top of each other
Phase 4: Fix and Verify
- Write a failing test that captures the bug (use
arsyn:tddif available) - Apply a single fix targeting the root cause — no bundled refactoring
- Run the full relevant test suite — not just the new test
- If the fix fails:
- Count total attempts
- Under 3: return to Phase 1 with new data
- 3 or more: stop fixing. The problem is likely architectural.
On 3+ failed attempts: Indicators of structural mismatch:
- Each fix surfaces new coupling in a different location
- Fixes demand large-scale refactoring to implement
- Each patch spawns new symptoms elsewhere
Stop and reconsider fundamentals: Is the current approach viable, or is inertia the only reason to continue? Escalate for discussion before further changes.
File-System-as-State Pattern
For investigations spanning many files or long debugging sessions, offload findings to disk instead of relying on context memory:
# Initialize a debug log at the start of investigation
echo "# Debug Log — $(date -Iminutes)" > debug-log.md
# Append findings as you go
echo "## Phase 1 — Error Analysis" >> debug-log.md
echo "- Stack trace points to auth.ts:142" >> debug-log.md
echo "- Token is null at middleware boundary" >> debug-log.md
# Append hypotheses and results
echo "## Hypothesis 1: Token not forwarded by proxy" >> debug-log.md
echo "- Result: REFUTED — proxy logs show token present" >> debug-log.md
# Later, grep across your own findings instead of scrolling context
grep "REFUTED\|CONFIRMED" debug-log.mdBenefits:
- Survives context window limits in long sessions
- Grep-searchable — faster than re-reading conversation history
- Shareable artifact for post-incident review
- Prevents re-testing already-refuted hypotheses
Use this when: the investigation touches 5+ files, spans multiple tool calls, or you catch yourself re-reading earlier findings.
Stop Signals
If any of these thoughts arise, return to Phase 1 immediately:
- "Quick fix now, investigate later"
- "Let me try changing X and see"
- "Multiple changes at once, then run tests"
- "Skip the test, I'll verify manually"
- "It's probably X" (without evidence)
- "I don't fully understand but this might work"
- Proposing solutions before tracing data flow
- "One more attempt" after 2+ failures
Common Rationalizations
| Rationalization | Counter |
| "Too simple for a process" | Simple bugs have root causes. The protocol is fast for simple cases. |
| "Emergency — no time" | Structured investigation is faster than guess-and-check cycling. |
| "Let me try this first" | The first attempted fix sets the pattern. Start correctly. |
| "I'll add the test after" | Untested fixes regress. Test-first proves resolution. |
| "Multiple fixes save time" | Prevents isolating what worked. Introduces new defects. |
| "I see the problem" | Seeing symptoms is not understanding causation. |
| "One more try" (after 2+ failures) | 3+ failures signal structural issues, not missing patches. |
Quick Reference
| Phase | Core Activity | Exit Criterion |
| 1. Root Cause | Read errors, reproduce, trace data | Understand what fails and why |
| 2. Pattern | Find working analogues, diff against broken | Differences catalogued |
| 3. Hypothesis | State theory, test minimally | Confirmed or replaced |
| 4. Fix | Failing test, single fix, verify | Bug resolved, suite green |
Supporting References
references/root-cause-tracing.md— backward tracing through call stacksreferences/defense-in-depth.md— multi-layer validation after root cause is foundreferences/condition-based-waiting.md— replace arbitrary sleeps with condition polling
Gotchas
- Fix-first impulse — Modifying code before understanding the root cause. The constraint is absolute: investigate first.
- Assuming the obvious — "It's probably X" leads to symptom patches. Follow evidence chains, not intuition.
- Symptom suppression — Adding null guards around crashes instead of determining why the value is null.
- Skipping reproduction — Attempting fixes without a reliable trigger. No reproduction means no verification.
- Confirmation bias — Seeking only evidence that supports the first theory. Actively attempt to disprove each hypothesis.
- Scope drift — "While I'm here, let me also..." Stay on the reported defect. File separate issues for other findings.
- Context amnesia — In long sessions, forgetting earlier findings and re-testing refuted hypotheses. Use the file-system-as-state pattern to persist investigation state.
- Layered patches — Applying fix #2 on top of fix #1 without reverting. Each hypothesis test should start from a clean baseline.
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.

