apply-agent-evolution

A skill for bringing the winning result from an agent-evolution experiment into the live repository. It shows the proposed changes and asks for confirmation before copying files.

In plain words
What is it for?
Use it to check the selected winner, inspect file differences, confirm passing gates, and apply approved changes to the live repository.
Why use it?
It adds a review and safety step before experimental changes replace files in the working project.

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/apply-agent-evolution
Any agent
npx skills add fmind/agent-evolutions --skill apply-agent-evolution
Clone the repo
git clone --depth 1 https://github.com/fmind/agent-evolutions

Made for: Claude Code, Codex.

Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 738 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00056 $0.00738
Opus 5 $0.00028 $0.00369
Sonnet 5 $0.00011 $0.00148
Haiku 4.5 $0.00006 $0.00074

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

Security

Grade C, and why

apply-agent-evolution scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

Variant workspaces stay as audit trail — the user removes them with `git worktree remove` (kind: worktree) or `rm -rf` (kind: files) when ready.
skills/apply-agent-evolution/SKILL.md · 66 lines

How it starts

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

apply-agent-evolution

Land the winner of <id-or-slug> into the live repo. Read-only until the user confirms.

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 already set → terminal. "Evolution <id> already applied (winner: <variant_id>)." Stop.
  • winner not set → "No winner picked yet. Run /run-agent-evolution <id> first." Stop.

1. Pre-flight

Confirm winner.variant_id references a variant with status: evaluated and every gate passing — otherwise stop. Confirm git status --porcelain is clean over scope.include paths; on overlap, list conflicts and stop (commit, stash, or revert first).

2. Compute the diff

Branch on scope.kind:

  • worktreegit -C <workspace> diff --no-index --stat HEAD <live> if the workspace shares git history; otherwise plain diff -r. Restrict to scope.include, exclude scope.exclude.
  • files — for each scope.include path, diff workspace copy against live file. Treat missing-on-one-side as add/delete.

Surface git diff --stat summary plus per-file diff body. If > 400 lines combined, show the stat and offer the full diff on request.

Reject paths under scope.exclude — list offenders and stop.

3. Confirm and apply

Wait for explicit confirmation ("looks good", "apply", "go"). On abort, leave the evolution as-is.

Copy each changed file (create parent dirs); rm deleted ones. Don't run formatters — gates already enforced quality. Capture git status --porcelain; write to evolution.yaml:

applied:
  at: "<now>"
  files_changed: [...]

Bump updated_at. Refresh §TL;DR in EVOLUTION.md (Applied, files changed).

Read the full file on GitHub · 66 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 · 66 lines · 56 tokens per session scan C a6b4d231f2c9

Subscribe to this mod's changes

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