/error-memory:error-handlingfrom error-memory
Recognizes errors during development, searches past solutions, and logs new fixes for future reference.
Ships in error-memory. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Handle errors intelligently by leveraging past solutions and building a knowledge base of fixes.
Recognize errors from multiple sources:
| Source | Indicators |
|---|---|
| Bash commands | Non-zero exit code, stderr output, error keywords |
| Playwright/Browser | Console errors, network failures, page crashes |
| Log files | Error patterns in file content |
| Build output | Compilation failures, missing dependencies |
| API responses | HTTP 4xx/5xx status codes, error JSON |
| User messages | User describes or pastes an error |
Error type keywords to watch for:
Fatal error, SQLSTATE, Exception, Class not foundTypeError, ReferenceError, Cannot find moduleTraceback, ImportError, AttributeErrorConnection refused, Access denied, Table doesn't existcontainer is not running, port already allocatedWhen an error is encountered:
# Search the error memory database
bash $CLAUDE_PLUGIN_ROOT/scripts/search.sh "<error message>" --max 5
Interpret confidence levels:
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"]
}'
Classify errors by their origin for better matching:
| Source | When to Use |
|---|---|
bash | Errors from shell commands, scripts, CLI tools |
playwright | Browser errors, page load failures, element not found |
read | Errors found when reading log files or error outputs |
user | Errors the user describes or pastes directly |
build | Compilation errors, asset building failures |
api | HTTP errors, API response errors |
other | Anything that doesn't fit above categories |
Use consistent tags for better searchability:
Technology tags:
php, javascript, python, typescriptlaravel, react, vue, filament, livewiredocker, composer, npm, gitDomain tags:
database, api, auth, forms, validationrouting, middleware, permissions, migrationstesting, deployment, configurationError type tags:
connection, syntax, runtime, type-errormissing-dependency, permission, timeout| Command | Purpose |
|---|---|
/error-memory:search <query> | Search for similar errors |
/error-memory:log | Log a new error interactively |
/error-memory:list | List all stored errors |
/error-memory:show <id> | View full error details |
/error-memory:stats | View database statistics |
/error-memory:migrate | Import from old solved-errors.md |
/error-memory:init | Initialize the database |
If about to run a command that commonly fails:
Watch for recurring error patterns:
The error memory system enhances the existing CLAUDE.md instruction to log errors to ~/.claude/solved-errors.md by providing:
The old solved-errors.md can be migrated with /error-memory:migrate.
For detailed error patterns and matching algorithm:
references/error-patterns.md - Common error patterns by technologyWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mwguerra/claude-code-plugins --plugin error-memoryOther plugins' skills for the same job