Error-Driven Evolution for Openclaw

A structured system for AI agents to transform mistakes into imperative, executable rules that prevent recurring errors.

marsnavi
v1.0.0
Feb 25, 2026
0
4.7k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install error-driven-evolution

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 error-driven-evolution 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 Error-Driven Evolution?

Error-Driven Evolution is a robust framework designed to move AI agents beyond apologies and into actionable learning. Instead of generating vague reflections, this skill mandates the extraction of clear, imperative rules from every mistake or user correction. These rules are stored in a local lessons.md file, creating a persistent memory of failures and their solutions.

By leveraging Openclaw Skills, developers can implement a pre-decision scanning workflow that ensures agents consult their history of mistakes before taking high-stakes actions. This creates an evolving "immune system" for the agent, significantly increasing its reliability and performance over time without requiring manual retraining of the underlying model.

Error-Driven Evolution Use Cases

  • When a user provides explicit feedback or overrides an agent's output.
  • When an agent makes a repeat error that needs to be permanently corrected.
  • To prevent common pitfalls in data interpretation, communication tone, or task execution.
  • During multi-agent handoffs to ensure shared standards of safety and judgment.

How Error-Driven Evolution Works

  1. Identification: The agent recognizes a failure, near miss, or user correction.
  2. Extraction: The agent distills the error into a specific, imperative rule (Trigger, Action, Avoid, Why).
  3. Persistence: The rule is categorized and appended to the workspace's lessons.md file.
  4. Pre-Decision Scan: Before executing new tasks, the agent scans its rule headers for relevant categories.
  5. Collective Learning: Anonymized rules can be shared to a community repository to help other Openclaw Skills users avoid similar issues.

Error-Driven Evolution Setup

  1. Create the lessons.md file in your workspace root:
echo "# Lessons\nRules extracted from mistakes. Append after failing, scan before deciding." > lessons.md
  1. Integrate the community immune system by copying the top-100 lessons into your workspace as top-100.md.
  2. Update your agent's system instructions to require a scan of lessons.md and top-100.md before starting any new task or making complex decisions.

Error-Driven Evolution Data Schema & Taxonomy

The skill organizes its learning through a structured markdown taxonomy:

File Role Loading Strategy
lessons.md Local mistake rules Full load on startup
top-100.md Global common errors Skim titles on startup
community/*.md Specialized domain knowledge On-demand category query

Each entry in the schema includes an imperative title, a specific trigger (When), the correct action (Do), the error to avoid (Don't), and a brief rationale (Why).

Error-Driven Evolution Advanced Features

  • Context-Aware Scanning: Agents only scan rules relevant to their current task category (e.g., [DATA] or [SAFETY]) to optimize performance.
  • Automated Maintenance: Logic for retiring obsolete rules or splitting logs once they exceed 50 entries.
  • Pre-installed Immune System: Access to a curated 8KB file of the most common AI failures to jumpstart agent safety.
  • Anonymized Community Sharing: Support for contributing learned lessons to global repositories via standardized formatting.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*