Self-Improvement Agent Skill for Openclaw

A systematic framework for AI agents to log errors, track user corrections, and evolve through persistent project memory.

fanghuaqi
v1.0.0
Mar 7, 2026
0
980
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install self-improving-agent-v2

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 self-improving-agent-v2 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 Self-Improvement Agent Skill?

The Self-Improvement skill is a robust meta-learning framework designed for AI coding agents to ensure they never make the same mistake twice. By capturing unexpected command failures, direct user corrections, and discovered best practices into a structured .learnings/ directory, this tool bridges the gap between ephemeral chat sessions and permanent project knowledge. It is a core component within the Openclaw Skills ecosystem, enabling agents to build a soul and a memory that persist across different development environments.

This skill transforms every interaction into a potential optimization. When an agent encounters a knowledge gap or a missing capability, it documents the event using standardized templates. These entries can then be promoted to workspace-level configuration files such as SOUL.md or AGENTS.md, ensuring that subsequent sessions benefit from previously hard-won insights and refined behavioral guidelines.

Self-Improvement Agent Skill Use Cases

  • A terminal command or script execution fails unexpectedly during a coding task.
  • A user provides a direct correction like "Actually, this project uses ESM, not CommonJS."
  • An agent identifies a recurring workflow pattern that could be simplified or hardened.
  • Documenting feature requests or missing tool capabilities for future implementation.
  • Promoting temporary session-specific learnings into permanent project memory files like CLAUDE.md or .github/copilot-instructions.md.

How Self-Improvement Agent Skill Works

  1. The agent detects a trigger such as a tool error, user correction, or a discovered best practice.
  2. A structured entry is generated and appended to the relevant file in the .learnings/ directory (ERRORS.md, LEARNINGS.md, or FEATURE_REQUESTS.md).
  3. Each entry is assigned a unique ID (e.g., LRN-YYYYMMDD-XXX) and metadata including priority, area, and status.
  4. During periodic reviews or session starts, the agent scans these logs to avoid repeating past mistakes.
  5. High-value, recurring learnings are promoted to workspace-level files or extracted into entirely new, reusable skills.

Self-Improvement Agent Skill Setup

Install the skill via the ClawdHub registry to integrate it with your Openclaw Skills environment:

clawdhub install self-improving-agent

Alternatively, perform a manual installation:

git clone https://github.com/peterskoett/self-improving-agent.git ~/.openclaw/skills/self-improving-agent

Finally, initialize the workspace directory to begin logging:

mkdir -p ~/.openclaw/workspace/.learnings

Self-Improvement Agent Skill Data Schema & Taxonomy

The skill organizes data within a .learnings/ directory using three primary Markdown files to categorize insights:

File Purpose Key Metadata
LEARNINGS.md Corrections and best practices Category (e.g., knowledge_gap), Pattern-Key, Recurrence-Count
ERRORS.md Command failures and stack traces Command Attempted, Error Message, Context, Reproducibility
FEATURE_REQUESTS.md Missing agent capabilities Complexity Estimate, User Context, Frequency

All entries use a standardized schema including Logged (timestamp), Priority (low to critical), and Status (pending, resolved, in_progress, or promoted).

Self-Improvement Agent Skill Advanced Features

  • Automatic Skill Extraction: Built-in helper scripts to transform verified, non-obvious learnings into standalone Openclaw Skills.
  • Hook Integration: Supports UserPromptSubmit and PostToolUse hooks to trigger error detection and evaluation evaluation automatically.
  • Inter-Session Communication: Specialized tools like sessions_send and sessions_history to share learnings between different active agents.
  • Recurring Pattern Detection: Uses stable Pattern-Keys to track, deduplicate, and escalate issues that occur across multiple tasks.
  • Promotion Workflow: Rules-based logic for elevating local logs to global project memory files like SOUL.md, TOOLS.md, or AGENTS.md based on recurrence counts.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*