← 返回 Skills 市场
zhanghengyi1986-afk

Agent Self-Evolve

作者 zhanghengyi1986-afk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
107
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-self-evolve
功能描述
Self-evolution system for OpenClaw agents. Enables continuous learning through mistake tracking, experience distillation, skill improvement queues, and autom...
使用说明 (SKILL.md)

Self-Evolve 🧬

A self-improvement system that turns every interaction into a learning opportunity. Three loops: real-time capturedaily consolidationweekly deep review.

Quick Start

1. Initialize Evolution Files

Run the setup script to create the file structure:

bash \x3Cskill_dir>/scripts/setup-evolution.sh

This creates:

memory/
  evolution-log.md          # Chronicle of every evolution event
  evolution-metrics.json    # Statistics tracker
  mistakes-learned.md       # Mistake → lesson database
  skill-improvements.md     # Queued improvements for skills/code
  testing-knowledge.md      # Domain knowledge base (rename per your domain)

2. Set Up Cron Jobs

Create two cron jobs for automated evolution:

Daily evolution (recommended: late evening, e.g. 23:00):

Schedule: cron "0 23 * * *" (your timezone)
Payload: agentTurn
Message: see references/daily-evolution-prompt.md

Weekly deep evolution (recommended: weekend morning, e.g. Sunday 10:00):

Schedule: cron "0 10 * * 0" (your timezone)
Payload: agentTurn
Message: see references/weekly-evolution-prompt.md

3. Add Real-Time Hooks to AGENTS.md

Add the following section to your AGENTS.md (adapt to your role):

## 🧬 Self-Evolution

I have a built-in learning loop. After every interaction:
- Made a mistake → record in `memory/mistakes-learned.md`
- Found a skill/code improvement → queue in `memory/skill-improvements.md`
- Learned something new → update domain knowledge file
- Important decision/preference → update `MEMORY.md`

The Three Loops

Loop 1: Real-Time Capture (Every Interaction)

Trigger: something notable happens during normal work.

Event Action File
Made a mistake Record cause + fix + prevention mistakes-learned.md
Skill could be better Queue improvement with priority skill-improvements.md
Learned new knowledge Add to domain knowledge file testing-knowledge.md (or your domain file)
User preference discovered Update long-term memory MEMORY.md

Format for mistakes-learned.md:

### Category Name
- **Short description**: Root cause → Fix/Prevention

Format for skill-improvements.md:

## Queued
- [ ] target: \x3Cfile/skill> | issue: \x3Cwhat's wrong> | fix: \x3Cproposed solution>

## Completed
- [x] target: \x3Cfile/skill> | issue: \x3Cwhat> | fix: \x3Cwhat was done> ✅ (date)

Loop 2: Daily Evolution (Cron, Every Night)

See references/daily-evolution-prompt.md for the full cron prompt.

Steps:

  1. Read today's memory/YYYY-MM-DD.md daily log
  2. Extract lessons, mistakes, insights not yet captured
  3. Execute queued improvements from skill-improvements.md (code fixes, skill updates)
  4. Update mistakes-learned.md with new entries
  5. Update MEMORY.md with significant events
  6. Update evolution-metrics.json counters
  7. Append summary to evolution-log.md

Loop 3: Weekly Deep Evolution (Cron, Weekly)

See references/weekly-evolution-prompt.md for the full cron prompt.

Steps:

  1. Review all daily logs from the past week
  2. Identify patterns: repeated mistakes, recurring workflows, knowledge gaps
  3. Consider creating new Skills for repetitive work
  4. Optimize existing workflows and tools
  5. Expand domain knowledge base
  6. Consider if SOUL.md needs updating (notify user first!)
  7. Update metrics and log the evolution event

Evolution Metrics

Track progress in evolution-metrics.json:

{
  "initialized": "YYYY-MM-DD",
  "total_evolutions": 0,
  "daily_evolutions": 0,
  "weekly_evolutions": 0,
  "skills_improved": 0,
  "code_fixes_applied": 0,
  "skills_created": 0,
  "mistakes_recorded": 0,
  "mistakes_resolved": 0,
  "knowledge_entries_added": 0,
  "memory_updates": 0,
  "soul_updates": 0,
  "last_daily_evolution": null,
  "last_weekly_evolution": null,
  "history": []
}

