agentsclimarketplace

Debug error

Skill huzaifa525/claude-code-optimizer/templates/.claude/skills/debug-error

Use when the user has an error, bug, stack trace, failing test, or unexpected behavior to diagnose.From its SKILL.md

Install
npx -y skills add huzaifa525/claude-code-optimizer --skill debug-error

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 3 commands, including `git log --oneline -10` and 2 more.

SKILL.md

1.5 KB, 342 tokens by cl100k_base, as published. Nobody here has run it

Debug and fix: $ARGUMENTS

Steps

  1. Parse the error

    • Identify error type (runtime, compile, type, network, etc.)
    • Extract file paths and line numbers from stack trace
    • Identify the error message
  2. Find the source

    • Read the file(s) mentioned in the stack trace
    • If no stack trace, Grep for the error message in codebase
    • Read surrounding code to understand context
  3. Trace the root cause

    • Follow the call chain backwards
    • Check recent git changes that might have caused it:
      git log --oneline -10
      git diff HEAD~3
      
    • Look for common causes: null/undefined, wrong types, missing imports, race conditions
  4. Implement the fix

    • Fix the root cause, not just the symptom
    • Handle edge cases that led to the error
  5. Verify

    • Run the failing scenario
    • Run related tests
    • Check for similar patterns elsewhere:
      grep -r "similar_pattern" src/
      
  6. Report

    ## Bug Fix Report
    
    ### Error
    [original error]
    
    ### Root Cause
    [why it happened]
    
    ### Fix
    [what was changed and why]
    
    ### Files Modified
    - [file] — [change]
    
    ### Verified
    - [how it was tested]
    
<!-- Skill by Huzefa Nalkheda Wala | github.com/huzaifa525 | claude-code-optimizer -->

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.