Skip to content
Development
Skill

/prompt-optimizer

A/B test CLAUDE.md instruction changes against eval benchmarks. Capture baselines, test variants, compare results.

From plugin
mycelium
5263 skills

Claude Code

$ npx -y skills add haabe/mycelium --skill prompt-optimizer --agent claude-code

SKILL.md

prompt-optimizer.SKILL.md
name: prompt-optimizer
description: "A/B test CLAUDE.md instruction changes against eval benchmarks. Capture baselines, test variants, compare results."
metadata:
  instruction_budget: "17"
  framework_dependency: "mycelium"
  framework_dependency_note: "This skill is designed to run within the Mycelium framework (https://github.com/haabe/mycelium). Standalone use will skip the canvas state, theory gates, and harness behavior the skill assumes. Install: /plugin install mycelium@haabe-mycelium."

Prompt Optimizer

Systematically improve Mycelium instructions through measurement. Adapted from n-trax.

Commands

`baseline` -- Capture current performance

1. Run `/mycelium:eval-runner run-split optimization` — record as optimization scores 2. Run `/mycelium:eval-runner run-split holdout` — record as holdout scores 3. Record both to `.claude/optimization/baseline.json`: timestamp, CLAUDE.md hash, optimization metrics, holdout metrics, overall and per-category metrics

`test <variant>` -- Test a variant

1. Read variant from `.claude/optimization/variants/<variant>.md` 2. Apply the CLAUDE.md changes described 3. Run `/mycelium:eval-runner run-split optimization` — this is the hill-climbing signal 4. Run `/mycelium:eval-runner run-split holdout` — this validates generalization 5. Store results in `.claude/optimization/results/<variant>.json` 6. Compare against baseline. Flag **overfitting** if optimization improves but holdout degrades. 7. Do NOT auto-revert -- let user decide

`report` -- Compare all variants

Generate comparison table with split-aware columns:

| Variant | Opt Pass Rate | Holdout Pass Rate | Delta Opt | Delta Holdout | Overfit? | Decision |

Flag `Overfit? = YES` when optimization delta is positive but holdout delta is negative.

`exemplar <eval-name>` -- Capture winning trajectory

After a clean eval win (1 iteration, fast), save the approach to `.claude/optimization/exemplars/`.

Workflow

1. Capture baseline 2. Hypothesize an instruction improvement 3. Document in variants/ directory 4. Test the variant 5. Compare via report 6. Keep or revert based on data 7. Capture exemplars from clean wins

Read more
@haabe
Ships withmycelium

Mycelium won't make your idea good. It keeps you and your agent honest about whether it is, from first idea to market. Built on Claude Code, where the gates are structural. The files and skills port to opencode, Codex and Cursor. Outcome over output.

Stars on GitHub

Momentum

stars in total
52
Star history of haabe/mycelium on GitHub, a chart by star-history.com

Other skills on mycelium.

a11y-check

a11y-check

Accessibility audit, scoped to the surfaces a product actually has. Detects web / rendered_markdown / terminal / native_app /…

@haabe@haabeInstall Skill
adopt

adopt

Bring Mycelium into a project that already has code. Detects that the repo predates the framework, asks before touching anything,…

@haabe@haabeInstall Skill
assumption-test

assumption-test

Design the smallest viable test to validate or invalidate a critical assumption. Based on Torres's assumption testing framework,…

@haabe@haabeInstall Skill
bias-check

bias-check

Use before any research activity or significant decision. Reviews cognitive biases relevant to the current stage.

@haabe@haabeInstall Skill
bvssh-check

bvssh-check

Use to evaluate whether current work aligns with Better Value Sooner Safer Happier. Run at diamond completion and periodically.

@haabe@haabeInstall Skill
canvas-health

canvas-health

Lint canvas files for staleness, missing fields, inconsistent evidence types, and orphaned references. Run periodically or before…

@haabe@haabeInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about prompt-optimizer.

Which coding agents can use prompt-optimizer?
prompt-optimizer installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.