failure-memory for Openclaw

failure-memory is a specialized system for Openclaw Skills that enables AI agents to detect, record, and learn from their own failures to prevent future recurrences.

leegitw
v1.5.0
Feb 24, 2026
0
1.9k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install failure-memory

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install failure-memory using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is failure-memory?

failure-memory is a unified cognitive skill designed to solve the problem of AI agents making the same mistakes repeatedly, such as deleting critical code or ignoring context. By integrating this into your library of Openclaw Skills, you provide your agent with a structured way to transform transient errors into persistent learning patterns. The system operates locally within the workspace trust boundary, ensuring that all observations and data remain private.

This skill consolidates ten granular functionalities—including detection, search, and classification—into a single coherent memory system. It uses a sophisticated R/C/D (Recurrence, Confirmation, Disconfirmation) counter system to evaluate the validity of patterns, allowing the agent to distinguish between one-off anomalies and systemic issues that require new constraints.

failure-memory Use Cases

  • Automatically capturing test failures and API errors during the development lifecycle.
  • Recording manual user corrections when the agent misunderstands an instruction.
  • Identifying emerging patterns of failure across multiple tasks within a workspace.
  • Promoting established failure patterns into formal constraints for the agent to follow.

How failure-memory Works

  1. The agent monitors tool outputs and user interactions for failure triggers like non-zero exit codes or corrective phrases.
  2. When a failure is detected, the skill invokes the detect command to create or update an entry in the learnings directory.
  3. The system increments the Recurrence counter automatically, while users can manually confirm or disconfirm the pattern to improve accuracy.
  4. Using the classify command, the skill assigns an evidence tier based on the frequency and confirmation of the failure.
  5. Once a pattern reaches a defined threshold, the agent suggests refactoring the observation into a permanent project constraint.

failure-memory Setup

To add this capability to your environment, use the following commands to install the skill and its primary dependency:

# Install dependency for file change detection
openclaw install leegitw/context-verifier

# Install the failure-memory skill
openclaw install leegitw/failure-memory

Configuration is managed via .openclaw/failure-memory.yaml, where you can define custom detection patterns and eligibility thresholds.

failure-memory Data Schema & Taxonomy

The skill organizes its data within the .learnings/ directory of your workspace using a clear taxonomy:

Path Purpose
.learnings/ERRORS.md A high-level log of command and execution failures.
.learnings/LEARNINGS.md A record of corrections and identified best practices.
.learnings/observations/ A directory containing individual markdown files for each unique pattern (OBS-ID).

Each observation file tracks metadata including the R/C/D counters, evidence tiers (Weak, Emerging, Strong), and slug taxonomy for easy indexing.

failure-memory Advanced Features

  • Pattern Convergence: Detects similar patterns with a similarity threshold of 0.8 to merge related failures.
  • Evidence Tiering: Automatically scales the importance of a failure based on its recurrence and verification history.
  • Workspace Refactoring: Support for merging, splitting, or restructuring observation files to maintain a high-quality memory base.
  • Automated Triggers: Seamlessly integrates with CI/CD and test suite outputs to capture failures without manual intervention.

SKILL.md


Loading

Related Openclaw Skills

Featured*