/skill-creator-pro:auto-optimizefrom skill-creator-pro
Autonomously optimizes an existing skill's output quality by running it repeatedly, scoring against binary evals, mutating the prompt, and keeping improvements. Started only by the user, because it edits the skill in place and runs many paid model calls.
Ships in skill-creator-pro. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Bundled with
skill-creator-pro. This skill reads design guidance from its sibling via${CLAUDE_SKILL_DIR}/../skill-creator-pro/. The two skills ship together in theskill-creator-proplugin and cannot be installed separately.
Most skills work about 70% of the time. The other 30% you get garbage. The fix isn't to rewrite the skill from scratch. It's to let an agent run it dozens of times, score every output, and tighten the prompt until that 30% disappears.
This skill adapts Andrej Karpathy's autoresearch methodology to Claude Code skills, enhanced with:
Take any existing skill, define what "good output" looks like as binary yes/no checks, then run an autonomous loop that:
Output: An improved SKILL.md + results.json log + structured changelog.md + a live HTML dashboard.
STOP. Do not run any experiments until the fields below are confirmed with the user. Ask for any missing fields before proceeding.
Do NOT ask the user for eval criteria yet. Evals come from observing real failures, not from guessing upfront.
Before changing anything, read and understand the target skill completely.
references/ that the skill links to${CLAUDE_SKILL_DIR}/../skill-creator-pro/SKILL.md -- the "Skill Writing Guide", "Progressive Disclosure", and "Description Optimization" sections cover gotchas, progressive disclosure, and description-as-triggerhttps://code.claude.com/docs/llms.txt and the relevant page to verify against the latest specDo NOT skip this. You need to understand both the skill AND what makes skills work before you can improve it.
Run the skill AS-IS for one full experiment: every test input, R times each. These outputs become the baseline in Step 5, so they must match what each later experiment runs. Do NOT score anything yet -- just collect outputs and observe.
${CLAUDE_PLUGIN_DATA}/autoresearch-[skill-name]/ -- never next to the target skill, where it would ship with the skillSKILL.md.baselineexp-0/While reviewing outputs, identify failure patterns:
The highest-signal content comes from real failure points, not theoretical checklists.
Every run -- discovery and experiment alike -- goes to a fresh subagent, because this session knows the evals and would quietly write toward them, and a subagent that saw earlier runs would copy them. Give each subagent only the target skill's path, one test input, and the file to save its output to; never the eval criteria or other outputs. Launch all of one experiment's runs (every input x R) in the same turn so they finish together, and save them under exp-[N]/.
Based on the failure patterns you observed in discovery runs, propose 3-6 binary eval criteria to the user.
Format each eval as:
EVAL [number]: [Short name]
Question: [Yes/no question about the output]
Pass condition: [What "yes" looks like -- be specific]
Fail condition: [What triggers a "no"]
Present the proposed evals and explain which observed failures each one targets. The user confirms, adjusts, or adds their own.
Rules for good evals (the assertion schema lives in ${CLAUDE_SKILL_DIR}/../skill-creator-pro/references/schemas.md):
Max score calculation:
max_score = [number of evals] x [number of test inputs] x R
IMPORTANT: Do not proceed to the experiment loop until the user confirms the eval criteria.
Before running experiments, write results.json in the workspace (schema below), render the dashboard, and open it:
python3 ${CLAUDE_SKILL_DIR}/scripts/render_dashboard.py <workspace>/results.json <workspace>/dashboard.html
open <workspace>/dashboard.html
The script inlines the data into the page -- a page that fetches results.json is blocked from file:// -- and the page reloads every 10 seconds while status is "running". It shows the pass-rate progression, a colored bar per experiment, per-eval pass rates with trend arrows, and the experiment table.
Update results.json and re-run the script after every experiment so the dashboard stays current:
{
"skill_name": "[name]",
"status": "running",
"current_experiment": 3,
"baseline_score": 70.0,
"best_score": 90.0,
"consecutive_discards": 0,
"experiments": [
{
"id": 0,
"score": 14,
"max_score": 20,
"pass_rate": 70.0,
"status": "baseline",
"description": "original skill -- no changes",
"reflection": null,
"per_eval": [
{"name": "Text legibility", "passed": 4, "total": 5},
{"name": "Color contrast", "passed": 3, "total": 5}
]
}
]
}
When the run finishes, set status to "complete" and render once more.
Now score the discovery run outputs (from Step 2) against the confirmed evals. This is experiment #0.
IMPORTANT: After establishing baseline, confirm the score with the user before proceeding. If baseline is already 90%+, the skill may not need optimization -- ask if they want to continue.
This is the core autoresearch loop. Once started, run autonomously until stopped.
LOOP:
This is where auto-optimize diverges from blind mutation. Instead of guessing what might help, you read the evidence.
Collect failed outputs. From the most recent experiment, gather every output that failed at least one eval.
Read the failures. Actually read the failing outputs -- not just the scores. Look for:
Diagnose the root cause. Map each failure pattern back to a specific gap or ambiguity in the SKILL.md. Ask: "What instruction caused this, or what missing instruction allowed this?"
Form a targeted hypothesis. Not "maybe I should add something about X" but a specific, falsifiable claim:
Bad: "Adding a color instruction might help" Good: "Eval 3 fails because the skill says 'use appropriate colors' -- the model picks neon green 60% of the time. Replacing with a specific hex palette should fix this."
The hypothesis must be specific enough that after running the experiment, you can say whether it was right or wrong. If you can't articulate what you expect to change and why, you're guessing.
For detailed reflection techniques and examples, read ${CLAUDE_SKILL_DIR}/references/reflection-guide.md.
Based on the reflection, make ONE targeted change to SKILL.md.
For mutation strategies, consult the "Skill Writing Guide", "Writing Patterns", and "Writing Style" sections of ${CLAUDE_SKILL_DIR}/../skill-creator-pro/SKILL.md. Key principle: one change at a time so you know what helped.
Bad mutations:
Run the mutated skill for one full experiment (every input x R, see "How to run the skill"), saving to exp-[N]/. Score every output against every eval. Record both total score and per-eval scores.
Before deciding, check two things:
Per-eval regression check. Compare each eval's pass count against the current best. If any single eval dropped by 2+ passes while the total score went up, that's the "balloon effect" -- one area improving while another quietly breaks. Flag it in the log and discard unless the overall gain clearly outweighs the regression.
Marginal improvement check. If the total score improved by less than 5% absolute (e.g., 70% to 73%), mark the experiment as "marginal" in the log. Still keep it, but note the uncertainty. If you accumulate 3+ marginal keeps in a row without a clear win, be suspicious -- the score may have drifted up through luck, not real improvement. Consider re-running the current SKILL.md against baseline to verify the cumulative gain is real.
Decision:
After deciding, update results.json and the structured archive.
Track consecutive discards. When the count hits thresholds, escalate:
3 consecutive discards -- soft reset:
5 consecutive discards -- hard reset:
skill-creator-pro/SKILL.md design sections -- there may be a structural pattern you haven't tried8 consecutive discards -- plateau:
Reset the consecutive discard counter whenever a mutation is kept.
Once the loop starts, keep going without pausing to ask the user -- they started a hands-off run and may be away, so a question just stalls it. Run until:
The changelog is NOT just a flat log -- it's a structured document that future sessions (or fresh contexts) can read to continue where you left off.
Maintain changelog.md in the workspace with three sections -- Current Understanding (update after every kept mutation), Experiment Log (append after every experiment), and Ideas Backlog (add during reflection, prune after trying). Templates: ${CLAUDE_SKILL_DIR}/references/changelog-template.md.
When the user returns or the loop stops, present:
dashboard.html, results.json, changelog.md, SKILL.md.baseline, exp-*/)A good autoresearch run:
If the skill "passes" all evals but the actual output quality hasn't improved -- the evals are bad, not the skill. Go back to Step 3 and write better evals.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
skill-optimization, prompt-mutation, autoresearch, eval-driven
2 skills in this plugin
npx claudepluginhub leejuoh/claude-code-zero --plugin skill-creator-proOther plugins' skills for the same job