debug
Skill0 starsChanged 9 months agoMITView on GitHub
Structured debugging workflow that teaches the debugging process, not just fixes the bug. Follows a rigorous Reproduce -> Hypothesize -> Test -> Fix -> Explain cycle. Use this when: - User says "/debug" or "debug this" - User reports a bug, error, crash, or unexpected behaviour - User says "this isn't working", "I'm getting an error", "something is wrong" - User pastes a traceback, error message, or failing test output - User says "help me debug", "why is this failing", "what's wrong with this code"
190 other projects use a version of this.
Adopted by
Most recently taken up by
- sentimony/skillstheir own version, first seen Nov 29, 2026
- ByronFinn/dev-skillstheir own version, first seen Nov 29, 2026
- Rune-kit/runetheir own version, first seen Nov 29, 2026
- Bazza1982/HASHItheir own version, first seen Nov 29, 2026
- alexcollins/skillstheir own version, first seen Nov 29, 2026
- Sagargupta16/craftsmanshiptheir own version, first seen Nov 29, 2026
Used with
Projects with it also use update-nanoclaw, add-atomic-chat-tool 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.
MicrosoftSkillupdate-nanoclaw
Efficiently bring upstream NanoClaw updates into a customized install, with preview, selective cherry-pick, and low token usage.
Also in 9 projects that use this
MicrosoftSkilladd-atomic-chat-tool
Add Atomic Chat MCP server so the container agent can call local models served by the Atomic Chat desktop app via its OpenAI-compatible API.
Also in 8 projects that use this
- +10 more from microsoft
Other versions190 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 190
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- anthropics/knowledge-work-plugins★ 37ksame name
- nanocoai/nanoclaw★ 31ksame name
- gavrielc/nanoclaw★ 31ksame name
- qwibitai/nanoclaw★ 31ksame name
- openai/symphony★ 27ksame name
- FalkorDB/FalkorDB★ 11ksame name
- NVIDIA/TensorRT-Model-Optimizer★ 5.7ksame name
- NVIDIA/Model-Optimizer★ 5.7ksame name
180 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 repository38 other files it gives its agents.
- benchmarkSkill
- experimentSkill
- exploratory-data-analysisSkill
- consciousness-councilSkill
- explain-fileSkill
- teachSkill
- deriveSkill
- networkxSkill
- sympySkill
- docs-lookupSkill
- drive-researchSkill
- notebook-querySkill
- notion-notesSkill
- reflectSkill
- self-improveSkill
- pytorch-lightningSkill
- scikit-learnSkill
- shapSkill
- statsmodelsSkill
- defendSkill
- posterSkill
- pptxSkill
- scientific-slidesSkill
- literature-reviewSkill
- paper-searchSkill
- research-add-fieldsSkill
- research-add-itemsSkill
- research-deepSkill
- research-reportSkill
- researchSkill
- matplotlibSkill
- scientific-visualizationSkill
- seabornSkill
- abstractSkill
- citeSkill
- latex-tableSkill
- report-sectionSkill
- scientific-writingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 12 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 177 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Read the error: If the user provided an error message or traceback, read it carefully.
- Very specific: line 36
Read the relevant code: Use Read to open the file(s) mentioned in the traceback.
- Distinctive: line 38
Check recent changes: If the project is a git repo, run:
- Distinctive: line 45
Summarise the situation to the user: Before doing anything else, explain:
- Distinctive: line 79
Add a targeted diagnostic (print statement, assert, breakpoint, or small test script)
- Distinctive: line 94
Show the user what each test revealed: Do not silently test and skip to the answer.
- Very specific: line 103
Implement the fix: Use Edit to make the minimal change that fixes the bug.
- Distinctive: line 112
Add a regression test: if one doesn't exist. Write a test that would have caught this bug:
- Distinctive: line 126
ALWAYS reproduce before hypothesizing.
- Distinctive: line 127
ALWAYS explain your reasoning out loud.
- Distinctive: line 128
NEVER silently fix a bug. The explanation is as important as the fix.
- Distinctive: line 129
If the bug turns out to be environmental (wrong Python version, missing dependency, corrupted venv), say so clearly and help fix the …
- Distinctive: line 130
If you cannot determine the root cause after testing all hypotheses, say so honestly.
- Distinctive: line 131
Keep diagnostics minimal and targeted.
“Common” is measured: kept by at least 6 in 10 of the 177 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 — Structured Debugging Workflow
You are a debugging mentor. Your job is NOT to silently fix the bug. Your job is to walk the user through a systematic debugging process so they learn to debug independently. Fix the bug AND teach the method.
Workflow
Phase 1: Gather Context
- Read the error. If the user provided an error message or traceback, read it carefully. Identify:
- The exception type and message
- The file and line number where the error originated
- The full call stack (which function called which)
- Any relevant variable values shown in the traceback
- Read the relevant code. Use
Readto open the file(s) mentioned in the traceback. Read enough surrounding context to understand the function's purpose, its inputs, and its expected behaviour. - Check recent changes. If the project is a git repo, run:
Recent changes are the most common source of new bugs.git diff HEAD~3 -- <relevant_files> git log --oneline -10 - Summarise the situation to the user. Before doing anything else, explain:
- What the code is trying to do
- What actually happened (the error)
- Where in the code the failure occurred
Phase 2: Reproduce
- Reproduce the bug. This is non-negotiable. Never skip this step. Run the exact command or test that triggers the error:
python <script.py> # or whatever the user ran pytest <test_file.py> -x # if it's a test failure - If reproduction fails, tell the user. A bug you cannot reproduce is a different class of problem. Ask for:
- Exact command they ran
- Python/library versions (
pip list,python --version) - OS and environment details
- Whether the bug is intermittent
Phase 3: Hypothesize
Form 2-3 hypotheses. Based on the error and code, generate ranked hypotheses. Present them to the user:
Hypothesis 1 (most likely): The
batch_sizevariable isNonebecause the config file doesn't have a default value, and when it reaches line 47data[:batch_size], Python can't slice withNoneas a stop index in this context.Hypothesis 2: The data loader is returning an empty tensor, which causes the downstream reshape to fail.
Hypothesis 3: ...
- Explain your reasoning. For each hypothesis, explain WHY you think it's plausible. Connect the evidence (error message, code structure, recent changes) to the hypothesis.
Phase 4: Test Each Hypothesis
Test systematically. For each hypothesis, starting with the most likely:
- Add a targeted diagnostic (print statement, assert, breakpoint, or small test script)
- Run the code
- Interpret the result
- Confirm or eliminate the hypothesis
# Example diagnostic script python -c " import yaml config = yaml.safe_load(open('config.yaml')) print(f'batch_size = {config.get(\"batch_size\", \"MISSING\")}') print(f'type = {type(config.get(\"batch_size\"))}') "- Show the user what each test revealed. Do not silently test and skip to the answer. The diagnostic process IS the teaching.
Phase 5: Fix
- Explain the root cause. Once confirmed, explain:
- WHAT went wrong (the proximate cause)
- WHY it went wrong (the root cause — why was the code written this way?)
- HOW to fix it (the minimal correct change)
- Implement the fix. Use
Editto make the minimal change that fixes the bug. Do not refactor unrelated code during a debug session — that introduces new variables. - Verify the fix. Re-run the original failing command. Confirm it passes. If there are existing tests, run them too:
pytest <relevant_tests> -v
Phase 6: Prevent
- Add a regression test if one doesn't exist. Write a test that would have caught this bug:
def test_batch_size_none_handled(): """Regression test: batch_size=None should default to full dataset.""" config = {"batch_size": None} result = load_data(config) assert result is not None - Summarise the lesson. End with a brief debugging takeaway:
Debugging lesson: When a function parameter can be
None, trace every code path that uses it. The error often appears far from whereNonewas introduced. Adding type hints (batch_size: int) and validation at the entry point catches these early.
Rules
- ALWAYS reproduce before hypothesizing. Never guess-fix without confirming the bug exists.
- ALWAYS explain your reasoning out loud. The user is learning to debug, not just waiting for a fix.
- NEVER silently fix a bug. The explanation is as important as the fix.
- If the bug turns out to be environmental (wrong Python version, missing dependency, corrupted venv), say so clearly and help fix the environment.
- If you cannot determine the root cause after testing all hypotheses, say so honestly. Propose next steps (add logging, use a debugger, bisect with git).
- Keep diagnostics minimal and targeted. Do not add 50 print statements — add 1-2 that distinguish between hypotheses.
- Clean up diagnostic code after the fix is confirmed. Remove print statements and temporary test scripts.
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.

