/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".
$ npx -y skills add wasabeef/claude-code-cookbook --skill fix-error --agent claude-codeHow 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.mddescription: '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
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
A collection of commands, roles, and automation scripts for Claude Code. Automate your workflow without unnecessary confirmations, allowing you to focus on what matters.
Repo: wasabeef/claude-code-cookbook
Other skills on claude-code-cookbook.
- /analyze-dependencies
Analyze project dependencies and evaluate architectural health. Trigger with "analyze dependencies", "detect circular dependencies", "architecture issues?", "check module coupling", "find layer violations". Generates dependency matrix, fan-in/fan-out analysis, and prioritized
Open skill - /analyze-performance
Performance analysis based on Core Web Vitals with UX scoring. Trigger with "analyze performance", "improve speed", "check Core Web Vitals", "page speed", "improve LCP", "identify performance issues".
Open skill - /check-fact
Verify information accuracy against codebase and documentation. Trigger with "is this correct?", "fact check", "verify this", "is this accurate?".
Open skill - /check-prompt
Evaluate and improve AI prompt quality. Trigger with "check this prompt", "evaluate prompt quality", "improve this prompt".
Open skill - /commit-message
Generate commit messages from staged changes. Trigger with "suggest commit message", "generate commit message", "what should the commit say?", "write commit message".
Open skill - /context7
Search technical documentation via Context7 MCP. Trigger with "check the docs", "look up documentation", "how to use this library?", "API reference".
Open skill

