Install
openclaw skills install failure-memory-logAutomatic failure pattern recording and recall system. Prevents repeating the same mistakes by logging errors with context, root cause, and resolution. Use when: (1) a command/task fails and you want to record why, (2) starting a new task and want to check for known pitfalls, (3) reviewing accumulated failure patterns for learning, (4) agent makes an error and needs to log it for future prevention. Triggers: 'log failure', 'check failures', 'failure report', 'what went wrong', 'mistake log', or any error/failure during agent work.
openclaw skills install failure-memory-logRecord failures. Learn from them. Never repeat them.
Every failure has three parts:
This skill stores them in a searchable markdown file and provides a recall mechanism before starting similar tasks.
memory/
└── failures.md # All failure records (append-only log)
When an error occurs during work, append to memory/failures.md:
## [YYYY-MM-DD HH:mm] <short title>
- **Category:** <build|deploy|config|api|permissions|data|logic|network|dependency>
- **Context:** <what you were trying to do>
- **Error:** `<exact error message or symptom>`
- **Root Cause:** <why it happened>
- **Resolution:** <what fixed it>
- **Prevention:** <how to avoid next time>
- **Tags:** <comma-separated keywords for search>
Record AUTOMATICALLY when:
Do NOT record:
Before starting any significant task, search failures for relevant history:
grep -i "<keyword>" memory/failures.md
Or use memory_search if vector search is available:
memory_search query="<task description> failure error"
If matches found, mention them briefly:
⚠️ Known pitfall: [title] — [prevention tip]
When asked for a failure report or review, generate a summary:
memory/failures.md# Failure Report — YYYY-MM-DD
## Stats
- Total: N failures recorded
- Top category: <category> (N occurrences)
- Repeat offenders: N patterns seen 2+ times
## Repeat Patterns
### <pattern name>
- Seen: N times
- Root cause: <shared cause>
- Systemic fix: <recommendation>
## Recent Failures (last 7 days)
- [date] <title> — <resolution>
Run scripts/init.sh to set up the failures file:
bash scripts/init.sh [memory_dir]
Default memory_dir: ./memory