agent-optimize

agent-optimize is a skill for Claude Code from skillberry-ai/cap-evolve. It costs 89 tokens per session (2,963 once invoked), scanned A, original, Apache-2.0.

A free-form optimization loop in which the coding agent proposes, tests, and evaluates changes to an agent-orchestration capability.

In plain words
What is it for?
Use it in agent orchestration mode to inspect a project, create a baseline, edit capability files, run screening and full validation, and decide when to stop.
Why use it?
It provides a controlled way to search for improvements while keeping run data, validation results, and a final test record.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

Good fit Use it in agent orchestration mode to inspect a project, create a baseline, edit capability files, run screening and full validation, and decide when to stop.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skillberry-ai/cap-evolve/agent-optimize
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 skillberry-ai/cap-evolve --skill agent-optimize
Clone the repo
git clone --depth 1 https://github.com/skillberry-ai/cap-evolve

Made for: Claude Code.

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 agent-optimize

README.md
[![agentmods](https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/agent-optimize/github.svg)](https://agentmods.dev/skills/skillberry-ai/cap-evolve/agent-optimize)
Your own site
<a href="https://agentmods.dev/skills/skillberry-ai/cap-evolve/agent-optimize"><img src="https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/agent-optimize/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 agent-optimize

Your own site · 80×15
<a href="https://agentmods.dev/skills/skillberry-ai/cap-evolve/agent-optimize"><img src="https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/agent-optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,963 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00089 $0.02963
Opus 5.5 $0.00036 $0.01185
Sonnet 5.5 $0.00018 $0.00593
Haiku 4.5 $0.00009 $0.00296

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

Security

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 1mo ago.

The scan reads SKILL.md. This mod also ships 39 executable files (scripts/_bootstrap.py, scripts/ablate.py, scripts/abstract.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/algorithms/agent-optimize/SKILL.md · 168 lines

How it starts

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

agent-optimize — the loop you own

You are the optimizer. cap-evolve run (agent mode) does check -> baseline and hands you R. Everything else is six act.py verbs and one digest.py; the scripts decide, you judge.

Honest statistics (read twice)

  1. Noise sd of a full-val mean is ~0.05 (30 tasks x 3 trials): only big effects are resolvable. Never re-test a within-noise delta; make a bigger edit instead.
  2. Never view test traces. Test is sealed, scored ONCE at finalize, and development-exposed after use.

Details only when needed: references/stats.md.

Setup

The loop REQUIRES the new engine. Put this in capevolve.yaml (or export CAPEVOLVE_<NAME>=1):

optimizer:
  ablation: {dag_parallel: true, active_eval: true, smart_merge: true, cost_gating: true,
             failure_clustering: true, pregate: true, context_digest: true}

Stock default has active_eval OFF: probe --auto then silently runs FULL val. The digest prints !! CONFIG: ... at the top (after any INFRA line) when any switch is off; fix it before looping. Switches: references/ablation.md.

R="<run_dir from the handoff>"; P="<project dir>"
S="${CAPEVOLVE_SKILLS_DIR:?set to the skills/ dir}"; A="$S/algorithms/agent-optimize/scripts"
mkdir -p "$R/work"
python "$A/spend.py" --run-dir "$R" --project "$P"      # parses stop_condition; ask the user if constraints.ambiguous
python "$A/digest.py" --run-dir "$R" --project "$P"     # first line must NOT start with "!! CONFIG"
BEST=$(python "$A/digest.py" --run-dir "$R" --project "$P" --format json | python -c 'import json,sys;print(json.load(sys.stdin)["champion"]["id"])')

BEST is the digest's champion (re-read it after every promote). Read once: PROJECT.md, capevolve.yaml, the adapter, the files under capability_path, optimizer/INSTRUCTIONS.md if present (benchmark facts only; ignore its "one edit" advice).

The loop

python "$S/phases/diagnose/scripts/run.py" --run-dir "$R" --tag "$BEST" --split val --cluster v2 > /dev/null
python "$A/digest.py" --run-dir "$R" --project "$P"

Read the full file on GitHub · 168 lines

Files

What ships with it

49 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.

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 Changed · +20 lines cf4aa5fb1fb2
  2. 1mo ago Changed · -185 lines · +16 tokens per session 69fcbe869d25
  3. 1mo ago Changed · +1 lines f2e2fab3805f
  4. 1mo ago Changed e89d2defac87
  5. 1mo ago Changed · +8 lines d4c8a27aae2e
  6. 1mo ago Changed · +1 lines 421c13c73a64
  7. 2mo ago Changed · +2 lines 181480cc5227
  8. 2mo ago Changed · -1 lines 9c00cd1f7e5b
  9. 2mo ago Changed c9e18a4b06e6
  10. 2mo ago First seen · 322 lines · 73 tokens per session scan A 5ec9f3096659

Subscribe to this mod's changes

agent-optimize is a skill published in the GitHub repository skillberry-ai/cap-evolve (71 stars, last pushed today), licensed Apache-2.0. It adds 89 tokens to every session and 2,963 once invoked, about $0.0004 per session on Opus 5.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.

Related

agent-optimize compared with skills from other repositories

agent-optimize next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agent-optimizeskillberry-ai/cap-evolveSkill71todayApache-2.0A89Claude Code
worker-integrationruvnet/rufloSkill83ktodayMITA14Claude Code
agentmailpaperclipai/paperclipSkill118ktodayMITA30Claude Code, Codex
tao-run-inference-serviceNVIDIA/skillsSkill4.2ktodayApache-2.0A92Claude Code
nemo-automodel-launcher-configNVIDIA/skillsSkill4.2ktodayApache-2.0A30Claude Code
tao-generate-image-groundingNVIDIA/skillsSkill4.2ktodayApache-2.0A95Claude Code
mochi-remindkirodotdev/KiroCrewSkill5.2ktodayApache-2.0A20Claude Code, Codex