Skip to content
Back to skills

Prompt Optimizer

ASecurity

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

  • 46 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 28, 2026
developmentgogitperformance

Works with

  • cli

Security analysis

A100/100

Scanned May 28, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Prompt Optimizer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prompt Optimizer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/haabe-prompt-optimizer/badge)](https://www.skillsdirectory.com/skills/haabe-prompt-optimizer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.