Self-Improving Agent (Proactive Self-Reflection) for Openclaw

A proactive self-reflection and memory management skill that enables AI agents to learn from corrections and improve performance permanently.

williamwang-wh
v1.0.0
Mar 30, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install claw-self-improving-pro

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 claw-self-improving-pro 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-Improving Agent (Proactive Self-Reflection)?

The Self-Improving Agent is a sophisticated framework for AI agents built on Openclaw Skills that implements a continuous feedback loop of self-criticism and self-learning. By leveraging a tiered memory structure, the agent evaluates its own output, catches recurring mistakes, and organizes patterns to ensure knowledge compounds over time without manual maintenance.

This skill transforms a standard AI into a learning entity that proactively analyzes its work after every task. By monitoring user corrections and preference signals, the agent maintains a local database of learnings, ensuring that once a mistake is corrected or a preference is stated, it becomes a permanent part of the agent's operational logic.

Self-Improving Agent (Proactive Self-Reflection) Use Cases

  • When a user corrects a mistake or points out an error in reasoning.
  • After completing significant multi-step tasks to evaluate the outcome against the intent.
  • Identifying and automating recurring workflow patterns or styling preferences.
  • Managing project-specific or domain-specific knowledge that needs to persist across sessions.

How Self-Improving Agent (Proactive Self-Reflection) Works

  1. Pre-Task Loading: The agent scans the HOT memory file and relevant project namespaces before starting work to align with known user preferences.
  2. Execution and Monitoring: While working, the agent identifies detection triggers such as explicit user corrections or preference signals.
  3. Post-Task Reflection: Upon completion of a task, the agent pauses to evaluate if the work met expectations and identifies specific lessons for improvement.
  4. Memory Logging: Lessons and corrections are logged to a tiered file system (HOT, WARM, or COLD) located in the local user directory.
  5. Pattern Promotion: The system automatically promotes lessons to the HOT tier if they are applied successfully three times within a seven-day window.
  6. Maintenance: Unused patterns are automatically demoted or archived according to predefined aging rules (30 or 90 days) to keep context windows clean.

Self-Improving Agent (Proactive Self-Reflection) Setup

To begin using this capability within your Openclaw Skills environment, ensure the directory structure is initialized correctly.

# Install the skill via clawhub
clawhub install self-improving

# The skill stores memory in ~/self-improving/
# If the directory does not exist, run the setup guide
cat ~/self-improving/setup.md

Self-Improving Agent (Proactive Self-Reflection) Data Schema & Taxonomy

The skill organizes data in a structured hierarchy located at ~/self-improving/ to ensure efficient retrieval and context management.

File/Folder Tier Description
memory.md HOT High-frequency rules (max 100 lines), always loaded into active context.
projects/ WARM Directory containing per-project learnings and specific patterns.
domains/ WARM Domain-specific files for coding, writing, or communication styles.
corrections.md LOG A history of the last 50 corrections for evaluation and promotion.
archive/ COLD Historically relevant but currently unused patterns moved to long-term storage.
reflections.md LOG A dedicated log for the agent's post-task self-evaluations and lessons learned.

Self-Improving Agent (Proactive Self-Reflection) Advanced Features

  • Automatic Promotion and Demotion: Smart logic that manages context window usage by moving unused data to cold storage while keeping frequent lessons in HOT memory.
  • Namespace Isolation: Prevents project-specific rules from leaking into global workflows unless explicitly promoted to the global memory tier.
  • Conflict Resolution: Intelligent hierarchy (Project > Domain > Global) that ensures the most relevant context always wins when instructions overlap.
  • Self-Compaction: Automated summarization of verbose entries and merging of similar corrections to keep memory files efficient and readable.
  • Transparency Citations: The agent explicitly cites which memory file it is using during its operations to build user trust.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*