Self Reflection for Openclaw

An AI skill that enables agents to self-critique, learn from mistakes, and proactively surface lessons to reduce revision rounds.

ivangdavila
v1.1.0
Feb 26, 2026
7
9.5k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install 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 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 Reflection?

This skill equips your AI agent with a sophisticated self-correction loop, ensuring that deliverables meet high standards before reaching the user. By integrating this module from the Openclaw Skills library, agents move beyond simple execution to professional-grade quality assurance, performing a 7-dimension evaluation on their own output.

The core value of Self Reflection lies in its ability to transform mistakes into permanent improvements. Instead of repeating the same errors, the agent logs corrections, analyzes root causes, and detects recurring patterns. This leads to a proactive workflow where the agent surfaces relevant lessons from past experiences before starting new tasks, significantly increasing efficiency and trust.

Self Reflection Use Cases

  • Performing pre-delivery quality assurance for code, architecture, or strategy deliverables to catch bugs early.
  • Capturing and analyzing user corrections to prevent recurring misunderstandings or technical slips.
  • Identifying behavioral blind spots through automated pattern detection across multiple session histories.
  • Proactively injecting past lessons into current workflows to ensure best practices are followed automatically.

How Self Reflection Works

  1. The agent identifies a specific trigger: a pre-delivery milestone, a user correction, or a pattern detection heartbeat.
  2. During the pre-delivery phase, the agent pauses for a 30-second scan across seven dimensions, including correctness, robustness, and alignment.
  3. If any dimension scores below the 7/10 threshold, the agent fixes the issue internally before presenting the final result.
  4. When a mistake is corrected by the user, the agent stops to perform a 5-whys root cause analysis to understand the failure.
  5. The agent logs the lesson into a local memory structure, categorizing the error for future reference.
  6. After accumulating five reflections, the system scans for recurring patterns; if an error repeats three times, a permanent prevention rule is established.
  7. At the start of new tasks, the agent scans its patterns and surfaces relevant warnings to ensure history does not repeat.

Self Reflection Setup

To get started with this component of Openclaw Skills, you need to initialize the reflection directory. This skill installs via the CLI and manages its own persistent memory.

# Install the reflection skill to your agent
clawhub install reflection

# Sync your skill library to ensure the latest evaluation logic is present
clawhub sync

Once installed, the agent will automatically create the ~/reflection/ directory and begin monitoring your interactions for learning opportunities.

Self Reflection Data Schema & Taxonomy

The skill maintains a structured directory to ensure persistent learning. This data is organized as follows:

File Purpose
memory.md Stores agent status, user preferences, and performance statistics.
reflections.md A chronological log of specific corrections, root cause analysis, and prevention rules.
patterns.md Tracks recurring issues, frequency of errors, and the status of active prevention rules.
archive/ A directory for monthly archives, keeping the active reflection logs lean and efficient.

Self Reflection Advanced Features

  • 7-Dimension Evaluation: A comprehensive rubric covering Correctness, Completeness, Clarity, Robustness, Efficiency, Alignment, and Pride.
  • Proactive Lesson Injection: The ability to scan and surface relevant past mistakes before beginning a new task domain to prevent regression.
  • Pattern Lifecycle Management: Automatically tracks the maturity of a lesson from Emerging to Active, Monitoring, and finally Resolved status.
  • Automatic Monthly Archiving: Keeps the agent's context window clean by moving older reflections into a structured archive while maintaining active patterns.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*