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.
git clone --depth 1 https://github.com/Borda/AI-Rignpx agentmods add skills/borda/ai-rig/optimizeWrote 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/borda/ai-rig/optimize)<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.
<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>- NVIDIA SkillSpector warn
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.
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.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 |
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.
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 — 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.
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.
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.
- today Changed · +2 lines 2018b797a163
- 5d ago Changed · -2 lines fe5ecc4f5712
- 6d ago Changed · +22 lines · +7 tokens per session d7dfb0423138
- 16d ago Changed d1bda4547512
- 20d ago Changed · +2 lines 0f2297711821
- 22d ago Changed 2e83ef50d8af
- 24d ago Changed 051d9e13af83
- 1mo ago Changed 151e0838c02c
- 1mo ago Changed 2fc5c534b808
- 1mo ago First seen · 169 lines · 18 tokens per session scan A 60bfa6b3527b
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.
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…
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…
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…
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…
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.
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…