error-resolver

12
2
Source

Systematic error diagnosis and resolution using first-principle analysis. Use when encountering any error message, stack trace, or unexpected behavior. Supports replay functionality to record and reuse solutions.

Install

mkdir -p .claude/skills/error-resolver && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2092" && unzip -o skill.zip -d .claude/skills/error-resolver && rm skill.zip

Installs to .claude/skills/error-resolver

About this skill

Error Resolver

A first-principle approach to diagnosing and resolving errors across all languages and frameworks.

Core Philosophy

The 5-step Error Resolution Process:

1. CLASSIFY  ->  2. PARSE  ->  3. MATCH  ->  4. ANALYZE  ->  5. RESOLVE
     |              |             |             |              |
  What type?    Extract key    Known       Root cause      Fix +
               information    pattern?     analysis       Prevent

Quick Start

When you encounter an error:

  1. Paste the full error (including stack trace if available)
  2. Provide context (what were you trying to do?)
  3. Share relevant code (the file/function involved)

Error Classification Framework

Primary Categories

CategoryIndicatorsCommon Causes
SyntaxParse error, Unexpected tokenTypos, missing brackets, invalid syntax
TypeTypeError, type mismatchWrong data type, null/undefined access
ReferenceReferenceError, NameErrorUndefined variable, scope issues
RuntimeRuntimeError, ExceptionLogic errors, invalid operations
NetworkECONNREFUSED, timeout, 4xx/5xxConnection issues, wrong URL, server down
PermissionEACCES, PermissionErrorFile/directory access, sudo needed
DependencyModuleNotFound, Cannot find moduleMissing package, version mismatch
ConfigurationConfig error, env missingWrong settings, missing env vars
DatabaseConnection refused, query errorDB down, wrong credentials, bad query
MemoryOOM, heap out of memoryMemory leak, large data processing

Secondary Attributes

  • Severity: Fatal / Error / Warning / Info
  • Scope: Build-time / Runtime / Test-time
  • Origin: User code / Framework / Third-party / System

Analysis Workflow

Step 1: Classify

Identify the error category by examining:

  • Error name/code (e.g., ENOENT, TypeError)
  • Error message keywords
  • Where it occurred (compile, runtime, test)

Step 2: Parse

Extract key information:

- Error code: [specific code if any]
- File path: [where the error originated]
- Line number: [exact line if available]
- Function/method: [context of the error]
- Variable/value: [what was involved]
- Stack trace depth: [how deep is the call stack]

Step 3: Match Patterns

Check against known error patterns:

  • See patterns/ directory for language-specific patterns
  • Match error signatures to known solutions
  • Check replay history for previous solutions

Step 4: Root Cause Analysis

Apply the 5 Whys technique:

Error: Cannot read property 'name' of undefined
  Why 1? -> user object is undefined
  Why 2? -> API call returned null
  Why 3? -> User ID doesn't exist in database
  Why 4? -> ID was from stale cache
  Why 5? -> Cache invalidation not implemented

Root Cause: Missing cache invalidation logic

Step 5: Resolve

Generate actionable solution:

  1. Immediate fix - Get it working now
  2. Proper fix - The right way to solve it
  3. Prevention - How to avoid in the future

Output Format

When resolving an error, provide:

## Error Diagnosis

**Classification**: [Category] / [Severity] / [Scope]

**Error Signature**:
- Code: [error code]
- Type: [error type]
- Location: [file:line]

## Root Cause

[Explanation of why this error occurred]

**Contributing Factors**:
1. [Factor 1]
2. [Factor 2]

## Solution

### Immediate Fix
[Quick steps to resolve]

### Code Change
[Specific code to add/modify]

### Verification
[How to verify the fix works]

## Prevention

[How to prevent this error in the future]

## Replay Tag

[Unique identifier for this solution - for future reference]

Replay System

The replay system records successful solutions for future reference.

Recording a Solution

After resolving an error, record it:

# Create solution record in project
mkdir -p .claude/error-solutions

# Solution file format: [error-type]-[hash].yaml

Solution Record Format

# .claude/error-solutions/[error-signature].yaml
id: "nodejs-module-not-found-express"
created: "2024-01-15T10:30:00Z"
updated: "2024-01-20T14:22:00Z"

error:
  type: "dependency"
  category: "ModuleNotFound"
  language: "nodejs"
  pattern: "Cannot find module 'express'"
  context: "npm project, missing dependency"

