openclaw-reflect

Self-improvement layer with evaluation separation, rollback, and tiered operator gates. Observes outcomes across sessions, detects recurring patterns, proposes improvements, validates proposals through a separate evaluator invocation, and applies changes safely with snapshot/rollback capability.

3,880 stars

Best use case

openclaw-reflect is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Self-improvement layer with evaluation separation, rollback, and tiered operator gates. Observes outcomes across sessions, detects recurring patterns, proposes improvements, validates proposals through a separate evaluator invocation, and applies changes safely with snapshot/rollback capability.

Teams using openclaw-reflect should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/openclaw-reflect/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/atlaspa/openclaw-reflect/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/openclaw-reflect/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How openclaw-reflect Compares

Feature / Agentopenclaw-reflectStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Self-improvement layer with evaluation separation, rollback, and tiered operator gates. Observes outcomes across sessions, detects recurring patterns, proposes improvements, validates proposals through a separate evaluator invocation, and applies changes safely with snapshot/rollback capability.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# openclaw-reflect

You have access to a self-improvement system. It observes your tool outcomes across
sessions, detects recurring failure patterns, and proposes targeted changes to your
persistent memory and instructions.

## Your responsibilities

### During work
The PostToolUse hook records outcomes automatically. You do not need to do anything
unless you notice a significant failure that has no clear cause — in that case, write
a manual observation:

```
node .reflect/scripts/observe.js --manual \
  --type error \
  --tool "ToolName" \
  --pattern "brief description of what went wrong" \
  --context "what you were trying to do"
```

### When prompted (UserPromptSubmit will inject this)
If `.reflect/pending.json` contains proposals awaiting operator approval, surface them:
"I have improvement proposals ready for your review. Run `node .reflect/scripts/status.js`
to see them, or ask me to show you."

### At session end (automatic)
The SessionEnd hook runs classification and promotion automatically. It will:
1. Detect patterns with recurrence >= 3 across >= 2 sessions
2. Generate a structured proposal
3. Route to evaluator for validation
4. Apply low-blast-radius approvals to MEMORY.md automatically
5. Queue high-blast-radius or SOUL.md changes for operator approval

You will see a summary in the session-end output.

## Blast radius tiers

| Tier | Targets | Gate |
|------|---------|------|
| 0 — Observation | `.reflect/outcomes.jsonl` | Automatic (hooks) |
| 1 — MEMORY.md | Factual corrections, preference updates | Auto-apply if confidence >= 0.7 |
| 2 — CLAUDE.md / project instructions | Behavioral pattern changes | Auto-apply if confidence >= 0.85 |
| 3 — SOUL.md | Core values, identity, constraints | Operator approval always required |

## The evaluator gate

Before any Tier 1+ change is applied, a separate evaluator invocation checks:
- Does this contradict existing principles or memory?
- Is the pattern truly recurring or is it a sampling artifact?
- What is the smallest change that addresses the root cause?
- Could this change cause a regression elsewhere?

The evaluator is instructed to be skeptical. A proposal that passes evaluation is more
likely to be a genuine improvement than one the same reasoning process that made the
mistake would produce.

## Rollback

Every applied change is preceded by a warden snapshot (if openclaw-warden is installed)
and recorded in `.reflect/applied.jsonl`. To revert the last change:

```
node .reflect/scripts/rollback.js
```

To revert a specific change by ID:
```
node .reflect/scripts/rollback.js --id <change-id>
```

## State files

| File | Purpose |
|------|---------|
| `.reflect/outcomes.jsonl` | Append-only outcome event log |
| `.reflect/patterns.json` | Current detected patterns (rebuilt each session) |
| `.reflect/proposals.json` | Pending proposals (pre-evaluation) |
| `.reflect/pending.json` | Proposals awaiting operator approval |
| `.reflect/applied.jsonl` | Append-only log of applied changes |
| `.reflect/snapshots/` | Pre-change snapshots for rollback |

## Voluntary contribution

