agentleFS
d-wweid-wwei/openclaw-skill-self-evolution/SKILL.md

self-evolution

Skill2 starsChanged 9 months agoMITView on GitHub

Run autonomous self-modification cycles: the OpenClaw agent reads and rewrites its own workspace code in bounded cycles. Use when the user says "evolve", "evolution cycle", "self-improvement", or when the system runs evolution mode. One cycle = one coherent change ending in a commit (and optional restart). Requires repo read/write, git, and optional multi-model review.

6 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions6 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 6

    1. EvovexAI/EvoFlow★ 612same name
    2. liushikuan63/Qoder-Optimization★ 2same name
    3. GodMaking/makecrew★ 1same name
    4. TaiMaBenJi/taima-skills★ 1same name
    5. yaokai123/AgentPaw★ 1same name
    6. cjwind/crystal-facets★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Constitution overrides convenience: Do not delete or weaken identity/core documents to "simplify" — that is amnesia, not evolution.

    line 31
  2. Distinctive:

    Tests gate push: If the project has automated tests, failing tests block push.

    line 32
  3. Distinctive:

    When evolution runs in a loop (e.g.

    line 36
  4. Distinctive:

    After N consecutive failed cycles (e.g.

    line 38
  5. Distinctive:

    When remaining budget is below a reserve (e.g.

    line 39
  6. Distinctive:

    Write workspace: write file(s), then commit (and optionally push) via git or exec.

    line 46
  7. Distinctive:

    Ensure the session has access to git and the workspace.

    line 50
  8. Distinctive:

    After each cycle, report briefly to the user:

    line 54
  9. Distinctive:

    If the cycle was refused: reason.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Self-Evolution (OpenClaw)

Teaches the OpenClaw agent to run self-modification cycles on its own workspace: one cycle = one coherent transformation ending in a commit (and optional restart). The agent uses the workspace repo as the target of change; constitution/identity files (if present) are protected.

When this skill applies: User says "evolve", "run evolution", "self-improvement cycle", or the system enqueues an evolution task. The skill is loaded when eligible (e.g. git on PATH per metadata.openclaw.requires).

One Cycle = One Transformation

Each evolution cycle must produce at most one coherent change (or an explicit refusal with reason). No "analyze only" cycles — evolution is defined as a commit.

Cycle Steps (in order)

  1. Assessment — Read the workspace codebase. Identify where change has maximum leverage (complexity, clarity, performance, or alignment with constitution).
  2. Selection — Choose one transformation. Prefer high leverage over small tweaks.
  3. Implementation — Implement fully. No "80% done" — complete and clean.
  4. Smoke test — Run tests or a minimal verification before commit. If the project has tests (e.g. npm test, pytest), they must pass before push.
  5. Multi-model review (optional) — For significant changes (new modules, architecture, security): send diff or key files to 2–3 different LLMs with a clear review prompt; treat as advice, not mandatory.
  6. Constitution check — If the workspace has a constitution (e.g. BIBLE.md, SOUL.md): verify the change does not violate it. Identity/core files are untouchable unless the constitution allows amendments.
  7. Commit (+ optional restart) — Bump version/changelog if applicable, commit with a clear message, push. Request restart only after a successful push so the new code loads.

Invariants

  • Evolution = commit. A cycle that only produces a report or analysis is not evolution; the next cycle should either complete the change or explicitly close the direction.
  • One transformation per cycle. Prevents scope creep and keeps history interpretable.
  • Constitution overrides convenience. Do not delete or weaken identity/core documents to "simplify" — that is amnesia, not evolution.
  • Tests gate push. If the project has automated tests, failing tests block push; fix or revert.

Circuit Breaker (if running continuously)

When evolution runs in a loop (e.g. queue empty → enqueue next evolution):

  • After N consecutive failed cycles (e.g. no commit, or cost/rounds below threshold), pause evolution and notify the user. Require explicit resume.
  • When remaining budget is below a reserve (e.g. for normal conversation), stop evolution and notify.

Tools the agent uses

The OpenClaw agent relies on:

  • Read workspace: list and read files (including constitution and identity).
  • Write workspace: write file(s), then commit (and optionally push) via git or exec.
  • Run tests: exec test command (e.g. npm test, pytest); interpret pass/fail.
  • Optional: multi-model review (e.g. LLM task or external API), restart request.

Ensure the session has access to git and the workspace; sandbox settings may need to allow exec and file writes.

Output per cycle

After each cycle, report briefly to the user:

  • What was changed (file(s), intent).
  • Whether multi-model review was used and outcome.
  • New version or commit ref if applicable.
  • If the cycle was refused: reason.

Detailed reference

For full step-by-step checklist and constitution constraints, read the bundled reference: {baseDir}/references/cycle.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.