← 返回 Skills 市场
jpengcheng523-netizen

Self-Improving Agent (Proactive Self-Reflection)

作者 jpengcheng523-netizen · GitHub ↗ · v1.2.11 · MIT-0
linuxdarwinwin32 ✓ 安全检测通过
624
总下载
0
收藏
5
当前安装
1
版本数
在 OpenClaw 中安装
/install jpeng-self-improving
功能描述
Self-reflection + Self-criticism + Self-learning + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use befo...
使用说明 (SKILL.md)

When to Use

User corrects you or points out mistakes. You complete significant work and want to evaluate the outcome. You notice something in your own output that could be better. Knowledge should compound over time without manual maintenance.

Architecture

Memory lives in ~/self-improving/ with tiered structure. If ~/self-improving/ does not exist, run setup.md.

~/self-improving/
├── memory.md          # HOT: ≤100 lines, always loaded
├── index.md           # Topic index with line counts
├── projects/          # Per-project learnings
├── domains/           # Domain-specific (code, writing, comms)
├── archive/           # COLD: decayed patterns
└── corrections.md     # Last 50 corrections log

Quick Reference

Topic File
Setup guide setup.md
Memory template memory-template.md
Learning mechanics learning.md
Security boundaries boundaries.md
Scaling rules scaling.md
Memory operations operations.md
Self-reflection log reflections.md

Detection Triggers

Log automatically when you notice these patterns:

Corrections → add to corrections.md, evaluate for memory.md:

  • "No, that's not right..."
  • "Actually, it should be..."
  • "You're wrong about..."
  • "I prefer X, not Y"
  • "Remember that I always..."
  • "I told you before..."
  • "Stop doing X"
  • "Why do you keep..."

Preference signals → add to memory.md if explicit:

  • "I like when you..."
  • "Always do X for me"
  • "Never do Y"
  • "My style is..."
  • "For [project], use..."

Pattern candidates → track, promote after 3x:

  • Same instruction repeated 3+ times
  • Workflow that works well repeatedly
  • User praises specific approach

