evolve

evolve is a skill for Claude Code from ruvnet/metaharness. It costs 26 tokens per session (704 once invoked), scanned A, a copy of evolve, MIT.

A self-improvement mode for a coding-agent harness in which the language model stays fixed while selected harness code changes across generations. Each candidate runs in a sandbox and is kept only if it measurably improves the tests.

In plain words
What is it for?
Use it to run real or dry evolution experiments for the harness. The default mutator works offline, restricts generated changes, runs tests in isolation, and archives only variants that pass and improve the measured result.
Why use it?
It lets you test changes to the agent's planning, context, review, retry, tool, memory, or scoring behavior without promoting unproven variants.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Part of the kimi-k3-harness plugin — 2 skills, 2 commands shipped together

Good fit Use it to run real or dry evolution experiments for the harness. The default mutator works offline, restricts generated changes, runs tests in isolation, and archives only variants that pass and improve the measured result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ruvnet/metaharness/evolve
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ruvnet/metaharness --skill evolve
Clone the repo
git clone --depth 1 https://github.com/ruvnet/metaharness

Made for: Claude Code.

Or install kimi-k3-harness, the plugin that ships this one along with the rest of its 2 skills, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for evolve

README.md
[![agentmods](https://agentmods.dev/badge/skills/ruvnet/metaharness/evolve/github.svg)](https://agentmods.dev/skills/ruvnet/metaharness/evolve)
Your own site
<a href="https://agentmods.dev/skills/ruvnet/metaharness/evolve"><img src="https://agentmods.dev/badge/skills/ruvnet/metaharness/evolve/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for evolve

Your own site · 80×15
<a href="https://agentmods.dev/skills/ruvnet/metaharness/evolve"><img src="https://agentmods.dev/badge/skills/ruvnet/metaharness/evolve.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 704 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 95% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.00704
Opus 5.5 $0.00010 $0.00282
Sonnet 5.5 $0.00005 $0.00141
Haiku 4.5 $0.00003 $0.00070

Measured 1mo ago against content hash 14b28a2866b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

evolve scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

95% identical to evolve — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

kimi-k3-harness/.claude/skills/evolve/SKILL.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

evolve — Darwin Mode self-improvement

kimi-k3-harness ships with Darwin Mode (@metaharness/darwin, ADR-070…146): the model is frozen; the harness evolves. Each generation mutates ONE of the 7 surface files (planner, contextBuilder, reviewer, retry/tool/memory/score policy), sandboxes each child, scores it, and keeps only variants that measurably improve — building an archive of successful descendants.

Run it

npm run evolve        # real substrate: runs your test command per variant (deterministic mutator — no API key, no network)
npm run evolve:dry    # mock substrate: fast, fully offline, no test execution

Or directly:

npx metaharness-darwin evolve . --sandbox real --generations 3 --children 4

Safety (secure by default)

  • Deterministic mutator is the default — no network, no API key, air-gapped.
  • Every mutation passes the validateGeneratedCode gate: no new imports, network, filesystem, shell, env access, or dependencies — pure refactor/tuning only.
  • Mutations run in a sandbox; only variants that pass your tests are archived.
  • Nothing is promoted without measured improvement (guard against Goodharting).

See @metaharness/darwin for selection strategies (--selection, --crossover, --curriculum), statistical gates (--fdr, --bench), and the real-LLM mutator (library API).

What the benchmarks taught us (measured, full SWE-bench Lite 300)

Defaults worth carrying into how you evolve and run this harness (full evidence + CIs in @metaharness/darwin's LEARNINGS.md / bench/results/RESULTS.md):

  1. Closed-loop repair is the #1 lever (~2×). Feeding test/compiler failure back and retrying took resolve-rate 7.7% → 15.3% on the same cheap model. Iterate against ground truth, don't single-shot.
  2. Cheap-first + cost-aware routing. Track $/resolve, not just resolve-rate; a cheap model resolved 31× cheaper per fix than a frontier one. Reserve frontier for measured capability gaps.
  3. Tier the models (Barbarian & Scholar). Cheap sweep + frontier on only the residual = 33.3% at ~6× lower cost than running frontier everywhere.
  4. Put the output-format contract in a system message + example, and size prompts to the model's real context window — this alone took a weak local model from 0% to ~50% valid output.
  5. Only trust batch evaluation of the final artifact — in-loop counters drift 1.5–5×.
  6. The harness multiplies the model; it can't rescue one below the task's reasoning floor. Pick the smallest model above the floor, then let evolution do the rest.

Read the full file on GitHub · 54 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 54 lines · 26 tokens per session scan A 14b28a2866b0

Subscribe to this mod's changes

evolve is a skill published in the GitHub repository ruvnet/metaharness (709 stars, last pushed today), licensed MIT. It adds 26 tokens to every session and 704 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 95% identical to evolve, differing in 2 lines, and is treated as a copy.