experiment
Installation
SKILL.md
/experiment — Metric-Driven Optimization Loop
Inputs
The user provides three things:
- scope: Files to modify (glob pattern, e.g., "src/api/**/*.ts")
- metric: Shell command that outputs a single number (e.g.,
npm run build 2>&1 | tail -1 | grep -oP '\d+') - budget: Iteration cap (default: 5) or time cap (e.g., "10 minutes")
If any input is missing, ask for it. The metric MUST output a single number to stdout.
Protocol
Step 1: BASELINE
- Stash any uncommitted changes (restore on exit)
- Run the metric command. Record the baseline value.
- Determine direction: does lower = better (bundle size, error count) or higher = better (FPS, test count)? Ask the user if ambiguous.
Related skills