Evolution Principles

  1. Only fix what's broken — Don't change things for the sake of change
  2. Record before executing — Ideas go to the queue first, execute during evolution time
  3. Traceable — Every change gets logged with reason and expected effect
  4. SOUL.md is sacred — Always notify the user before modifying it
  5. Compound growth — Small daily improvements create exponential long-term gains

Heartbeat Integration (Optional)

Add to HEARTBEAT.md for real-time urgency checks:

## Real-Time Learning Check
- Check memory/skill-improvements.md for items marked `urgent`
- If found, execute immediately without waiting for daily evolution

Tips

  • Start small: even 1 lesson per day compounds over weeks
  • Review mistakes-learned.md before similar tasks to avoid repeating errors
  • The weekly evolution is where breakthroughs happen — pattern recognition across days
  • Keep domain knowledge files focused; split into multiple files if >200 lines
  • Evolution logs are your growth journal — they show how far you've come
安全使用建议
This skill can autonomously modify code and other skill files based on entries in memory/skill-improvements.md. Before installing or enabling it: 1) Run it in a safe/test workspace first (do not enable on production workspaces). 2) Require manual approval for any queued item that changes code or skills — e.g., change prompts to explicitly ask the user and block automatic execution. 3) Keep backups / use version control (git) so changes can be reviewed and reverted. 4) Scope file permissions so the agent can only modify a narrow, intended directory. 5) Prefer running daily/weekly jobs in an isolated sessionTarget and avoid 'urgent' automatic execution unless you trust the agent and audit logs. 6) If you plan to let it create or modify skills, require PRs or human review as part of the workflow. These mitigations reduce the risk of unintended or unauthorized changes.
功能分析
Type: OpenClaw Skill Name: agent-self-evolve Version: 1.0.0 The skill bundle implements a self-evolution system that enables an agent to track mistakes and automatically update its own code and skills via scheduled cron jobs. While the logic is transparent and aligned with the stated purpose, it is classified as suspicious because it establishes a high-risk 'self-modification' loop where the agent is prompted to execute unchecked code changes queued in 'memory/skill-improvements.md' (as seen in daily-evolution-prompt.md). This architectural pattern creates a significant risk of persistent remote code execution (RCE) if the agent's logs are influenced by malicious external input, although the bundle itself shows no signs of intentional malice or data exfiltration.
能力评估
Purpose & Capability
The name/description (self-evolve) matches the included materials: a setup script plus prompts and guidance to capture lessons and apply improvements. Creating local memory files and scheduling evolution cycles is coherent with the purpose. However, the declared capability to 'execute queued improvements' (code fixes, skill updates, create skills) is more powerful than a simple logging/analytics tool and should be justified/controlled.
Instruction Scope
SKILL.md and the cron prompt explicitly instruct the agent to read many workspace files and to implement 'code fixes' and 'skill improvements' from a queue. That grants the agent broad, write-capable access to arbitrary files (skill files, code, MEMORY.md, etc.) and discretion to change behavior. The prompts also recommend creating new skills for repetitive workflows. There is no enforced user-approval step for most modifications (other than a single note about notifying the user before modifying SOUL.md), which is scope creep relative to a benign logger/summary tool.
Install Mechanism
No network installs or third-party downloads; the only code is an included setup shell script that creates local files under a memory/ directory. The script operates only on the local workspace and does not fetch remote content or create binaries, so installation risk is low.
Credentials
The skill requests no environment variables, credentials, or config paths. No secrets are requested or required by the included materials.
Persistence & Privilege
The skill instructs users to set up cron jobs that will trigger agent turns daily/weekly and to add real-time hooks which may cause the agent to act automatically. 'always: false' and normal autonomous invocation are used, but the external cron scheduling plus instructions to automatically apply queued code changes increases persistence and the potential blast radius of erroneous or malicious modifications.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-self-evolve
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-self-evolve 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: three-loop self-evolution system (real-time capture, daily consolidation, weekly deep review) for OpenClaw agents. Includes setup script, cron prompt templates, and metrics tracking.
元数据
Slug agent-self-evolve
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Agent Self-Evolve 是什么?

Self-evolution system for OpenClaw agents. Enables continuous learning through mistake tracking, experience distillation, skill improvement queues, and autom... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 107 次。

如何安装 Agent Self-Evolve?

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

Agent Self-Evolve 是免费的吗?

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

Agent Self-Evolve 支持哪些平台?

Agent Self-Evolve 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Self-Evolve?

由 zhanghengyi1986-afk(@zhanghengyi1986-afk)开发并维护,当前版本 v1.0.0。

💬 留言讨论