Skip to main content
skill CX Codex

prompt-optimizer · haabe — Claude Code skill: A/B test CLAUDE.md edits

Runs your CLAUDE.md edits against two eval splits and shows whether the gain is real or just fitting the test set.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add haabe/mycelium --skill prompt-optimizer -a claude-code
Open on GitHub

What prompt-optimizer does

The skill moves in steps. baseline fires two eval splits through /mycelium:eval-runner and writes a snapshot to .claude/optimization/baseline.json — timestamp, CLAUDE.md hash, per-category metrics. You then describe a hypothesis in .claude/optimization/variants/<variant>.md and call test <variant>.

Two splits carry the point. The optimization split is the hill-climbing signal, holdout checks whether the win travels to other tasks. When optimization goes up and holdout goes down, the skill flags overfitting. Nothing reverts on its own; you decide. report lays every variant out in a table with both splits side by side and an Overfit? column.

The skill is built to run inside the Mycelium framework. On its own it skips the canvas state, theory gates and harness behavior it assumes. Install the framework first: /plugin install mycelium@haabe-mycelium.

What it helps with

  • check whether a CLAUDE.md edit actually moves eval results
  • catch a variant that only fits one test split
  • save a snapshot of current metrics before experimenting
  • compare several instruction variants in one table
  • keep a clean winning run as a reference exemplar

Example prompts for the agent

  • Capture a baseline for the current CLAUDE.md
  • Test the strict-tools variant and compare it to baseline
  • Build the report across all variants and flag any overfitting

How to install prompt-optimizer

1Skills CLI (Vercel)

npx skills add haabe/mycelium --skill prompt-optimizer -a claude-code

2Manually: put the files in place

~/.claude/skills/prompt-optimizer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/prompt-optimizer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about prompt-optimizer

How do I install prompt-optimizer in Claude Code?

Run npx skills add haabe/mycelium --skill prompt-optimizer -a claude-code. The skill lands at ~/.claude/skills/prompt-optimizer/SKILL.md.

What does prompt-optimizer do?

It runs instruction edits through two eval splits, compares them against a stored baseline, and marks variants where the optimization split improves while holdout drops.

Does prompt-optimizer work without Mycelium?

No. It is designed to run inside the Mycelium framework and relies on its canvas state, theory gates and harness. Install the framework with /plugin install mycelium@haabe-mycelium.

Source text

SKILL.md · MIT
---
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

© haabe · MIT · haabe/mycelium

Similar skills

All skills for Agent setup: memory, context, orchestration →

prompt-optimizer by other authors comes first.

prompt-optimizer YannJY02 Analyzes draft prompts, finds missing project context, and matches ECC commands. Prepares a ready-to-paste prompt before you start complex tasks. CX Codex +1 5,300installs prompt-optimizer official github Converts rough drafts, tasks, and half-formed ideas into finished, copy-pasteable chat prompts without placeholder variables. 467installs prompt-optimizer getsentry A skill that rewrites system and agent prompts against a set of eval cases instead of gut feeling. Useful when a prompt exists but behaves inconsistently. CX Codex +1 2,300installs prompt-optimizer daymade Turns a vague prompt or feature request into a testable EARS specification. Useful when a task has no triggers and no measurable outcomes. CX Codex +1 2,100installs prompt-optimizer ckanner This skill takes a rough request to an AI model and hands back a rewritten one, with the vague parts pinned down and the output format spelled out. CX Codex +1 ★ 23repo stars skill-optimizer mcollina A skill for people who write and edit skills: it shows why a model ignores yours and whether it makes output worse. CX Codex +1 1,400installs skill-autoresearch akillness Runs edits to skills, prompts and SOPs through a frozen local benchmark: one change per run, then keep or revert. CX Codex +1 322installs write-judge-prompt ai-evals-course Walks you through one binary Pass/Fail LLM-as-Judge evaluator for a subjective failure mode: tone, faithfulness, relevance. Useful when code checks fall short. CX Codex +1 1,100installs prompt-engineer-toolkit Alireza Rezvani Tests, compares, and versions marketing prompts against structured cases. Use it when prompt quality needs evidence before a rollout or model change. 623installs prompt-governance Alireza Rezvani Manages production prompts as versioned code, builds automated eval pipelines, and prevents quality regressions across AI deployments. 40installs improve-agent Seth Hobson Walks an existing agent through baselines, prompt fixes and A/B tests so you know what actually broke. CX Codex ★ 41,823repo stars

From the same set14

usability-check Runs a screen-level usability review against Nielsen's 10 heuristics and returns a pass/partial/fail table, useful before calling UI work done. CX Codex +1 ★ 47repo stars team-shape Checks your teams against Team Topologies: types, cognitive load, interaction modes and whether the architecture follows Conway's Law on purpose. CX Codex +1 ★ 47repo stars retrospective Logs a completed cycle to the canvas: what you predicted, what actually happened, where the estimate missed. Keeps retros on data instead of memory. CX Codex +1 ★ 47repo stars reflexion A skill that runs implement, validate, self-critique and retry up to three times, then escalates with a written list of what is still broken. CX Codex +1 ★ 47repo stars mocked-persona-interview For solo and hobby projects where real user interviews are off the table: the skill runs interviews with invented personas and keeps them from becoming a rubber stamp for your own assumptions. CX Codex +1 ★ 47repo stars metrics-detect Scans the repo and sets up adapters for the metric sources your product actually uses, from GitHub to Stripe. Handy when the project predates this setup. CX Codex +1 ★ 47repo stars jtbd-map Splits customer work into functional, emotional and social jobs, then saves the map to a canvas file. CX Codex +1 ★ 47repo stars friction-log Drafts an honest write-up of where working with Mycelium felt confusing or slow. You edit it and decide whether it goes anywhere. CX Codex +1 ★ 47repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor