Auto-Optimize

Auto-Optimize is a skill for Claude Code 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 Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is Import-Module ./Scripts/Governance.psm1 -Force.

Good fit 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.

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/GuitarAlchemist/ga
agentmods
npx agentmods add skills/guitaralchemist/ga/auto-optimize

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/guitaralchemist/ga/auto-optimize/github.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/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 Auto-Optimize

Your own site · 80×15
<a href="https://agentmods.dev/skills/guitaralchemist/ga/auto-optimize"><img src="https://agentmods.dev/badge/skills/guitaralchemist/ga/auto-optimize.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.00093 $0.04453
Opus 5.5 $0.00037 $0.01781
Sonnet 5.5 $0.00019 $0.00891
Haiku 4.5 $0.00009 $0.00445

Measured 1mo ago against content hash 1381b9bf0795, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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.0004 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-31.

Related

Other skills, from other repositories

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

systematic-debugging

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

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 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

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens