optimize

optimize is a skill for Claude Code, Codex from Borda/AI-Rig. It costs 25 tokens per session (2,857 once invoked), scanned A, original, Apache-2.0.

A controlled way to improve a measurable result through a limited number of changes, while checking safety conditions and recording each attempt.

In plain words
What is it for?
Use it for bounded performance or quality experiments with a metric command, guard checks, allowed files, and rollback criteria.
Why use it?
It prevents endless tweaking and helps catch changes that improve one measurement while breaking something else.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is Before asking, read [User Questions](../../shared/codex-user-questions.md). Waits, plan updates, and test runs follow [Agent Waits](../../shared/native-skill-co.

Good fit Use it for bounded performance or quality experiments with a metric command, guard checks, allowed files, and rollback criteria.

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/Borda/AI-Rig
agentmods
npx agentmods add skills/borda/ai-rig/optimize

Made for: Claude Code, Codex.

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 optimize

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/borda/ai-rig/optimize"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,857 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 Tool Misuse · line 77
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
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.00025 $0.02857
Opus 5.5 $0.00010 $0.01143
Sonnet 5.5 $0.00005 $0.00571
Haiku 4.5 $0.00003 $0.00286

Measured today against content hash 2018b797a163, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

The scan reads SKILL.md. This mod also ships 1 executable file (campaign.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.

plugins/codex-rig/skills/optimize/SKILL.md · 193 lines

How it starts

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

Before asking, read User Questions. Waits, plan updates, and test runs follow Agent Waits, Plan Updates, and Sandboxed Test Runs.

Optimize

Task-size routing follows Proportional Execution; this skill's specialized lifecycle and acceptance checks remain authoritative.

Metric-driven optimization with explicit guards, rollback criteria, experiment log.

Input Schema

{
  "goal": "required measurable improvement objective",
  "mode": "single|campaign|resume|ablation|retrospective",
  "checkpoint": "optional boolean for a resumable numeric campaign; default false",
  "source_run": "required existing managed run directory for resume, ablation, or retrospective",
  "variants": "ablation only: bounded named component-removal patches and their rationale",
  "metric_cmd": "required for single and campaign; for resume, ablation and retrospective recovered from source_run: command that emits or validates the target metric",
  "metric_direction": "higher|lower",
  "guard_cmd": "required for single and campaign; recovered from source_run otherwise: command that must continue to pass",
  "max_iterations": "optional integer, default 1",
  "min_delta": "optional practical significance threshold",
  "scope_files": [
    "paths the optimization may edit"
  ],
  "done_when": "metric improves without guard regression"
}

For resume, recover goal, commands, scope, direction and total budget from source_run; supplied replacements must match the frozen configuration. ablation and retrospective derive measurement configuration from that source rather than requiring duplicate inputs. Existing single and non-checkpointed campaign accept numeric or pass/fail metrics unchanged. The checkpoint helper and new numerical analyses require finite numeric values; explain unsupported historical/pass/fail input instead of inventing a metric or migrating a log silently.

Read the full file on GitHub · 193 lines

Files

What ships with it

5 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. today Changed · +2 lines 2018b797a163
  2. 5d ago Changed · -2 lines fe5ecc4f5712
  3. 6d ago Changed · +22 lines · +7 tokens per session d7dfb0423138
  4. 16d ago Changed d1bda4547512
  5. 20d ago Changed · +2 lines 0f2297711821
  6. 22d ago Changed 2e83ef50d8af
  7. 24d ago Changed 051d9e13af83
  8. 1mo ago Changed 151e0838c02c
  9. 1mo ago Changed 2fc5c534b808
  10. 1mo ago First seen · 169 lines · 18 tokens per session scan A 60bfa6b3527b

Subscribe to this mod's changes

optimize is a skill published in the GitHub repository Borda/AI-Rig (28 stars, last pushed today), licensed Apache-2.0. It adds 25 tokens to every session and 2,857 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

i18n-parity

MANDATORY for every coding agent and contributor touching localized content — keep all five localization surfaces (dashboard UI keys, wiki page, full mirrored guides, locale-aware formatting, language switchers) in parity across every supported language. Use automatically (without being asked) whenever you add or…

hoangsonww/Claude-Code-Agent-Monitor · 95 tokens

file-headers

MANDATORY for every coding agent (Claude Code, Codex, or any other) on every change-set — every applicable source file the agent creates or updates MUST start with the project's copyright/authorship header (file overview + exact author line). Use automatically whenever writing a new file or editing an existing one; do…

hoangsonww/Claude-Code-Agent-Monitor · 101 tokens

productivity-score

Calculate a productivity score using actual Agent Monitor metrics — session completion rates, cache efficiency (cacheread vs input), compaction pressure (baseline tokens), turn velocity (turncount / totalturndurationms), tool success ratio (PreToolUse vs PostToolUse), and the workflow intelligence API's complexity and…

hoangsonww/Claude-Code-Agent-Monitor · 67 tokens

dashboard-status

Quick dashboard health and status overview — checks the Agent Monitor API (port 4820), reports session/agent/event counts from /api/stats, confirms WebSocket connectivity, reads the redacted hook status returned by /api/settings/info, and shows data freshness (last event timestamp). Use to verify the monitoring system…

hoangsonww/Claude-Code-Agent-Monitor · 69 tokens

dag-map

Render the multi-agent orchestration DAG for a session — parent→child subagent edges, tree depth, and fan-out — from the Agent Monitor workflow intelligence API. Cross-checks the orchestration dataset against the raw agent records and session detail. Use when visualizing how a session's agent structure was organized.

hoangsonww/Claude-Code-Agent-Monitor · 65 tokens

benchmark

Benchmark one session (or a small recent set) against the rolling average using Agent Monitor data — cost, total tokens, tool count, and workflow complexity score — and report where each metric lands as a percentile of the population. Tells you whether a session was normal, cheap, or an outlier. Use when judging…

hoangsonww/Claude-Code-Agent-Monitor · 76 tokens