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.
npx agentmods add skills/skillberry-ai/cap-evolve/agent-optimizenpx skills add skillberry-ai/cap-evolve --skill agent-optimizegit clone --depth 1 https://github.com/skillberry-ai/cap-evolveWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00073 | $0.05133 |
| Opus 5 | $0.00036 | $0.02567 |
| Sonnet 5 | $0.00015 | $0.01027 |
| Haiku 4.5 | $0.00007 | $0.00513 |
Grade A, and why
agent-optimize 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 312 lines — stays where its author put it; the contents beside it link to each section on GitHub.
agent-optimize — the free-form loop you own
The one algorithm with no deterministic subprocess and no per-iteration optimizer: you — the agent
that ran intake — are the optimizer, the scheduler and the stopping rule. cap-evolve run (with
orchestration_mode: agent) does check → baseline, prints a handoff with the run_dir, and returns. From
there the search is yours, bounded by the invariants core enforces and the project's free-text
stop_condition. Drive the existing primitives, so the run dir and dashboard stay populated as in a
deterministic run.
Shell variables used below
R="<run_dir from the agent-mode handoff>" # e.g. .capevolve/run_20250101_120000
P="<project dir>" # the dir holding capevolve.yaml + adapters/
S="${CAPEVOLVE_SKILLS_DIR:?set CAPEVOLVE_SKILLS_DIR to the skills/ dir}"
A="$S/algorithms/agent-optimize/scripts" # this skill's helpers
mkdir -p "$R/work" # working copies live here (RunDir does NOT create it)
Every script imports _bootstrap itself (no PYTHONPATH) and prints JSON on stdout.
Phase 0 — understand before you optimize
Once, before any edit, and ask the user any blocking question here so the loop then runs unattended.
Read PROJECT.md, capevolve.yaml, the adapter and every file under capability_path, and understand what
one evaluation does: what a task is, what run_target produces, what score() rewards, and what the
per-task feedback says — that is your learning signal. Note the val/test sizes, num_trials,
gate_mode/gate_k_se and the allowed edit surface.
Then let spend.py parse the free-text stop_condition rather than restating it from memory: it prints
constraints.predicates, every concrete check it could extract, with its measured actual. If
constraints.ambiguous is non-empty, ASK THE USER before the loop starts — a vague clause ("don't spend
too much", a bare number with no unit) is reported, never guessed at, and this is the one moment where
asking is cheap.
What ships with it
23 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- meta.yaml 946 B
- references/algorithm.md 15 KB
- references/edit-design-lessons.md 6.9 KB
- references/measured-lessons.md 54 KB
- references/per-task-fanout.md 8.1 KB
- scripts/_bootstrap.py 3.6 KB runs code
- scripts/abstract.py 826 B runs code
- scripts/check.py 72 KB runs code
- scripts/commit.py 11 KB runs code
- scripts/funcmerge.py 26 KB runs code
- scripts/gate_check.py 7.5 KB runs code
- scripts/host.py 52 KB runs code
- scripts/integrate.py 14 KB runs code
- scripts/linkcheck.py 2.3 KB runs code
- scripts/measure.py 13 KB runs code
- scripts/mechanisms.py 7.4 KB runs code
- scripts/merge_taskopt.py 7.8 KB runs code
- scripts/multirep.py 2.8 KB runs code
- scripts/round.py 26 KB runs code
- scripts/run.py 2.2 KB runs code
- scripts/screen.py 11 KB runs code
- scripts/spend.py 9.0 KB runs code
- scripts/taskeval.py 11 KB runs code
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.
- 2d ago First seen · 312 lines · 73 tokens per session scan A 82d1e212f4ef
agent-optimize is a skill published in the GitHub repository skillberry-ai/cap-evolve (47 stars, last pushed 2d ago), licensed Apache-2.0. It adds 73 tokens to every session and 5,133 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-30.
Other skills, from other repositories
agent-collective-intelligence-coordinator
Agent skill for collective-intelligence-coordinator - invoke with $agent-collective-intelligence-coordinator.
agent-orchestrator-task
Agent skill for orchestrator-task - invoke with $agent-orchestrator-task.
resume-session
List in-flight Ouroboros sessions and show the commands needed to re-attach after MCP disconnect.
ouroboros-config
Open or drive the Ouroboros settings GUI (browser, TUI, or conversational fallback).
ai-security
../../../engineering-team/skills/ai-security/SKILL.md.
underdeclared-agent
A helpful assistant agent.