diagnosis:
  root_cause: "Package not installed or node_modules corrupted"
  factors:
    - "Missing npm install after git clone"
    - "Corrupted node_modules directory"
    - "Package not in package.json"

solution:
  immediate:
    - "Run: npm install express"
  proper:
    - "Check package.json has express listed"
    - "Run: rm -rf node_modules && npm install"
  code_change: null

verification:
  - "Run the application again"
  - "Check express is in node_modules"

prevention:
  - "Add npm install to project setup docs"
  - "Use npm ci in CI/CD pipelines"

metadata:
  occurrences: 5
  last_resolved: "2024-01-20T14:22:00Z"
  success_rate: 1.0
  tags: ["nodejs", "npm", "dependency"]

Replay Lookup

When encountering an error:

  1. Generate error signature from the error message
  2. Search .claude/error-solutions/ for matching patterns
  3. If found, apply the recorded solution
  4. If new, proceed with full analysis and record the solution

Error Signature Generation

signature = hash(
  error_type +
  error_code +
  normalized_message +  # remove specific values
  language +
  framework
)

Example transformations:

  • Cannot find module 'express' -> Cannot find module '{module}'
  • TypeError: Cannot read property 'name' of undefined -> TypeError: Cannot read property '{prop}' of undefined

Debug Commands

Useful commands during debugging:

Node.js

# Verbose error output
NODE_DEBUG=* node app.js

# Memory debugging
node --inspect app.js

# Check installed packages
npm ls [package-name]

# Verify package.json
npm ls --depth=0

Python

# Debug mode
python -m pdb script.py

# Check installed packages
pip show [package-name]
pip list

General

# Check file permissions
ls -la [file]

# Check port usage
lsof -i :[port]
netstat -an | grep [port]

# Check environment variables
env | grep [VAR_NAME]
printenv [VAR_NAME]

# Check disk space
df -h

# Check memory
free -m  # Linux
vm_stat  # macOS

Common Debugging Patterns

Pattern 1: Binary Search

When the error location is unclear:

  1. Comment out half the code
  2. If error persists, it's in the remaining half
  3. Repeat until you find the exact line

Pattern 2: Minimal Reproduction

Create the smallest code that reproduces the error:

  1. Start with empty file
  2. Add code piece by piece
  3. Stop when error appears
  4. That's your minimal repro case

Pattern 3: Rubber Duck Debugging

Explain the problem out loud (or to Claude):

  1. What should happen?
  2. What actually happens?
  3. What changed recently?
  4. What assumptions am I making?

Pattern 4: Git Bisect

Find which commit introduced the bug:

git bisect start
git bisect bad  # current commit is bad
git bisect good [last-known-good-commit]
# Git will checkout commits for you to test
git bisect good/bad  # mark each as good or bad
git bisect reset  # when done

Reference Files

  • patterns/ - Language-specific error patterns

    • nodejs.md - Node.js common errors
    • python.md - Python common errors
    • react.md - React/Next.js errors
    • database.md - Database errors
    • docker.md - Docker/container errors
    • git.md - Git errors
    • network.md - Network/API errors
  • analysis/ - Analysis methodologies

    • stack-trace.md - Stack trace parsing guide
    • root-cause.md - Root cause analysis techniques
  • replay/ - Replay system

    • solution-template.yaml - Template for recording solutions

scroll-experience

davila7

Expert in building immersive scroll-driven experiences - parallax storytelling, scroll animations, interactive narratives, and cinematic web experiences. Like NY Times interactives, Apple product pages, and award-winning web experiences. Makes websites feel like experiences, not just pages. Use when: scroll animation, parallax, scroll storytelling, interactive story, cinematic website.

6230

software-architecture

davila7

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

8125

senior-fullstack

davila7

Comprehensive fullstack development skill for building complete web applications with React, Next.js, Node.js, GraphQL, and PostgreSQL. Includes project scaffolding, code quality analysis, architecture patterns, and complete tech stack guidance. Use when building new projects, analyzing code quality, implementing design patterns, or setting up development workflows.

8122

senior-security

davila7

Comprehensive security engineering skill for application security, penetration testing, security architecture, and compliance auditing. Includes security assessment tools, threat modeling, crypto implementation, and security automation. Use when designing security architecture, conducting penetration tests, implementing cryptography, or performing security audits.

6819

game-development

davila7

Game development orchestrator. Routes to platform-specific skills based on project needs.

5414

2d-games

davila7

2D game development principles. Sprites, tilemaps, physics, camera.

4812

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.