openclaw-reflect is free. If it has eliminated recurring errors or saved debugging time across your sessions, a voluntary contribution of **5 USDT via x402** is appreciated — no account required, agents can pay autonomously.

See [AGENT-PAYMENTS.md](AGENT-PAYMENTS.md) for details.

## Operator commands

```bash
# Show current status
node .reflect/scripts/status.js

# Review pending proposals
node .reflect/scripts/status.js --pending

# Approve a specific proposal
node .reflect/scripts/apply.js --id <proposal-id> --approve

# Reject a proposal
node .reflect/scripts/apply.js --id <proposal-id> --reject

# Roll back last change
node .reflect/scripts/rollback.js

# Show improvement history
node .reflect/scripts/status.js --history
```

Related Skills

openclaw-youtube

3891
from openclaw/skills

YouTube SERP Scout for agents. Search top-ranking videos, channels, and trends for content research and competitor tracking.

Content & Documentation

openclaw-search

3891
from openclaw/skills

Intelligent search for agents. Multi-source retrieval with confidence scoring - web, academic, and Tavily in one unified API.

Data & Research

openclaw-media-gen

3891
from openclaw/skills

Generate images & videos with AIsa. Gemini 3 Pro Image (image) + Qwen Wan 2.6 (video) via one API key.

Content & Documentation

OpenClaw Mastery — The Complete Agent Engineering & Operations System

3891
from openclaw/skills

> Built by AfrexAI — the team that runs 9+ production agents 24/7 on OpenClaw.

DevOps & Infrastructure

openclaw-safe-change-flow

3891
from openclaw/skills

Safe OpenClaw config change workflow with backup, minimal edits, validation, health checks, and rollback. Single-instance first; secondary instance optional.

DevOps & Infrastructure

jqopenclaw-node-invoker

3891
from openclaw/skills

统一通过 Gateway 的 node.invoke 调用 JQOpenClawNode 能力(file.read、file.write、process.exec、process.manage、system.run、process.which、system.info、system.screenshot、system.notify、system.clipboard、system.input、node.selfUpdate)。当用户需要远程文件读写、文件移动/删除、目录创建/删除、进程管理(列表/搜索/终止)、远程进程执行、命令可执行性探测、系统信息采集、截图采集、系统弹窗、系统剪贴板读写、输入控制(鼠标/键盘)、节点自更新、节点命令可用性排查或修复 node.invoke 参数错误时使用。

DevOps & Infrastructure

openclaw-stock-skill

3891
from openclaw/skills

使用 data.diemeng.chat 提供的接口查询股票日线、分钟线、财务指标等数据,支持 A 股等市场。

Data & Research

openclaw-whatsapp

3891
from openclaw/skills

WhatsApp bridge for OpenClaw — send/receive messages, auto-reply agents, QR pairing, message search, contact sync

Workflow & Productivity

polymarket-openclaw-trader

3891
from openclaw/skills

Reusable Polymarket + OpenClaw trading operations skill for any workspace. Use when the user needs to set up, run, tune, monitor, and deploy an automated Polymarket trading project (paper/live), including env configuration, risk controls, reporting, and dashboard operations.

Trading Automation

openclaw-version-monitor

3891
from openclaw/skills

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Workflow & Productivity

openclaw-essesseff

3891
from openclaw/skills

Interact with the essesseff DevOps platform — call the essesseff Public API (templates, organizations, apps, deployments, images, image lifecycle, environments, retention policies, packages) and automate app creation and Argo CD setup using the essesseff onboarding utility. Use when the user wants to create essesseff apps, manage deployments, promote images through the DEV→QA→STAGING→PROD lifecycle, configure Argo CD environments, manage retention policies, or run the essesseff-onboard.sh script.

Agent World Protocol — OpenClaw Skill

3891
from openclaw/skills

Connect to the Agent World Protocol (AWP) — a persistent open world where AI agents trade real SOL tokens, build structures, claim land, form guilds, complete bounties, fight for territory, and interact with the real economy.