Log a new error and its solution to the error memory database
Records errors and their solutions in a database to build a reusable knowledge base.
/plugin marketplace add mwguerra/claude-code-plugins/plugin install error-memory@mwguerra-marketplaceLog a new error and its solution to build up the error memory database.
/error:log
This command is interactive - Claude will gather the required information from the current context and ask for any missing details.
Gather Error Information - Extract from the current conversation context:
Document the Analysis:
Capture Code Changes (if applicable):
Add Metadata:
Log the Error:
bash $CLAUDE_PLUGIN_ROOT/scripts/log-error.sh --json '{
"errorMessage": "<error message>",
"project": "<project name>",
"projectPath": "<path>",
"source": "<source>",
"whatHappened": "<context>",
"cause": "<why it happened>",
"solution": "<how it was fixed>",
"rationale": "<why the solution works>",
"fileChanged": "<file path>",
"codeBefore": "<code before>",
"codeAfter": "<code after>",
"tags": ["tag1", "tag2"]
}'
Use consistent, meaningful tags:
After solving a database connection error:
bash $CLAUDE_PLUGIN_ROOT/scripts/log-error.sh --json '{
"errorMessage": "SQLSTATE[HY000] [2002] Connection refused",
"project": "my-laravel-app",
"projectPath": "/home/user/projects/my-laravel-app",
"source": "bash",
"whatHappened": "Running php artisan migrate",
"cause": "Database container was not running",
"solution": "Start the database container with docker-compose up -d db",
"rationale": "Laravel needs an active database connection to run migrations",
"tags": ["laravel", "database", "docker", "connection"]
}'