Self-Improving with Reflection for Openclaw

An autonomous learning framework that enables AI agents to evaluate their own work, catch mistakes, and permanently improve through a tiered memory system.

wanghan0501
v1.2.11
Mar 9, 2026
0
2k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install self-improving-with-reflection

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-with-reflection 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 with Reflection?

Self-Improving with Reflection is a sophisticated meta-learning skill designed to make AI agents more effective over time. By implementing a cycle of self-reflection, self-criticism, and self-organization, the agent moves beyond static responses to develop a compounding knowledge base. It allows the agent to evaluate its performance against user intent, identify patterns in corrections, and store these insights in a structured, tiered memory architecture.

Built as part of the Openclaw Skills ecosystem, this tool ensures that an agent's growth is both transparent and manageable. It distinguishes between transient instructions and permanent preferences, ensuring that only the most valuable patterns reach long-term storage while keeping the agent's context window optimized through automated promotion and demotion of data.

Self-Improving with Reflection Use Cases

  • Automatically logging user corrections to prevent repeating the same mistakes.
  • Evaluating complex task outcomes to identify stylistic or technical improvements.
  • Developing project-specific coding standards or communication styles that persist across sessions.
  • Managing long-term memory for agents without manual intervention or manual file maintenance.

How Self-Improving with Reflection Works

  1. Trigger Identification: The agent monitors for specific pattern candidates, such as explicit user corrections or repeated instructions.
  2. Self-Reflection: After completing significant tasks, the agent pauses to compare the outcome against the original intent, identifying areas for improvement.
  3. Logging: Lessons are captured in a structured format (Context, Reflection, Lesson) and stored initially in a corrections log.
  4. Promotion: Once a specific lesson or pattern is successfully applied three times, it is promoted to the HOT memory tier.
  5. Tiered Management: The system automatically moves unused patterns to WARM or COLD storage over time to maintain efficiency and relevance.

Self-Improving with Reflection Setup

To initialize the self-improving environment within your agent's workspace, ensure you are in the root directory and run the setup guide included with Openclaw Skills:

# Navigate to your agent workspace
cd your-agent-project

# Run the setup script to initialize the memory directory
# This creates the ./self-improving/ structure
cat ./self-improving/setup.md

Self-Improving with Reflection Data Schema & Taxonomy

The skill organizes data within a specialized ./self-improving/ directory using a tiered hierarchy to balance speed and depth:

Tier File/Path Logic Purpose
HOT memory.md Always loaded; ≤100 lines High-frequency global rules and preferences.
WARM projects/, domains/ Loaded on context match Project-specific or domain-specific (e.g., code, writing) learnings.
COLD archive/ Load on explicit query Historical patterns and decayed data for deep retrieval.
LOG corrections.md Last 50 entries Raw feed of recent mistakes and user feedback.

Self-Improving with Reflection Advanced Features

  • Namespace Isolation: Keeps project-specific patterns separate from global preferences to avoid context contamination.
  • Automatic Compaction: Merges similar corrections into single concise rules when file limits are reached.
  • Conflict Resolution: Intelligent hierarchy where specific project rules override general domain or global rules.
  • Source Citation: The agent provides transparency by citing specific memory files when applying learned rules.
  • Lifecycle Automation: Built-in 7/30/90 day decay logic to ensure memory remains fresh and relevant.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*