Auto-Optimize

Auto-Optimize is a skill for Claude Code, Codex from GuitarAlchemist/ga. It costs 93 tokens per session (4,453 once invoked), scanned A, original, MIT.

An automated improvement loop that tests a chosen quality measure, finds the weakest result, proposes a change, and keeps it only when validation succeeds.

In plain words
What is it for?
Use it for domains such as chatbot question-answering, embeddings, voice analysis, or other areas with a baseline file and an oracle script that scores results.
Why use it?
It reduces the manual work of repeatedly testing and improving a system while checking that changes improve the metric and can be safely rolled back.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/guitaralchemist/ga/auto-optimize
Any agent
npx skills add GuitarAlchemist/ga --skill auto-optimize
Clone the repo
git clone --depth 1 https://github.com/GuitarAlchemist/ga

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 Auto-Optimize

README.md
[![agentmods](https://agentmods.dev/badge/skills/guitaralchemist/ga/auto-optimize.svg)](https://agentmods.dev/skills/guitaralchemist/ga/auto-optimize)
Your own site
<a href="https://agentmods.dev/skills/guitaralchemist/ga/auto-optimize"><img src="https://agentmods.dev/badge/skills/guitaralchemist/ga/auto-optimize.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,453 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00093 $0.04453
Opus 5 $0.00046 $0.02227
Sonnet 5 $0.00019 $0.00891
Haiku 4.5 $0.00009 $0.00445

Measured 5d ago against content hash 1381b9bf0795, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Auto-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 5d 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.

.claude/skills/auto-optimize/SKILL.md · 361 lines

How it starts

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

/auto-optimize

The generalized version of the chatbot-improvement-loop runbook (docs/runbooks/chatbot-improvement-loop.md). Where /chatbot-iterate is hard-wired to the chatbot corpus, this skill is parameterized by domain so the same Cherny pattern applies to any quality-metric loop in the workspace (chatbot-qa, embeddings, voicing-analysis, optick-sae, chatbot golden-trace signatures, etc.).

This is the Level 3 automation in the chatbot-development ladder: assistant runs cycle-by-cycle without per-cycle human approval, with hard caps + killswitch + Harness rollback validator gating every commit. Level 4 (auto-merge on multi-LLM green) is still gated behind Phase 2's Ollama-vs-cloud signal measurement (see docs/plans/ 2026-05-14-arch-cherny-adoption-and-tribunal-ci-plan-v2.md §Phase 2, item 6).

Inputs

Pass via skill args as key=value pairs:

Input Required Example
domain yes chatbot-qa, embeddings, voicing-analysis, optick-sae
oracle_script_path yes Scripts/run-prompt-corpus.ps1
baseline_path yes state/quality/chatbot-qa/baseline.json
max_iterations no (10) hard cap on cycles per invocation
plateau_window no (5) how many consecutive sub-threshold improvements before exit
plateau_threshold no (0.005) minimum relative metric delta to count as progress

The domain value drives every path computed by the skill — lock, artifact dir, protected paths, etc. Picking a domain value that doesn't already have a state/quality/<domain>/baseline.json is an error; see Step 0.

Iron Laws

1. NEVER commit without the roundtrip validator passing.
2. NEVER edit a protected file (declared in baseline._protected_paths
   or matching the global protected-paths-hook pattern).
3. NEVER exceed max_commits_per_session=50 or max_wall_clock_minutes=480.
4. ALWAYS release the .lock on exit (success, failure, or kill).
5. ALWAYS check state/.loop-halted and the per-domain .STOP marker
   BEFORE every iteration, not just at start.
6. SELF-GOVERN from the ledger via `Scripts/loop-decide.ps1` (Step 3.9):
   `stop-plateau` → exit; `halt-oscillating` / `halt-misfire` → halt AND
   emit an algedonic signal (escalate, never silent). The loop decides when
   to stop from the durable trajectory — not a fixed count, not its own
   optimism. Stopping at the right time IS the job; it is not failure.

Read the full file on GitHub · 361 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. 5d ago First seen · 361 lines · 93 tokens per session scan A 1381b9bf0795

Subscribe to this mod's changes

Auto-Optimize is a skill published in the GitHub repository GuitarAlchemist/ga (2 stars, last pushed yesterday), licensed MIT. It adds 93 tokens to every session and 4,453 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens