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/run-optimizernpx skills add skillberry-ai/cap-evolve --skill run-optimizergit clone --depth 1 https://github.com/skillberry-ai/cap-evolveWrote 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.
[](https://agentmods.dev/skills/skillberry-ai/cap-evolve/run-optimizer)<a href="https://agentmods.dev/skills/skillberry-ai/cap-evolve/run-optimizer"><img src="https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/run-optimizer.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00122 | $0.01590 |
| Opus 5 | $0.00061 | $0.00795 |
| Sonnet 5 | $0.00024 | $0.00318 |
| Haiku 4.5 | $0.00012 | $0.00159 |
Grade A, and why
run-optimizer 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 4d 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 — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
run-optimizer — one runner, a registry of agents
An optimizer is the agent that reads the current capability + the failure
diagnosis and proposes an edit. Every such agent follows the same contract: given
a working directory (a copy of the parent candidate) and an INSTRUCTIONS.md,
edit the files in place. Because the contract is identical, one runner serves them
all — the only thing that varies per agent is the shell command, which lives as a
row in optimizers/registry.yaml. Adding an optimizer is one YAML row, not a
new skill directory.
How it works
- The loop calls
run.py --name <optimizer> --workdir <copy> --prompt INSTRUCTIONS.md. - The runner reads the registry, resolves the row, and expands its
command_template(placeholders below) into argv. - It runs that command with
cwd = workdir, so the agent edits the candidate files directly. Output is summarized as JSON (returncode,auth_present,stdout_tail). - Streams: stdout is exactly one JSON object; the agent CLI's stderr is relayed to the runner's stderr on success as well as failure, so a CLI that prints a diagnostic and exits 0 is not silently successful.
--promptmust name an existing file — the caller resolves the path. A missing one is an error (exit 2), never an empty prompt: the{prompt_text}rows would otherwise bill a real agent CLI to run with no instructions at all.
Template placeholders
| placeholder | expands to |
|---|---|
{workdir} |
the candidate working copy (also the cwd) |
{prompt} |
path to INSTRUCTIONS.md |
{prompt_text} |
the contents of INSTRUCTIONS.md (for CLIs that take the prompt inline) |
{model} |
the resolved model id; an empty {model} drops itself and a preceding -m/--model |
{self_dir} |
the runner's own scripts dir (used by the mock row) |
${VAR} |
environment expansion (the generic/openclaw/antigravity escape hatches read their command from env) |
Choosing an optimizer (--name / optimizer_skill)
What ships with it
20 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 366 B
- references/antigravity.md 1.7 KB
- references/claude-code.md 11 KB
- references/codex.md 1.8 KB
- references/copilot.md 1.5 KB
- references/cursor.md 1.5 KB
- references/droid.md 1.4 KB
- references/gemini-cli.md 1.9 KB
- references/generic.md 456 B
- references/ibm-bob.md 1.9 KB
- references/kimi.md 1.6 KB
- references/mock.md 582 B
- references/openclaw.md 1.4 KB
- references/opencode.md 1.8 KB
- references/pi.md 1.6 KB
- scripts/_bootstrap.py 3.6 KB runs code
- scripts/_mock_apply.py 4.0 KB runs code
- scripts/abstract.py 1.1 KB runs code
- scripts/check.py 2.9 KB runs code
- scripts/run.py 23 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.
- 4d ago First seen · 114 lines · 122 tokens per session scan A 9545f46b0f73
run-optimizer is a skill published in the GitHub repository skillberry-ai/cap-evolve (50 stars, last pushed today), licensed Apache-2.0. It adds 122 tokens to every session and 1,590 once invoked, about $0.0006 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
ax-cpp-ai
Use when writing C++ code with axllm for named deployment profiles, generic provider clients, model selection, OpenAI-compatible calls, Responses, Gemini, Anthropic, routers, and balancers.
ax-cpp-agent-memory-skills
Use when writing C++ code with axllm for agent memory, recall callbacks, dynamic skill discovery, loaded-skill state, and used-skill tracking.
ax-cpp-agent-observability
Use when writing C++ code with axllm for agent tracing, centralized and multi-tenant usage accounting, action logs, runtime diagnostics, replay, and production debugging.
ax-cpp-flow
Use when writing C++ code with axllm for flows, nodes, program graphs, nested programs, dynamic options, caching, and optimizer components.
ax-go-agent-memory-skills
Use when writing Go code with github.com/ax-llm/ax/packages/go for agent memory, recall callbacks, dynamic skill discovery, loaded-skill state, and used-skill tracking.
ax-go-agent-observability
Use when writing Go code with github.com/ax-llm/ax/packages/go for agent tracing, centralized and multi-tenant usage accounting, action logs, runtime diagnostics, replay, and production debugging.