New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Error-tracking plugin that recalls past fixes for recurring errors with confidence-scored matches.

version
1.0.0
GitHub stars
36
View on GitHub

What it does

  • Adds 7 commands (/init, /list, /log, /migrate, /search, /show, /stats) and an error-handling skill for error lookup
  • Covers logging solved errors, searching them, and reviewing stats, with multi-level matching and confidence scores
  • Includes a hook defined in hooks.json that runs alongside the error-handling skill during debugging sessions
  • Designed for developers who repeatedly hit the same errors and want past solutions surfaced instantly

Intelligent error tracking and solution recall system. Learns from every error you solve, providing instant access to past solutions with multi-level matching and confidence scores.

Add marketplace

/plugin marketplace add mwguerra/claude-code-plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install error-memory@mwguerra-marketplace

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Error Handling Skill

Handle errors intelligently by leveraging past solutions and building a knowledge base of fixes.

Core Workflow

When Encountering an Error

  1. Recognize the error - Identify the error message and its type
  2. Search for solutions - Check if a similar error was solved before
  3. Apply or adapt - Use the found solution or develop a new one
  4. Log for future - After solving, log the error and solution

Error Recognition

Recognize errors from multiple sources:

SourceIndicators
Bash commandsNon-zero exit code, stderr output, error keywords
Playwright/BrowserConsole errors, network failures, page crashes
Log filesError patterns in file content
Build outputCompilation failures, missing dependencies
API responsesHTTP 4xx/5xx status codes, error JSON
User messagesUser describes or pastes an error

Error type keywords to watch for:

  • PHP/Laravel: Fatal error, SQLSTATE, Exception, Class not found
  • JavaScript: TypeError, ReferenceError, Cannot find module
  • Python: Traceback, ImportError, AttributeError
  • Database: Connection refused, Access denied, Table doesn't exist
  • Docker: container is not running, port already allocated

Searching for Solutions

When an error is encountered:

# Search the error memory database
bash $CLAUDE_PLUGIN_ROOT/scripts/search.sh "<error message>" --max 5

Interpret confidence levels:

  • 100%: Exact match - apply solution directly
  • 70-99%: Very similar - solution likely works, may need minor adaptation
  • 50-69%: Related error - review solution for applicability
  • 30-49%: Loosely related - use as reference only

Logging New Errors

After solving an error not found in the database:

bash $CLAUDE_PLUGIN_ROOT/scripts/log-error.sh --json '{
  "errorMessage": "<full error message>",
  "project": "<project name>",
  "projectPath": "<working directory>",
  "source": "<bash|playwright|read|user|build|api|other>",
  "whatHappened": "<what was being done when error occurred>",
  "cause": "<root cause of the error>",
  "solution": "<how it was fixed>",
  "rationale": "<why the solution works>",
  "fileChanged": "<optional: file that was modified>",
  "codeBefore": "<optional: code before fix>",
  "codeAfter": "<optional: code after fix>",
  "tags": ["tag1", "tag2"]
}'

Error Source Classification

Classify errors by their origin for better matching:

SourceWhen to Use
bashErrors from shell commands, scripts, CLI tools
playwrightBrowser errors, page load failures, element not found
readErrors found when reading log files or error outputs
userErrors the user describes or pastes directly
buildCompilation errors, asset building failures
apiHTTP errors, API response errors
otherAnything that doesn't fit above categories

Tagging Guidelines

Use consistent tags for better searchability:

Technology tags:

  • Languages: php, javascript, python, typescript
  • Frameworks: laravel, react, vue, filament, livewire
  • Tools: docker, composer, npm, git

Domain tags:

  • database, api, auth, forms, validation
  • routing, middleware, permissions, migrations
  • testing, deployment, configuration

Error type tags:

  • connection, syntax, runtime, type-error
  • missing-dependency, permission, timeout

Available Commands

CommandPurpose
/error-memory:search <query>Search for similar errors
/error-memory:logLog a new error interactively
/error-memory:listList all stored errors
/error-memory:show <id>View full error details
/error-memory:statsView database statistics
/error-memory:migrateImport from old solved-errors.md
/error-memory:initInitialize the database

Proactive Error Handling

Before Running Commands

If about to run a command that commonly fails:

  1. Consider what errors might occur
  2. Have error handling ready (try/catch, error codes)
  3. Know where to look for solutions

After Errors Occur

  1. Don't immediately retry the same thing
  2. Search for the error first
  3. Understand the cause before applying a fix
  4. Verify the fix actually resolved the issue
  5. Log the solution for future reference

