debug
Skill1 starsChanged 27 days agoMITView on GitHub
Systematic debugging assistant. Always use this skill when investigating a bug, error, crash, unexpected behavior, or failing test, even for seemingly simple issues. Use when the user says "it's broken", "this doesn't work", "I'm getting a weird error", "why is this failing", "help me figure out why X happens", "I'm getting a TypeError/NullPointerException/500 error", or any time the root cause is unknown. Do not attempt to fix code without first reading this skill: frame the problem, form a hypothesis, and narrow scope before touching anything.
We split this skill into the rules it gives an agent
14 rules. 0 are common, 14 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 171 edited versions we read keep these.
14
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 12
Before touching any code, establish:
- Distinctive: line 17
Is the problem reproducible?: If yes, under what conditions exactly?
- Distinctive: line 19
Don't skip this. Jumping to code before framing the problem wastes time and often leads to fixing the wrong thing.
- Distinctive: line 29
Start with the simplest explanation consistent with the evidence (Occam's razor).
- Distinctive: line 44
For errors with stack traces: Read the trace bottom-up (the innermost frame is where the problem actually is).
- Distinctive: line 52
Add a targeted log, assertion, or breakpoint at the suspect location
- Distinctive: line 54
Verify you can make it fail reliably, then make it pass reliably
- Distinctive: line 56
If you can't reproduce the failure with your hypothesis in place, you have the wrong hypothesis.
- Distinctive: line 72
Check for related cases the bug might have affected
- Distinctive: line 73
Write a test that captures the failure mode: one that would have caught this bug before it shipped
- Distinctive: line 79
If you've been on the same hypothesis for more than ~20 minutes and it's not panning out:
- Distinctive: line 82
Ask: what assumption am I making that might be wrong?
- Distinctive: line 91
When you rule something out, say why.
- Distinctive: line 92
When you find the root cause, explain the causal chain clearly: what condition led to what behavior
“Common” is measured: kept by at least 6 in 10 of the 171 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
Debugging is hypothesis-driven investigation, not random exploration. The goal is to find the root cause, not just a fix that makes the symptom disappear.
Phase 1: Frame the problem
Before touching any code, establish:
- What is the expected behavior? State it precisely.
- What is the actual behavior? Include exact error messages, stack traces, or wrong outputs, not summaries.
- What changed recently? A regression almost always has a cause. Ask if anything was deployed, upgraded, or modified before the symptom appeared.
- Is the problem reproducible? If yes, under what conditions exactly? If intermittent, what's the pattern?
Don't skip this. Jumping to code before framing the problem wastes time and often leads to fixing the wrong thing.
Phase 2: Form a hypothesis
State the most likely root cause as a falsifiable claim:
"I think X is happening because Y."
A good hypothesis is specific enough that you can design a test to disprove it. If you can't think of such a test, the hypothesis is too vague. Narrow it down.
Start with the simplest explanation consistent with the evidence (Occam's razor). Common culprits, roughly in order of likelihood:
- Wrong assumption about input data or state
- Off-by-one, boundary condition, or null/undefined
- Race condition or ordering dependency
- Config or environment difference between working and broken context
- A dependency behaving differently than expected (version change, API contract)
- Logic error in a branch that's rarely exercised
Phase 3: Narrow the scope
For regressions: Binary search the change history. Find the last known-good state, then bisect toward the first-bad commit. git bisect is your friend. This is almost always faster than reading code.
For logic bugs: Narrow the reproduction case to the smallest possible input that still shows the problem. Each reduction eliminates a whole class of suspects.
For errors with stack traces: Read the trace bottom-up (the innermost frame is where the problem actually is). Identify the first frame that's your own code, not library code; that's where to start reading.
For wrong outputs: Trace data through the system. Pick a concrete example and follow it from entry point to wrong output. The first place the value diverges from expectation is the bug site.
Phase 4: Prove it before fixing it
Once you've identified a suspect, prove the hypothesis before writing any fix:
- Add a targeted log, assertion, or breakpoint at the suspect location
- Reproduce the bug deliberately with a minimal case
- Verify you can make it fail reliably, then make it pass reliably
If you can't reproduce the failure with your hypothesis in place, you have the wrong hypothesis. Go back to Phase 2.
Phase 5: Fix at the root cause
Fix the underlying cause, not the symptom. Ask: "If I make this change and the root cause is still present, could the bug resurface in a different form?" If yes, you're treating a symptom.
Fixes should be:
- Minimal: change only what's needed to correct the behavior
- Targeted: don't refactor surrounding code while fixing a bug; that makes it harder to review and introduces risk
Phase 6: Verify and prevent recurrence
After the fix:
- Confirm the original reproduction case passes
- Check for related cases the bug might have affected
- Write a test that captures the failure mode: one that would have caught this bug before it shipped
The test is not optional. If the bug was real, the test proves it's fixed and guards against regression.
When you're stuck
If you've been on the same hypothesis for more than ~20 minutes and it's not panning out:
- State your current model of the system out loud; often the error surfaces while explaining it (rubber duck)
- Ask: what assumption am I making that might be wrong?
- Try the opposite hypothesis: what if the problem is not in the place I'm looking?
- Widen the scope: could this be environmental (different OS, different runtime version, different data)?
What to communicate
When reporting progress:
- Say which hypothesis you're testing, not just "investigating"
- When you rule something out, say why; it helps the user understand the system too
- When you find the root cause, explain the causal chain clearly: what condition led to what behavior
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★ 40ksame name
- Yeachan-Heo/oh-my-claudecode★ 40ksame name
- anthropics/knowledge-work-plugins★ 34ksame name
- qwibitai/nanoclaw★ 31ksame name
- gavrielc/nanoclaw★ 31ksame name
- nanocoai/nanoclaw★ 31ksame name
- openai/symphony★ 27ksame name
- FalkorDB/FalkorDB★ 11ksame name
- NVIDIA/TensorRT-Model-Optimizer★ 5.5ksame name
- NVIDIA/Model-Optimizer★ 5.5ksame 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.
Used alongsideProjects 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
In this repository25 other files it gives its agents.
- api-designSkill
- arch-reviewSkill
- db-reviewSkill
- dotnet-asyncSkill
- dotnet-opsSkill
- dotnet-testingSkill
- dotnet-typesSkill
- go-concurrencySkill
- go-opsSkill
- go-testingSkill
- go-typesSkill
- incidentSkill
- node-asyncSkill
- node-opsSkill
- perfSkill
- pr-prepSkill
- py-asyncSkill
- py-opsSkill
- py-testingSkill
- py-typesSkill
- refactorSkill
- securitySkill
- test-genSkill
- ts-testingSkill
- ts-typesSkill
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.

