experimentlisted
Install: claude install-skill ArieGoldkin/claude-forge
# Experiment
Autonomous metric-driven iteration loop inspired by Karpathy's autoresearch pattern.
The core cycle: modify code, measure a metric, keep improvements, discard regressions, repeat.
Works with any file, any numeric metric, and any direction (minimize or maximize).
Git-based safety guarantees: commit before evaluate, reset on regression -- regressions are
never persisted. Produces a structured report of what worked, what failed, and cumulative gains.
## When to Use /experiment vs Other Skills
| Goal | Use |
|------|-----|
| Improve test coverage toward a target | `/cover --target=N%` (specialized coverage loop) |
| Fix a specific bug | `/fix-bug` (observation-driven debugging) |
| Build a feature end-to-end | `/develop` (gated pipeline) |
| Optimize ANY measurable metric | `/experiment` (this skill) |
| Understand agentic loop theory | `agent-loops` (pattern reference) |
Use `/experiment` when the task has a single numeric metric, a clear direction (minimize or
maximize), and benefits from autonomous iteration rather than manual tuning.
## Quick Start
```
# Reduce API latency below 100ms
/experiment src/api/handler.ts --metric "npm run bench -- --json | jq '.results[0].mean'" --minimize --goal 100 --unit ms
# Increase Lighthouse performance score to 95
/experiment src/pages/ --metric "npx lighthouse http://localhost:3000 --output json | jq '.categories.performance.score * 100'" --maximize --goal 95
# Minimize bundle size over 15 iterations
/experiment src/ -