Recognizing Patterns

Watch for recurring error patterns:

  • Same error type across projects → systemic issue
  • Same project with multiple errors → architectural problem
  • Same tag appearing often → skill gap to address

Integration with CLAUDE.md

The error memory system enhances the existing CLAUDE.md instruction to log errors to ~/.claude/solved-errors.md by providing:

  • Structured storage instead of markdown
  • Intelligent search with fuzzy matching
  • Usage tracking and statistics
  • Automatic error detection via hooks

The old solved-errors.md can be migrated with /error-memory:migrate.

Additional Resources

For detailed error patterns and matching algorithm:

  • references/error-patterns.md - Common error patterns by technology

From the mwguerra/claude-code-plugins README

mwguerra Claude Code Plugins

A collection of Claude Code plugins for development workflows.

Installation

# Add the marketplace
/plugin marketplace add mwguerra/claude-code-plugins

# Browse and install plugins
/plugin

Available Plugins

article-writer

Create publication-ready technical articles with author voice profiles, web research, runnable code examples, and multi-language output. Supports interactive single-article creation or autonomous batch processing.

/plugin install article-writer@mwguerra-marketplace

code

Production readiness toolkit with code cleanup, comprehensive analysis, and automated testing. Removes debug artifacts for clean commits, runs Pest and Playwright tests, and prepares apps for deployment.

/plugin install code@mwguerra-marketplace

docs-specialist

Generate and maintain documentation from code with drift detection. Validates docs against source, auto-generates from code patterns, syncs outdated content, and provides reusable templates.

/plugin install docs-specialist@mwguerra-marketplace

docker-local

Expert agent for docker-local (mwguerra/docker-local) Laravel Docker development environment. Manages Docker services, diagnoses issues, checks project conflicts, handles database operations, and troubleshoots environment setup.

/plugin install docker-local@mwguerra-marketplace

docker-specialist

Docker and Docker Compose expert with complete documentation. Generates Dockerfiles, compose configs, database containers, SSL/TLS setup with Traefik or Nginx, and provides troubleshooting.

/plugin install docker-specialist@mwguerra-marketplace

e2e-test-specialist

Comprehensive E2E testing using Playwright MCP. Creates detailed test plans, tests all pages for errors, verifies user flows by role, and runs visual browser tests with full coverage.

/plugin install e2e-test-specialist@mwguerra-marketplace

filament-specialist

Expert FilamentPHP v4 assistant with complete official documentation. Generates resources, forms, tables, actions, widgets, infolists, and Pest tests following v4 patterns.

/plugin install filament-specialist@mwguerra-marketplace

laravel-filament-package-development-specialist

Scaffold and develop Laravel packages and Filament plugins with full testing support. Creates package structure, configures Pest testing, sets up GitHub Actions CI.

/plugin install laravel-filament-package-development-specialist@mwguerra-marketplace

post-development

App launch preparation toolkit with SEO analysis, automated screenshots, buyer persona creation, social media ad generation, technical article writing, and landing page proposals.

/plugin install post-development@mwguerra-marketplace

taskmanager

Plan and execute tasks from PRDs with hierarchical subtasks, dependency tracking, and project memories. Features dashboard visualization, autonomous batch execution, and persistent memory.

/plugin install taskmanager@mwguerra-marketplace

terminal-specialist

Terminal and shell systems expert with comprehensive documentation. Covers TTY/PTY architecture, stdin/stdout/stderr streams, signals, ANSI escape sequences, job control, and terminal modes.

/plugin install terminal-specialist@mwguerra-marketplace

test-specialist

Proactive Pest 4 testing for PHP, Laravel, Livewire, and Filament apps. Auto-generates tests for models, controllers, policies, and Livewire components. Analyzes coverage gaps.

/plugin install test-specialist@mwguerra-marketplace

obsidian-vault

Manage an Obsidian vault as your development knowledge base and automatic work journal. Auto-captures commits, tasks, and Claude Code components with structured frontmatter.

/plugin install obsidian-vault@mwguerra-marketplace

error-memory

Intelligent error tracking and solution recall system. Learns from every error you solve, providing instant access to past solutions with multi-level matching and confidence scores.

/plugin install error-memory@mwguerra-marketplace

prd-builder

Interactive PRD (Product Requirements Document) builder with comprehensive interview-driven discovery, gap analysis, and taskmanager integration.

