run-optimizer

run-optimizer is a skill for Claude Code from skillberry-ai/cap-evolve. It costs 122 tokens per session (1,590 once invoked), scanned A, original, Apache-2.0.

A runner that starts a command-line coding agent selected from a registry and lets it edit a working copy of a project. It is designed for cap-evolve runs, where an agent proposes changes to improve a capability.

In plain words
What is it for?
Use it to run Claude Code, Codex, Gemini CLI, Cursor, or another shell command as the editor in an automated improvement loop.
Why use it?
It lets one workflow use different coding agents through the same interface, with each agent defined by one registry entry.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; runs codex exec; mentions Codex.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/run.py --name claude-code --workdir ./cand --prompt ./cand/INSTRUCTIONS.md --model claude-opus-4-6.

Good fit Use it to run Claude Code, Codex, Gemini CLI, Cursor, or another shell command as the editor in an automated improvement loop.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/skillberry-ai/cap-evolve
agentmods
npx agentmods add skills/skillberry-ai/cap-evolve/run-optimizer

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 run-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/run-optimizer/github.svg)](https://agentmods.dev/skills/skillberry-ai/cap-evolve/run-optimizer)
Your own site
<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/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 run-optimizer

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,590 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Excessive Agency · line 83
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
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.00122 $0.01590
Opus 5.5 $0.00049 $0.00636
Sonnet 5.5 $0.00024 $0.00318
Haiku 4.5 $0.00012 $0.00159

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

Security

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

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/_bootstrap.py, scripts/_mock_apply.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/optimizers/run-optimizer/SKILL.md · 114 lines

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

  1. The loop calls run.py --name <optimizer> --workdir <copy> --prompt INSTRUCTIONS.md.
  2. The runner reads the registry, resolves the row, and expands its command_template (placeholders below) into argv.
  3. 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).
  4. 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.
  5. --prompt must 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)

Read the full file on GitHub · 114 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. 3mo ago First seen · 114 lines · 122 tokens per session scan A 9545f46b0f73

Subscribe to this mod's changes

run-optimizer is a skill published in the GitHub repository skillberry-ai/cap-evolve (71 stars, last pushed today), licensed Apache-2.0. It adds 122 tokens to every session and 1,590 once invoked, about $0.0005 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

run-optimizer compared with skills from other repositories

run-optimizer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
run-optimizerskillberry-ai/cap-evolveSkill71todayApache-2.0A122Claude 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