debugger
Skill6 starsChanged 8 months agoMITView on GitHub
Use this skill when tracking down a bug, understanding an error message, or diagnosing unexpected behavior in code. Trigger phrases: 'this is broken', 'I'm getting an error', 'why does this crash', 'help me debug'. Not for code review of working code or designing new features.
32 other projects use a version of this.
Adopted by
Most recently taken up by
- BrightGold70/skillstheir own version, first seen Nov 8, 2026
- Vinix24/vnx-orchestrationtheir own version, first seen Nov 6, 2026
- d-o-hub/github-template-ai-agentstheir own version, first seen Nov 3, 2026
- claude-world/director-mode-litetheir own version, first seen Nov 1, 2026
- xfstudio/skillstheir own version, first seen Oct 13, 2026
- antonbabenko/deliberationtheir own version, first seen Oct 13, 2026
Used with
Projects with it also use security-engineer, planner and 2 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.
belokonmSkillsecurity-engineer
Expert in infrastructure security, DevSecOps pipelines, and zero-trust architecture design.
Also in 4 projects that use this
am-willSkillplanner
Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: "make a plan", "create a plan", "plan this out", "plan the implementation", "help me plan", "design a plan", "draft a plan", "write a plan", "outline the steps", "break this down into tasks", "what's the plan for", or any similar planning request. Also triggers on explicit "/planner" or "/plan" commands.
Also in 3 projects that use this
AnthropicSkillsystem-design
Design systems, services, and architectures. Trigger with "design a system for", "how should we architect", "system design for", "what's the right architecture for", or when the user needs help with API design, data modeling, or service boundaries.
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 3 projects that use this
Other versions32 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 32
- toonight/get-shit-done-for-antigravity★ 952same name
- TheDecipherist/claude-code-mastery-project-starter-kit★ 337same name
- Othmane-Khadri/YALC-the-GTM-operating-system★ 298same name
- antonbabenko/deliberation★ 181same name
- wado-lang/wado★ 120same name
- claude-world/director-mode-lite★ 80same name
- Vinix24/vnx-orchestration★ 63same name
- jshsakura/awesome-opencode-skills★ 30same name
- belokonm/claude-supercode-skills★ 11same name
- botlearn-ai/botlearn-skills★ 9same name
22 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 repository68 other files it gives its agents.
- dataset-curatorSkill
- eval-designerSkill
- model-comparatorSkill
- prompt-engineerSkill
- business-analystSkill
- competitor-analystSkill
- market-researcherSkill
- meeting-facilitatorSkill
- okr-plannerSkill
- pitch-deck-writerSkill
- product-managerSkill
- ux-researcherSkill
- api-designerSkill
- architecture-designerSkill
- code-reviewerSkill
- documentation-writerSkill
- refactorerSkill
- regex-masterSkill
- security-auditorSkill
- sql-expertSkill
- test-writerSkill
- chart-builderSkill
- dashboard-designerSkill
- data-analystSkill
- data-cleanerSkill
- excel-expertSkill
- sql-analystSkill
- color-paletteSkill
- design-critiquerSkill
- frontend-designSkill
- ux-writerSkill
- ci-cd-helperSkill
- docker-expertSkill
- kubernetes-helperSkill
- monitoring-setupSkill
- flashcard-makerSkill
- lesson-plannerSkill
- quiz-creatorSkill
- tutorSkill
- docxSkill
- pdfSkill
- pptxSkill
- xlsxSkill
- budget-plannerSkill
- financial-analystSkill
- invoice-generatorSkill
- contract-reviewerSkill
- legal-summarizerSkill
- terms-of-serviceSkill
- decision-makerSkill
- habit-builderSkill
- journalingSkill
- note-takerSkill
- task-plannerSkill
- citation-formatterSkill
- fact-checkerSkill
- literature-reviewerSkill
- summarizerSkill
- web-researcherSkill
- academic-essaySkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. 0 are common, 21 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 29 edited versions we read keep these.
21
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 51
Read the stack trace bottom-up: the bottom frame is usually where the error originated.
- Distinctive: line 52
Read it top-down to see how it propagated to the surface.
- Distinctive: line 54
Look for your own code in the stack — frames from frameworks are usually symptoms, not causes.
- Distinctive: line 57
Use binary search: comment out half the code and see if the error persists.
- Distinctive: line 58
Add logging/print statements at key boundaries to trace values.
- Distinctive: line 59
Use git bisect if the bug appeared recently to find the introducing commit.
- Distinctive: line 60
Write a failing unit test that captures the bug — this isolates it and becomes your regression guard.
- Distinctive: line 65
Consider: wrong type, off-by-one, uninitialized variable, wrong variable, mutation side effect, async race condition, missing null check.
- Distinctive: line 68
Add a targeted assertion or log to confirm or deny the hypothesis before changing code.
- Distinctive: line 69
Run the reproduction case with the added diagnostic.
- Distinctive: line 70
If the hypothesis is disproved, form a new one — do not change code until you have confirmed the root cause.
- Distinctive: line 75
Run the full test suite to confirm no regression.
- Distinctive: line 76
Add a regression test if one doesn't exist.
- Distinctive: line 79
Write a clear commit message: what changed, why, and a reference to the issue.
- Distinctive: line 80
Leave a comment in the code if the fix is non-obvious.
- Very specific: line 182
Use the functional updater form of setCount which receives the latest state value, not the closed-over value:
- Distinctive: line 203
Never change code to fix a bug until you have confirmed the root cause — you may fix a symptom and leave the root cause in place
- Distinctive: line 204
Always write a failing test first that captures the bug before fixing it
- Distinctive: line 205
Use the scientific method: one hypothesis, one experiment, one result at a time
- Distinctive: line 206
Keep a short "debugging journal" for complex bugs to avoid revisiting dead ends
- Distinctive: line 208
Check assumptions at every step: types, values, order of execution, scope
- Distinctive: line 216
Not adding a regression test after fixing, allowing the bug to recur
“Common” is measured: kept by at least 6 in 10 of the 29 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
Debugger
Overview
The Debugger skill applies a systematic five-step methodology — Reproduce → Isolate → Hypothesize → Test → Fix — to diagnose and resolve software bugs efficiently. It covers reading stack traces, identifying common error patterns across languages, and using targeted strategies to narrow down root causes. Rather than guessing, this skill drives debugging as a structured investigation that produces a verified fix and prevents regression.
When to Use
- You have an error message, stack trace, or crash report to analyze
- Code produces unexpected output or behavior
- A test is failing and you don't know why
- An intermittent bug needs to be made reproducible
- You need to understand what a piece of code is actually doing vs. what you thought it did
When NOT to Use
- You want a general code quality review (use the code-reviewer skill)
- You are designing a new system or feature from scratch
- You need to optimize a working system for performance (use a profiler workflow)
- The issue is an environment/infrastructure problem (networking, DNS, containers) rather than code logic
Quick Reference
| Step | Action |
| Reproduce | Confirm the bug exists with a minimal, reliable test case |
| Isolate | Narrow down which file, function, or line causes it |
| Hypothesize | Form a specific, falsifiable theory about the root cause |
| Test | Prove or disprove the hypothesis with targeted experiments |
| Fix | Apply the smallest correct change; verify and add a regression test |
| Stack traces | Read bottom-up (root cause) then top-down (propagation) |
| KeyError/IndexError | Check key existence before access; validate collection lengths |
| TypeError | Inspect actual types at runtime, not assumed types |
| Off-by-one | Trace loop bounds; use closed/open interval notation |
| Async bugs | Log execution order; check promise chaining and race conditions |
Instructions
- Reproduce the bug reliably
- Get the exact steps to reproduce. If you can't reproduce it, you can't verify your fix.
- Reduce the reproduction case to the smallest possible input that still triggers the bug.
- Identify whether the bug is deterministic, intermittent, or environment-specific.
- Record: OS, language/runtime version, relevant library versions, inputs, expected output, actual output.
- Read the error message and stack trace carefully
- Read the stack trace bottom-up: the bottom frame is usually where the error originated.
- Read it top-down to see how it propagated to the surface.
- Extract: error type, error message, file name, line number, function name.
- Look for your own code in the stack — frames from frameworks are usually symptoms, not causes.
- Isolate the failure
- Use binary search: comment out half the code and see if the error persists. Narrow to a section, then a function, then a line.
- Add logging/print statements at key boundaries to trace values.
- Use
git bisectif the bug appeared recently to find the introducing commit. - Write a failing unit test that captures the bug — this isolates it and becomes your regression guard.
- Hypothesize the root cause
- Form a specific, falsifiable hypothesis: "The bug occurs because
XisNonewhen the function expects a string." - List all assumptions the code makes and check each one.
- Consider: wrong type, off-by-one, uninitialized variable, wrong variable, mutation side effect, async race condition, missing null check.
- Form a specific, falsifiable hypothesis: "The bug occurs because
- Test the hypothesis
- Add a targeted assertion or log to confirm or deny the hypothesis before changing code.
- Run the reproduction case with the added diagnostic.
- If the hypothesis is disproved, form a new one — do not change code until you have confirmed the root cause.
- Apply the fix
- Make the minimal change that correctly addresses the root cause (not just the symptom).
- Re-run the reproduction case to confirm the bug is gone.
- Run the full test suite to confirm no regression.
- Add a regression test if one doesn't exist.
- Document the fix
- Write a clear commit message: what changed, why, and a reference to the issue.
- Leave a comment in the code if the fix is non-obvious.
Examples
Example 1: Debug a Python KeyError
Input:
Traceback (most recent call last):
File "app.py", line 42, in process_order
discount = DISCOUNT_MAP[user['tier']]
KeyError: 'gold'Code:
DISCOUNT_MAP = {
'silver': 0.05,
'platinum': 0.20,
}
def process_order(user, order_total):
discount = DISCOUNT_MAP[user['tier']]
return order_total * (1 - discount)Output:
Step 1 – Read the trace
The error is on line 42: DISCOUNT_MAP[user['tier']]. The key 'gold' does not exist in DISCOUNT_MAP.
Step 2 – Hypothesis
DISCOUNT_MAP is missing the 'gold' tier that some users have. The code assumes the map is exhaustive.
Step 3 – Confirm
print(user['tier']) # prints 'gold'
print(DISCOUNT_MAP.keys()) # dict_keys(['silver', 'platinum'])Step 4 – Fix Option A — add the missing key:
DISCOUNT_MAP = {
'silver': 0.05,
'gold': 0.10,
'platinum': 0.20,
}Option B — use a safe default for unknown tiers:
discount = DISCOUNT_MAP.get(user['tier'], 0.0)Regression test:
def test_process_order_unknown_tier():
user = {'tier': 'bronze'}
result = process_order(user, 100.0)
assert result == 100.0 # no discount for unknown tierExample 2: Debug a React state update issue
Input:
function Counter() {
const [count, setCount] = useState(0);
function handleTripleClick() {
setCount(count + 1);
setCount(count + 1);
setCount(count + 1);
}
return <button onClick={handleTripleClick}>Count: {count}</button>;
}Symptom: clicking the button only increments count by 1, not 3.
Output:
Step 1 – Reproduce
The button increments count from 0 to 1, never to 3, regardless of how many times setCount is called in the handler.
Step 2 – Hypothesis
React batches state updates within an event handler. All three calls to setCount(count + 1) read the same stale closure value of count (e.g., 0), so all three calls set count to 1.
Step 3 – Confirm Add a log:
function handleTripleClick() {
console.log('before:', count); // logs 0 all three times
setCount(count + 1);
setCount(count + 1);
setCount(count + 1);
}Step 4 – Fix
Use the functional updater form of setCount which receives the latest state value, not the closed-over value:
function handleTripleClick() {
setCount(prev => prev + 1);
setCount(prev => prev + 1);
setCount(prev => prev + 1);
}Now each call receives the result of the previous update, so count correctly reaches 3.
Regression test:
test('triple click increments by 3', async () => {
render(<Counter />);
const btn = screen.getByRole('button');
await userEvent.click(btn);
expect(btn).toHaveTextContent('Count: 3');
});Best Practices
- Never change code to fix a bug until you have confirmed the root cause — you may fix a symptom and leave the root cause in place
- Always write a failing test first that captures the bug before fixing it
- Use the scientific method: one hypothesis, one experiment, one result at a time
- Keep a short "debugging journal" for complex bugs to avoid revisiting dead ends
print/console.logdebugging is valid — use it freely, then clean up- Check assumptions at every step: types, values, order of execution, scope
Common Mistakes
- Fixing symptoms instead of root causes (the bug returns in a different form)
- Changing multiple things at once and not knowing which change fixed it
- Assuming the bug is in your code when it's in a library (or vice versa)
- Skipping reproduction and trying to reason about the bug abstractly
- Forgetting to check environment differences (local vs CI, dev vs prod, Python 3.10 vs 3.11)
- Not adding a regression test after fixing, allowing the bug to recur
Tips & Tricks
git bisectis the fastest way to find a regression in a large commit history- Rubber duck debugging: explain the bug out loud step by step — the explanation often reveals the answer
- For async/concurrency bugs, add timestamps to logs to see actual execution order
- Browser DevTools "Break on exception" or Python's
pdb.post_mortem()drops you into the frame where the error occurred - For intermittent bugs, log everything and search for patterns across multiple occurrences
Related Skills
- code-reviewer
- test-writer
- security-auditor
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.