/plugin install prd-builder@mwguerra-marketplace

my-workflow

Personal workflow management combining assistant, secretary, and executive roles. Tracks sessions, commitments, decisions, and goals. Integrates with GitHub and Obsidian vault. Provides intelligent briefings and productivity insights.

/plugin install my-workflow@mwguerra-marketplace

Reinstall Script

If you need to completely reinstall all marketplace plugins (useful after updates or to fix issues), add this script to ~/.claude/reinstall_marketplace.sh:

#!/bin/bash

# Delete marketplaces cleanup script
# Removes marketplace plugins and related configuration

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

echo "Cleaning up marketplace plugins..."

# Delete installed_plugins.json
if [ -f "$SCRIPT_DIR/plugins/installed_plugins.json" ]; then
    rm "$SCRIPT_DIR/plugins/installed_plugins.json"
    echo "Deleted: plugins/installed_plugins.json"
else
    echo "Not found: plugins/installed_plugins.json"
fi

# Delete marketplaces folder
if [ -d "$SCRIPT_DIR/plugins/marketplaces" ]; then
    rm -rf "$SCRIPT_DIR/plugins/marketplaces"
    echo "Deleted: plugins/marketplaces/"
else
    echo "Not found: plugins/marketplaces/"
fi

if [ -d "$SCRIPT_DIR/plugins/cache" ]; then
    rm -rf "$SCRIPT_DIR/plugins/cache"
    echo "Deleted: plugins/cache/"
else
    echo "Not found: plugins/cache/"
fi

# Remove enabledPlugins from settings.json using jq or sed
if [ -f "$SCRIPT_DIR/settings.json" ]; then
    if command -v jq &> /dev/null; then
        # Use jq if available
        jq 'del(.enabledPlugins)' "$SCRIPT_DIR/settings.json" > "$SCRIPT_DIR/settings.json.tmp" && \
        mv "$SCRIPT_DIR/settings.json.tmp" "$SCRIPT_DIR/settings.json"
        echo "Removed enabledPlugins from settings.json"
    else
        # Fallback to Python if jq not available
        python3 -c "
import json
with open('$SCRIPT_DIR/settings.json', 'r') as f:
    data = json.load(f)
if 'enabledPlugins' in data:
    del data['enabledPlugins']
with open('$SCRIPT_DIR/settings.json', 'w') as f:
    json.dump(data, f, indent=2)
    f.write('\n')
"
        echo "Removed enabledPlugins from settings.json"
    fi
else
    echo "Not found: settings.json"
fi

# Function to reinstall a marketplace and all its plugins
reinstall_marketplace() {
    local marketplace_name="$1"
    local marketplace_repo="$2"
    local marketplace_dir="$SCRIPT_DIR/plugins/marketplaces/$marketplace_name"

    echo "Reinstalling marketplace: $marketplace_name"
    claude plugin marketplace remove "$marketplace_name"
    claude plugin marketplace add "$marketplace_repo"

    if [ -d "$marketplace_dir" ]; then
        echo "Installing plugins from $marketplace_name..."
        for plugin_dir in "$marketplace_dir"/*/; do
            local plugin_name=$(basename "$plugin_dir")
            # Skip hidden directories (like .git, .claude-plugin)
            if [[ "$plugin_name" != .* ]]; then
                echo "Installing: $plugin_name@$marketplace_name"
                claude plugin install "$plugin_name@$marketplace_name"
            fi
        done
    else
        echo "Error: Marketplace directory not found at $marketplace_dir"
        return 1
    fi
}

# Reinstall marketplaces
reinstall_marketplace "mwguerra-marketplace" "mwguerra/claude-code-plugins"

# Make all .sh files executable in plugins directory
echo "Making .sh files executable in plugins directory..."
find "$SCRIPT_DIR/plugins" -name "*.sh" -type f -exec chmod +x {} \;
echo "Done setting permissions."

echo "Done!"

Usage:

# Make executable
chmod +x ~/.claude/reinstall_marketplace.sh

# Run to reinstall all plugins
~/.claude/reinstall_marketplace.sh

Requirements

  • Claude Code

License

MIT

Details

Marketplace
mwguerra/claude-code-plugins
Source
error-memory
Category
Development Tools
Keywords
errors, debugging, solutions, memory, learning, troubleshooting, exceptions, stack-traces, knowledge-base
Listed since
Apr 7, 2026

More from mwguerra/claude-code-plugins

All 18

Similar to error-memory

More Memory & Context