Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
lingzhi227 avatar

Code Debugging

  • 1.3k installs
  • 255 repo stars
  • Updated February 27, 2026
  • lingzhi227/agent-research-skills

code-debugging provides documented workflows for Debug experiment code with structured error analysis. Categorize errors, apply targeted fixes with retry logic, and use reflection to prevent recurring issues.

About

The code-debugging skill debug experiment code with structured error analysis. Categorize errors, apply targeted fixes with retry logic, and use reflection to prevent recurring issues. Use when experiment code fails or produces incorrect results. # Code Debugging Systematically debug experiment code with structured error categorization and fix strategies. ## Input - `$0` - Error message, stderr output, or code file with issues - `$1` - Optional: the code that produced the error ## References - Debug patterns and state machine: `~/.claude/skills/code-debugging/references/debug-patterns.md` ## Workflow ### Step 1: Categorize the Error | Category | Examples | Severity | |----------|----------|----------| | SyntaxError | Invalid syntax, indentation | Low | | ImportError | Missing module, wrong name | Low | | RuntimeError | Division by zero, shape mismatch | Medium | | TimeoutError | Infinite loop, too slow | Medium | | OutputError | Missing files, wrong format | Medium | | LogicError | Wrong results, 0% accuracy | High | ### Step 2: Analyze Root Cause 1. Read the error traceback (last 1500 chars if truncated) 2. Identify the exact line and variable causing the error 3.

  • `$0` - Error message, stderr output, or code file with issues
  • `$1` - Optional: the code that produced the error
  • Debug patterns and state machine: `~/.claude/skills/code-debugging/references/debug-patterns.md`
  • Read the error traceback (last 1500 chars if truncated)
  • Identify the exact line and variable causing the error

Code Debugging by the numbers

  • 1,284 all-time installs (skills.sh)
  • +37 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #245 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

code-debugging capabilities & compatibility

Capabilities
`$0` error message, stderr output, or code fil · `$1` optional: the code that produced the erro · debug patterns and state machine: `~/.claude/ski · read the error traceback (last 1500 chars if tru · identify the exact line and variable causing the
Use cases
documentation · planning
From the docs

What code-debugging says it does

# Code Debugging Systematically debug experiment code with structured error categorization and fix strategies.
SKILL.md
Read the error traceback (last 1500 chars if truncated) 2.
SKILL.md
npx skills add https://github.com/lingzhi227/agent-research-skills --skill code-debugging

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.3k
repo stars255
Security audit3 / 3 scanners passed
Last updatedFebruary 27, 2026
Repositorylingzhi227/agent-research-skills

How do I use code-debugging for the task described in its SKILL.md triggers?

Debug experiment code with structured error analysis. Categorize errors, apply targeted fixes with retry logic, and use reflection to prevent recurring issues. Use when experiment code fails or produ.

Who is it for?

Teams invoking code-debugging when the user request matches documented triggers and prerequisites.

Skip if: Skip when cached docs are missing, the request is a negative trigger, or another sibling skill owns the workflow.

When should I use this skill?

Debug experiment code with structured error analysis. Categorize errors, apply targeted fixes with retry logic, and use reflection to prevent recurring issues. Use when experiment code fails or produces incorrect results

What you get

Step-by-step guidance grounded in code-debugging documentation and reference files.

  • error classification report
  • prioritized fix plan
  • resolved agent-generated code

By the numbers

  • Defines an 11-level CodeProblem severity hierarchy
  • Sourced from data-to-paper, AI-Scientist-v2, and AgentLaboratory

Files

SKILL.mdMarkdownGitHub ↗

Code Debugging

Systematically debug experiment code with structured error categorization and fix strategies.

Input

  • $0 — Error message, stderr output, or code file with issues
  • $1 — Optional: the code that produced the error

References

  • Debug patterns and state machine: ~/.claude/skills/code-debugging/references/debug-patterns.md

Workflow

Step 1: Categorize the Error

CategoryExamplesSeverity
SyntaxErrorInvalid syntax, indentationLow
ImportErrorMissing module, wrong nameLow
RuntimeErrorDivision by zero, shape mismatchMedium
TimeoutErrorInfinite loop, too slowMedium
OutputErrorMissing files, wrong formatMedium
LogicErrorWrong results, 0% accuracyHigh

Step 2: Analyze Root Cause

1. Read the error traceback (last 1500 chars if truncated) 2. Identify the exact line and variable causing the error 3. Check for common patterns:

  • Device mismatch (CPU vs GPU tensors)
  • Shape mismatch in matrix operations
  • Missing data normalization
  • Off-by-one errors in indexing
  • Incorrect loss function for task type

Step 3: Apply Fix Strategy

For syntax/import errors: Direct fix, single attempt For runtime errors: Fix and rerun, up to 4 retries For logic errors: Reflect on approach, consider alternative methods For timeout: Reduce dataset size, optimize bottleneck, add early stopping

Step 4: Reflect and Prevent

After fixing: 1. Explain why the error occurred 2. Identify which lines caused it 3. Describe the fix line-by-line 4. Note patterns to avoid in future code

Fix Strategy State Machine

Stage 0 (first attempt) → repost code as fresh
Stage 1 (second attempt) → repost or leave depending on severity
Stage 2 (third attempt) → regenerate from scratch if still failing

Rules

  • Prefer minimal targeted edits over full rewrites
  • Maximum 4-5 fix attempts before changing approach
  • Always truncate long error outputs to last 1500 characters
  • After fixing, verify the fix doesn't introduce new errors
  • Keep error history to avoid repeating the same mistakes
  • If 0% accuracy: check accuracy calculation first, then check data pipeline

Related Skills

  • Upstream: experiment-code
  • See also: paper-to-code, data-analysis

Related skills

Forks & variants (2)

Code Debugging has 2 known copies in the catalog totaling 13 installs. They canonicalize to this original listing.

FAQ

What does code-debugging do?

Debug experiment code with structured error analysis. Categorize errors, apply targeted fixes with retry logic, and use reflection to prevent recurring issues. Use when experiment code fails or produces incorrect results

When should I use code-debugging?

Debug experiment code with structured error analysis. Categorize errors, apply targeted fixes with retry logic, and use reflection to prevent recurring issues. Use when experiment code fails or produces incorrect results

What are common prerequisites?

--- name: code-debugging description: Debug experiment code with structured error analysis.

Is Code Debugging safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.