openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > openclaw-reflect

Self-improvement layer with evaluation separation, rollback, and tiered operator gates. Observes outcomes across sessions, detects recurring patterns, propos...

AI 与大模型

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.0.2

统计:⭐ 0 · 618 · 3 current installs · 3 all-time installs

0

安装量(当前) 3

🛡 VirusTotal :良性 · OpenClaw :可疑

Package:atlaspa/openclaw-reflect

安全扫描(ClawHub)

  • VirusTotal :良性
  • OpenClaw :可疑

OpenClaw 评估

The skill's code and instructions broadly match its stated purpose (automated self‑improvement), but there are a few non-trivial, unexplained risks you should understand before installing — notably automated edits to core agent files, external evaluator calls that transmit MEMORY and sample inputs, and an autonomous payment flow in the repo.

目的

Name/description (self‑improvement, reflection, rollback) matches behavior: hooks record outcomes, classify/propose/evaluate/apply pipeline, and snapshot/rollback. Declared file writes (.reflect/, MEMORY.md, CLAUDE.md) line up with the actions performed by scripts.

说明范围

At session end the skill automatically runs a pipeline that can generate proposals and (subject to thresholds) append content to MEMORY.md and CLAUDE.md. The evaluator step will send an excerpt of MEMORY.md and sample input summaries to external model backends (Anthropic/OpenAI/Ollama) when API keys/hosts are present — this transmits agent context to third parties. Hooks capture tool input summaries (JSON.stringify of tool_input) which could i…

安装机制

No install spec (instruction-only skill with checked-in scripts). All code is in the skill bundle — there are no external downloads or package installs. That reduces supply-chain risk compared to remote fetches.

证书

No required environment variables, but optional keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, OLLAMA_HOST/PORT) are available to enable remote evaluation. Those are appropriate for the evaluator feature, but enabling them will send memory and proposals to external services. The repo also contains an AGENT-PAYMENTS.md describing an x402 local HTTP payment API (http://localhost:18789) and example endpoints for autonomous contributions — this adds a s…

持久

always:false (normal). The skill auto-applies Tier 1/2 changes if confidence thresholds are met and can queue Tier 3 for operator approval. That means it can autonomously mutate MEMORY.md and CLAUDE.md (and write snapshots) — this is consistent with its purpose but is a powerful capability and increases blast radius if combined with autonomous invocation and external evaluators.

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「openclaw-reflect」。简介:Self-improvement layer with evaluation separation, rollback, and tiered operato…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/atlaspa/openclaw-reflect/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: openclaw-reflect
version: 1.0.2
description: >
  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.
author: AtlasPA
tags: [self-improvement, reflection, memory, safety, hooks, evaluation]
hooks:
  - event: PostToolUse
    path: hooks/post-tool-use.js
  - event: SessionEnd
    path: hooks/session-end.js
  - event: UserPromptSubmit
    path: hooks/user-prompt-submit.js
permissions:
  - read: workspace
  - write: .reflect/
  - write: MEMORY.md
  - write: CLAUDE.md
  - propose: SOUL.md
env:
  optional:
    - ANTHROPIC_API_KEY     # Enables Anthropic evaluator backend (claude-haiku-4-5-20251001)
    - OPENAI_API_KEY        # Enables OpenAI evaluator backend (gpt-4o-mini)
    - OLLAMA_HOST           # Ollama server hostname (default: localhost)
    - OLLAMA_PORT           # Ollama server port (default: 11434)
    - REFLECT_EVAL_MODEL    # Force a specific Ollama model name
    - REFLECT_EVALUATOR     # Force evaluator backend: anthropic|openai|ollama|rules
---

# 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
```