code-debugging — Claude Code skill: what it does, how to install
Structured error analysis for ML experiments and research code. It categorizes tracebacks, limits retry cycles, and explains fixes line by line.
npx skills add lingzhi227/agent-research-skills --skill code-debugging -a claude-codeWhat code-debugging does
The skill organizes debugging into severity levels. Syntax and import issues receive an immediate one-shot fix. Runtime errors like matrix shape mismatches or division by zero trigger a retry loop with up to four attempts. For severe logic bugs such as zero percent model accuracy, the workflow inspects metric calculations and the data pipeline. When error logs run too long, it clips the traceback to the final 1500 characters.
A multi-stage machine governs code adjustments. First attempts repost the script clean, followed by targeted patch attempts, and finally a full regeneration if failures persist. Small edits take priority over rewriting entire files. The agent caps debugging at four to five attempts before switching tactics, because repeating failed patches wastes context.
What it helps with
- resolve CPU and GPU device tensor mismatches
- diagnose zero percent accuracy in machine learning benchmarks
- handle computation timeouts with early stopping and smaller batches
- trim bloated error logs down to the last 1500 characters
Example prompts for the agent
- Debug this matrix multiplication failure in
train.py:RuntimeError: shape mismatch - My evaluation script yields 0% accuracy, inspect the metric logic and data pipeline
- Resolve a timeout in
experiment.pyby finding the bottleneck and adding early stopping
How to install code-debugging
1Skills CLI (Vercel)
npx skills add lingzhi227/agent-research-skills --skill code-debugging -a claude-code2Manually: put the files in place
~/.claude/skills/code-debugging/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/code-debugging/
1Skills CLI (Vercel)
npx skills add lingzhi227/agent-research-skills --skill code-debugging -a codex2Manually: put the files in place
.agents/skills/code-debugging/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add lingzhi227/agent-research-skills --skill code-debugging -a cursor2Manually: put the files in place
.cursor/skills/code-debugging/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install lingzhi227/agent-research-skills code-debugging2Manually: put the files in place
.github/skills/code-debugging/SKILL.md1Skills CLI (Vercel)
npx skills add lingzhi227/agent-research-skills --skill code-debugging -a gemini-cli2Platform CLI
gemini skills install https://github.com/lingzhi227/agent-research-skills --path skills/code-debuggingManually: put the files in place
.devin/skills/code-debugging/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add lingzhi227/agent-research-skills --skill code-debugging -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about code-debugging
How to install code-debugging in Claude Code?
Run npx skills add lingzhi227/agent-research-skills --skill code-debugging -a claude-code. The skill will be placed in ~/.claude/skills/code-debugging/.
What does the code-debugging skill do?
It parses execution failures, identifies root causes, and systematically applies fixes. Once resolved, it provides a line-by-line explanation of the patch and notes patterns to avoid.
How many retries does the skill perform on runtime failures?
It allows up to 4 rerun attempts for runtime errors, with a hard cap of 4 to 5 total attempts before changing the approach completely.