run-agent-evolution

A workflow for running an agent-evolution experiment through repeated batches of variants. It dispatches worker agents, evaluates their results, records what was learned, and selects a winning version.

In plain words
What is it for?
It is for resuming or running generations of variants, checking their results, learning between batches, and preparing the winner to be applied.
Why use it?
It manages the bookkeeping and repeated comparison needed when testing several agent changes instead of handling each variant manually.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/fmind/agent-evolutions/run-agent-evolution
Any agent
npx skills add fmind/agent-evolutions --skill run-agent-evolution
Clone the repo
git clone --depth 1 https://github.com/fmind/agent-evolutions

Made for: Claude Code, Codex.

Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,750 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00081 $0.01750
Opus 5 $0.00041 $0.00875
Sonnet 5 $0.00016 $0.00350
Haiku 4.5 $0.00008 $0.00175

Measured yesterday against content hash 9e8005d65a01, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

run-agent-evolution 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 yesterday.

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.

skills/run-agent-evolution/SKILL.md · 98 lines

How it starts

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

run-agent-evolution

Drive the genetic loop for <id-or-slug>. State is derived from evolution.yaml field presence — re-read between phases.

0. Dispatch

Resolve the argument:

  • Pure integer → match the leading <id> under .agents/evolutions/<id>-*/.
  • String → match a slug fragment; on multi-match pick the lowest <id> and note in chat.

Read evolution.yaml (validated against evolution.schema.json). Branch:

  • Directory missing → "No evolution found for <arg>. Run /new-agent-evolution <title> to capture one." Stop.
  • applied set → terminal. "Evolution <id> already applied (winner: <variant_id>)." Stop.
  • winner already set → "Winner already picked (v<n>). Run /apply-agent-evolution <id> to land it." Stop.
  • Otherwise → continue.

Each iteration is one generation — a batch of up to budget.parallel variants planned, executed, recorded together. The generation boundary is where the loop learns.

1. Resume sweep

On entry, reset any running variants without a result.json to pending and re-dispatch them. Variants with result.json already on disk → ingest immediately and mark evaluated.

2. Stop conditions (first match wins)

  • len(variants) >= budget.max_variants → stop, pick winner.
  • budget.max_minutes set and elapsed ≥ it → stop, pick winner.
  • budget.plateau_generations set and top score has not improved over the last N gens (need ≥ 2 full gens) → stop, pick winner.
  • gen >= 2 and zero eligible variants → abort; gate spec is likely broken.

3. Plan the next batch

Compute gen = max(variant.generation) + 1 (or 1). batch_size = min(parallel, max_variants - len(variants)).

Generation 1 — seed for diversity. For each seed, pick a distinct dimension to vary (algorithm, data structure, library, prompt style, control flow). Write a one-line falsifiable hypothesis and a 5–15 line approach concrete enough that a sub-agent can implement it without re-deriving. parents: [].

Generation 2+ — mutate, cross, explore. Read survivors (status evaluated, all gates passing, sorted by the composite score from §5). Mix per your judgment: mutations (parents: [v_n]), crossovers (parents: [v_a, v_b]), and one or two explores (fresh dimension; parents: []). When all prior variants failed gates, do not propagate them — diagnose and seed fresh.

Read the full file on GitHub · 98 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. yesterday First seen · 98 lines · 81 tokens per session scan A 9e8005d65a01

Subscribe to this mod's changes

run-agent-evolution is a skill published in the GitHub repository fmind/agent-evolutions (1 stars, last pushed 3mo ago), licensed MIT. It adds 81 tokens to every session and 1,750 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.