Ignore (don't log):

  • One-time instructions ("do X now")
  • Context-specific ("in this file...")
  • Hypotheticals ("what if...")

Self-Reflection

After completing significant work, pause and evaluate:

  1. Did it meet expectations? — Compare outcome vs intent
  2. What could be better? — Identify improvements for next time
  3. Is this a pattern? — If yes, log to corrections.md

When to self-reflect:

  • After completing a multi-step task
  • After receiving feedback (positive or negative)
  • After fixing a bug or mistake
  • When you notice your output could be better

Log format:

CONTEXT: [type of task]
REFLECTION: [what I noticed]
LESSON: [what to do differently]

Example:

CONTEXT: Building Flutter UI
REFLECTION: Spacing looked off, had to redo
LESSON: Check visual spacing before showing user

Self-reflection entries follow the same promotion rules: 3x applied successfully → promote to HOT.

Quick Queries

User says Action
"What do you know about X?" Search all tiers for X
"What have you learned?" Show last 10 from corrections.md
"Show my patterns" List memory.md (HOT)
"Show [project] patterns" Load projects/{name}.md
"What's in warm storage?" List files in projects/ + domains/
"Memory stats" Show counts per tier
"Forget X" Remove from all tiers (confirm first)
"Export memory" ZIP all files

Memory Stats

On "memory stats" request, report:

📊 Self-Improving Memory

HOT (always loaded):
  memory.md: X entries

WARM (load on demand):
  projects/: X files
  domains/: X files

COLD (archived):
  archive/: X files

Recent activity (7 days):
  Corrections logged: X
  Promotions to HOT: X
  Demotions to WARM: X

Core Rules

1. Learn from Corrections and Self-Reflection

  • Log when user explicitly corrects you
  • Log when you identify improvements in your own work
  • Never infer from silence alone
  • After 3 identical lessons → ask to confirm as rule

2. Tiered Storage

Tier Location Size Limit Behavior
HOT memory.md ≤100 lines Always loaded
WARM projects/, domains/ ≤200 lines each Load on context match
COLD archive/ Unlimited Load on explicit query

3. Automatic Promotion/Demotion

  • Pattern used 3x in 7 days → promote to HOT
  • Pattern unused 30 days → demote to WARM
  • Pattern unused 90 days → archive to COLD
  • Never delete without asking

4. Namespace Isolation

  • Project patterns stay in projects/{name}.md
  • Global preferences in HOT tier (memory.md)
  • Domain patterns (code, writing) in domains/
  • Cross-namespace inheritance: global → domain → project

5. Conflict Resolution

When patterns contradict:

  1. Most specific wins (project > domain > global)
  2. Most recent wins (same level)
  3. If ambiguous → ask user

6. Compaction

When file exceeds limit:

  1. Merge similar corrections into single rule
  2. Archive unused patterns
  3. Summarize verbose entries
  4. Never lose confirmed preferences

7. Transparency

  • Every action from memory → cite source: "Using X (from projects/foo.md:12)"
  • Weekly digest available: patterns learned, demoted, archived
  • Full export on demand: all files as ZIP

8. Security Boundaries

See boundaries.md — never store credentials, health data, third-party info.

9. Graceful Degradation

If context limit hit:

  1. Load only memory.md (HOT)
  2. Load relevant namespace on demand
  3. Never fail silently — tell user what's not loaded

Scope

This skill ONLY:

  • Learns from user corrections and self-reflection
  • Stores preferences in local files (~/self-improving/)
  • Reads its own memory files on activation

This skill NEVER:

  • Accesses calendar, email, or contacts
  • Makes network requests
  • Reads files outside ~/self-improving/
  • Infers preferences from silence or observation
  • Modifies its own SKILL.md

Related Skills

Install with clawhub install \x3Cslug> if user confirms:

  • memory — Long-term memory patterns for agents
  • learning — Adaptive teaching and explanation
  • decide — Auto-learn decision patterns
  • escalate — Know when to ask vs act autonomously

Feedback

  • If useful: clawhub star self-improving
  • Stay updated: clawhub sync
安全使用建议
This skill is coherent with its description: it keeps a local memory under ~/self-improving/ and learns from explicit corrections. Before installing, consider: 1) It will create and modify files in your home directory and suggests edits to workspace config files (AGENTS.md, SOUL.md) — review those changes manually. 2) Do not store secrets, health, or third-party personal data in the memory files (the skill's docs forbid this, but accidental storage is possible). 3) Choose a conservative operating mode (Passive or Strict) if you want more confirmation before patterns are promoted. 4) Back up or inspect ~/self-improving/ regularly and verify the 'forget everything' flow works as you expect. 5) If you share your environment (team machine, shared agent), treat the memory as potentially visible to others and audit accordingly.
功能分析
Type: OpenClaw Skill Name: jpeng-self-improving Version: 1.2.11 The skill is a comprehensive framework for agent self-improvement through local file-based memory storage in `~/self-improving/`. It provides structured templates and logic for the agent to log user corrections, preferences, and self-reflections to compound execution quality over time. Critically, it includes a `boundaries.md` file that explicitly forbids the storage of sensitive data such as credentials, financial information, or PII. While the `setup.md` file instructs the agent to modify its own configuration files (`SOUL.md`, `AGENTS.md`) and execute basic shell commands (e.g., `mkdir`, `find`), these actions are strictly scoped to the memory directory and are necessary for the skill's stated purpose of autonomous self-optimization.
能力评估
Purpose & Capability
The name/description (self-reflection, memory, learning) matches the instructions: creating a local memory directory, logging corrections, promoting patterns, and citing sources. One notable out-of-scope action: setup.md suggests editing workspace files (AGENTS.md, SOUL.md, HEARTBEAT.md) to integrate the skill. Modifying workspace config is related to integration but is an additional side-effect the user should expect and review.
Instruction Scope
All runtime steps are documented as file I/O and local operations (create ~/self-improving/, load memory.md on session start, write corrections.md, export ZIPs, run weekly maintenance). There are no network endpoints, shell downloads, or hidden code. However the instructions do ask the agent to read/write files outside the memory folder (AGENTS.md, SOUL.md) and to perform scheduled maintenance (cron-style weekly tasks), which expands scope beyond pure ephemeral reflection.
Install Mechanism
This is an instruction-only skill with no install spec and no bundled code—nothing is downloaded or executed from external URLs. That is the lowest-risk install model.
Credentials
The skill requests no environment variables or credentials and declares a home-folder-based storage location. That is proportionate. One caveat: the skill depends on the user not storing secrets in the memory files—boundaries.md explicitly forbids storing credentials/medical/third-party data, but accidental storage would create a risk; the user must enforce that policy.
Persistence & Privilege
The skill creates persistent files under ~/self-improving/ and expects to load memory.md every session, and it recommends periodic maintenance tasks. It does not force inclusion (always:false) and does not require elevated permissions, but the persistent local state will change agent behavior across sessions and must be managed (e.g., confirm 'forget everything' behavior and backups).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install jpeng-self-improving
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /jpeng-self-improving 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.11
Proactive self-reflection for AI agents
元数据
Slug jpeng-self-improving
版本 1.2.11
许可证 MIT-0
累计安装 5
当前安装数 5
历史版本数 1
常见问题

Self-Improving Agent (Proactive Self-Reflection) 是什么?

Self-reflection + Self-criticism + Self-learning + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use befo... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 624 次。

如何安装 Self-Improving Agent (Proactive Self-Reflection)?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install jpeng-self-improving」即可一键安装,无需额外配置。

Self-Improving Agent (Proactive Self-Reflection) 是免费的吗?

是的,Self-Improving Agent (Proactive Self-Reflection) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Self-Improving Agent (Proactive Self-Reflection) 支持哪些平台?

Self-Improving Agent (Proactive Self-Reflection) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。

谁开发了 Self-Improving Agent (Proactive Self-Reflection)?

由 jpengcheng523-netizen(@jpengcheng523-netizen)开发并维护,当前版本 v1.2.11。

💬 留言讨论