Skip to content
Development
Skill

/fix-error

Identify root cause from error messages and suggest proven solutions. Trigger with "fix this error", "resolve this error", "what is this error?", "fix build error", "resolve test failure".

From plugin
claude-code-cookbook
1.1k200 skills9 agents39 commands8 MCP
Install
$ npx -y skills add wasabeef/claude-code-cookbook --skill fix-error --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition โ†’
  • You can call itInvoke it directly when you want it.
  • Slash command/fix-error

Context preview

The summary Claude sees to decide when to auto-load this skill.

Identify root cause from error messages and suggest proven solutions. Trigger with "fix this error", "resolve this error", "what is this error?", "fix build error", "resolve test failure".

SKILL.md

fix-error.SKILL.md
description: 'Identify root cause from error messages and suggest proven solutions. Trigger with "fix this error", "resolve this error", "what is this error?", "fix build error", "resolve test failure".'
allowed-tools:
  - Read
  - Edit
  - Grep
  - Glob
  - Bash

Identify root cause and suggest proven solutions

Analyzes error messages to identify root causes, predict resolution time, and suggest proven fixes. Learns patterns from similar errors to provide immediate solutions.

Usage

/fix-error [options]

Options

  • None: Standard error analysis
  • `--deep`: Deep dive including dependencies and environment
  • `--preventive`: Focus on preventing future occurrences
  • `--quick`: Quick fixes only

Basic Examples

# Standard error analysis
npm run build 2>&1
/fix-error
"Analyze this build error and suggest fixes"

# Deep analysis mode
python app.py 2>&1
/fix-error --deep
"Find the root cause, including environment issues"

# Quick fixes only
cargo test 2>&1
/fix-error --quick
"Just give me a quick fix"

# Prevention-focused
./app 2>&1 | tail -50
/fix-error --preventive
"Fix this and help me prevent it next time"

Collaboration with Claude

# Analyze error logs
cat error.log
/fix-error
"What's causing this error and how do I fix it?"

# Resolve test failures
npm test 2>&1
/fix-error --quick
"These tests are failing - need a quick fix"

# Analyze stack traces
python script.py 2>&1
/fix-error --deep
"Dig into this stack trace and check for environment issues"

# Handle multiple errors
grep -E "ERROR|WARN" app.log | tail -20
/fix-error
"Sort these by priority and tell me how to fix each one"

Error Resolution Time Prediction

๐Ÿš€ Immediate Fix (< 5 minutes)
โ”œโ”€ Typos, missing imports
โ”œโ”€ Environment variables not set
โ”œโ”€ Undefined variable references
โ””โ”€ Predicted time: 2-5 minutes

โšก Quick Fix (< 30 minutes)
โ”œโ”€ Dependency version conflicts
โ”œโ”€ Configuration file errors
โ”œโ”€ Type mismatches
โ””โ”€ Predicted time: 10-30 minutes

๐Ÿ”ง Investigation Required (< 2 hours)
โ”œโ”€ Complex logic errors
โ”œโ”€ Async processing race conditions
โ”œโ”€ API integration issues
โ””โ”€ Predicted time: 30 minutes-2 hours

๐Ÿ”ฌ Deep Analysis (Half day or more)
โ”œโ”€ Architecture-related issues
โ”œโ”€ Multi-system integration problems
โ”œโ”€ Performance degradation
โ””โ”€ Predicted time: 4 hours-several days

Similar Error Pattern Database

Common Errors and Immediate Solutions
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

๐Ÿ“Š "Cannot read property 'X' of undefined/null" (Frequency: Extremely High)
โ”œโ”€ Primary cause: Insufficient null checks on objects
โ”œโ”€ Resolution time: 5-10 minutes
โ””โ”€ Solution: Add Optional chaining (?.) or null checks

๐Ÿ“Š "ECONNREFUSED" / "ENOTFOUND" (Frequency: High)
โ”œโ”€ Primary cause: Service not running or URL misconfiguration
โ”œโ”€ Resolution time: 5-15 minutes
โ””โ”€ Solution: Check service startup, environment variables

๐Ÿ“Š "Module not found" / "Cannot resolve" (Frequency: High)
โ”œโ”€ Primary cause: Package not installed, incorrect path
โ”œโ”€ Resolution time: 2-5 minutes
โ””โ”€ Solution: Run npm install, check relative paths

๐Ÿ“Š "Unexpected token" / "SyntaxError" (Frequency: Medium)
โ”œโ”€ Primary cause: Bracket/quote mismatch, reserved word usage
โ”œโ”€ Resolution time: 2-10 minutes
โ””โ”€ Solution: Check syntax highlighting, run linter

๐Ÿ“Š "CORS policy" / "Access-Control-Allow-Origin" (Frequency: Medium)
โ”œโ”€ Primary cause: Insufficient CORS configuration on server
โ”œโ”€ Resolution time: 15-30 minutes
โ””โ”€ Solution: Configure server CORS, setup proxy

๐Ÿ“Š "Maximum call stack size exceeded" (Frequency: Low)
โ”œโ”€ Primary cause: Infinite loops/recursion, circular references
โ”œโ”€ Resolution time: 30 minutes-2 hours
โ””โ”€ Solution: Check recursion termination conditions, resolve circular references

Error Analysis Priority Matrix

| Priority | Icon | Impact Range | Resolution Difficulty | Response Deadline | Description | | ----------------- | ------------------- | ------------ | --------------------- | ---------------------- | ------------------------------------------------ | | **Critical** | ๐Ÿ”ด Emergency | Wide | Low | Start within 15 min | System-wide outage, data loss risk | | **High Priority** | ๐ŸŸ  Early Response | Wide | High | Start within 1 hour | Major feature outage, many users affected | | **Medium** | ๐ŸŸก Planned Response | Narrow | High | Address same day | Partial feature limitation, workaround available | | **Low** | ๐ŸŸข Monitor | Narrow | Low | Next maintenance cycle | Minor bugs, minimal UX impact |

Analysis Process

Phase 1: Error Information Collection

๐Ÿ”ด Must have:
- Full error message
- Stack trace
- Steps to reproduce

๐ŸŸก Should have:
- Environment details (OS, versions, dependencies)
- Recent changes (git log, commits)
- Related logs

๐ŸŸข Nice to have:
- System resources
- Network state
- External services

Phase 2: Root Cause Analysis

1. **Identify symptoms**

  • Exact error message
  • When and how it happens
  • What's affected

2. **Find root causes**

  • Use 5 Whys analysis
  • Check dependencies
  • Compare environments

3. **Test your theory**

  • Create minimal repro
  • Isolate the issue
  • Confirm the cause

Phase 3: Solution Implementation

๐Ÿ”ด Quick fix (hotfix):
- Stop the bleeding
- Apply workarounds
- Get ready to deploy

๐ŸŸก Root cause fix:
- Fix the actual problem
- Add tests
- Update docs

๐ŸŸข Prevent future issues:
- Better error handling
- Add monitoring
- Improve CI/CD

Output Example

๐Ÿšจ Error Analysis Report
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

๐Ÿ“ Error Overview
โ”œโ”€ Type: [Compilation/Runtime/Logical/Environmental]
โ”œโ”€ Urgency: ๐Ÿ”ด High / ๐ŸŸก Medium / ๐ŸŸข Low
โ”œโ”€ Impact Scope: [Feature name/Component]
โ””โ”€ Reproducibility: [100% / Intermittent / Specifi
Read more
Ships withclaude-code-cookbook

A collection of commands, roles, and automation scripts for Claude Code. Automate your workflow without unnecessary confirmations, allowing you to focus on what matters.

Get the whole plugin