experiment
Skill1 starsChanged 8 months agoMITView on GitHub
Automated optimization loop with scalar fitness function. Proposes changes in isolated worktrees, measures with a metric command, keeps improvements, discards failures. Supports convergence detection and diminishing returns.
27 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- SethGammon/Citadeledited, first seen Nov 4, 2026
- DaeSeokSong/oh-my-ouroborostheir own version, first seen Nov 1, 2026
- Anglesite/anglesite-skillstheir own version, first seen Oct 27, 2026
- simota/agent-skillstheir own version, first seen Oct 23, 2026
- akasecurity/preflight-skillstheir own version, first seen Oct 20, 2026
- DoKu67/claude-code-skilstheir own version, first seen Oct 16, 2026
Used with
Projects with it also use cost, eval and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
maxvaegaSkillcost
Estimate what Claude Cowork / Claude Code conversations would cost if run on the pay-per-token Claude API instead of the subscription. Reports token counts and cache-aware API cost in USD and EUR, for the current conversation or for the whole history (cost per conversation). Trigger when the user asks things like "how much would this conversation cost on the API", "API cost of my Cowork conversations", "token usage / token count", "cost per conversation", "/cost", or wants to compare subscription vs API pricing.
Also in 3 projects that use this
qtzx06Skilleval
Evaluate trained YOLO model accuracy with mAP metrics and per-class error analysis. Identifies failure cases for targeted improvement. Use after training.
Also in 4 projects that use this
dirienSkilldecide
Three-agent adversarial debate protocol for strategic decisions. Two advocates steelman opposing positions while a moderator identifies risks and synthesizes a binding consensus. Use when choosing between alternatives, evaluating tradeoffs, or making high-stakes decisions.
Also in 3 projects that use this
javatarzSkillwiki
Access and manage the local GitHub Wiki clone. Use this skill when you need to read wiki content (architecture, design docs, guides), update wiki documentation, check wiki status, or push wiki changes. The wiki contains high-level system design and architectural documentation.
Also in 3 projects that use this
HeshamFSSkillloop
Run a command or check on a recurring interval
Also in 3 projects that use this
VercelSkillworkflow
Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of "workflow", "durable functions", "resumable", "workflow sdk", "queue", "event", "push", "subscribe", or step-based orchestration.
Also in 3 projects that use this
Other versions27 projects use a version of this.
Word for word · 1
- SethGammon/Armory★ 19100% same
Edited · 2
- SethGammon/Citadel★ 92713% same
- mayankjain1815-commits/CITADEL★ 487% same
Wrote their own version · 24
- rohanpsingh/LearningHumanoidWalking★ 1.2ksame name
- menkesu/awesome-pm-skills★ 441same name
- ai-analyst-lab/ai-analyst★ 304same name
- simota/agent-skills★ 96same name
- sunnnybala/Rstack★ 69same name
- Kastalien-Research/thoughtbox★ 64same name
- logly/mureo★ 64same name
- alirezarezvani/gaios★ 37same name
- skyf0xx/gambit★ 29same name
- Fadi88/one-man-startup★ 16same name
14 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- ascii-diagramSkill
- doc-genSkill
- live-previewSkill
- qaSkill
- refactorSkill
- research-fleetSkill
- researchSkill
- reviewSkill
- scaffoldSkill
- session-handoffSkill
- systematic-debuggingSkill
- test-genSkill
- triageSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 17 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
If any input is missing, ask for it.
- Distinctive: line 35
Run the metric command. Record the baseline value.
- Distinctive: line 37
Ask the user if ambiguous.
- Distinctive: line 47
Measure: Run the metric command in the worktree
- Distinctive: line 48
Gate: Run typecheck. If it fails, discard immediately.
- Distinctive: line 60
After each iteration, check:
- Very specific: line 67
Write results to .planning/research/experiment-{slug}.md:
- Distinctive: line 114
When you want to optimize a measurable metric (bundle size, error count, test coverage, FPS)
- Distinctive: line 115
When you have a clear hypothesis but aren't sure which of several approaches wins
- Distinctive: line 116
When manual A/B testing would be too slow or error-prone
- Distinctive: line 117
NOT when the goal is subjective ("make it feel better") — the metric must be a number
- Distinctive: line 121
NEVER modify files outside scope
- Distinctive: line 122
ALWAYS use worktree isolation for changes
- Distinctive: line 123
ALWAYS run typecheck before keeping a change
- Distinctive: line 125
If the metric command fails, treat as DISCARD (not crash)
- Distinctive: line 130
Every kept iteration improved the metric AND passed typecheck
- Distinctive: line 131
Every discarded iteration has a logged reason
- Distinctive: line 137
Metric command outputs nothing or non-numeric text: Treat as a metric failure.
- Very specific: line 141
If .planning/research/ does not exist: Create it before writing the experiment report.
“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/experiment — Metric-Driven Optimization Loop
Identity
/experiment is an automated optimization loop with a scalar fitness function. It takes a hypothesis, runs isolated experiments in git worktrees, measures results with a metric command, and keeps improvements or discards failures. Think of it as automated A/B testing for code changes.
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.
- Log:
Baseline: {value} ({metric command})
Step 2: ITERATE
For each iteration (up to budget):
- Create isolation: Spawn a sub-agent in a worktree (
isolation: "worktree") - Propose change: The agent modifies files within scope to improve the metric. Provide context: baseline value, metric direction, scope, what previous iterations tried.
- Measure: Run the metric command in the worktree
- Gate: Run typecheck. If it fails, discard immediately.
- Evaluate:
- Improved? → KEEP. Merge the worktree branch. New baseline = new value.
- Same or worse? → DISCARD. Delete the worktree.
- Log iteration:
Iteration {N}: {value} ({delta from baseline}) → {KEEP|DISCARD} Change: {one-line description of what was tried}
Step 3: CONVERGENCE CHECK
After each iteration, check:
- Local optimum: Last 3 iterations all discarded → stop ("no more improvements found")
- Diminishing returns: Last kept improvement was < 0.5% → stop ("diminishing returns")
- Budget exhausted: Iteration count or time exceeded → stop
Step 4: REPORT
Write results to .planning/research/experiment-{slug}.md:
# Experiment: {Description}
> Metric: `{command}`
> Direction: {lower|higher} is better
> Scope: {glob pattern}
> Budget: {N iterations}
> Date: {ISO date}
## Results
| Iteration | Value | Delta | Verdict | Change |
|-----------|-------|-------|---------|--------|
| baseline | {N} | — | — | — |
| 1 | {N} | {+/-} | KEEP | {desc} |
| 2 | {N} | {+/-} | DISCARD | {desc} |
## Outcome
- **Start**: {baseline}
- **End**: {final value}
- **Improvement**: {percentage}
- **Iterations**: {kept}/{total}
- **Stop reason**: {convergence|diminishing|budget}
## Kept Changes
{List of changes that were kept, with commit hashes}Also log to .planning/telemetry/agent-runs.jsonl:
{"event":"experiment-complete","slug":"{slug}","baseline":0,"final":0,"improvement":"0%","kept":0,"total":0,"timestamp":"ISO"}Common Metrics
| Goal | Metric Command |
| Reduce bundle size | npm run build 2>&1 | grep -oP 'Total size: \K\d+' |
| Reduce type errors | npx tsc --noEmit 2>&1 | grep -c 'error TS' |
| Increase test pass rate | npm test 2>&1 | grep -oP '\d+ passing' |
| Reduce file count | find src -name '*.ts' | wc -l |
| Reduce line count | wc -l src/**/*.ts | tail -1 | awk '{print $1}' |
When to Use
- When you want to optimize a measurable metric (bundle size, error count, test coverage, FPS)
- When you have a clear hypothesis but aren't sure which of several approaches wins
- When manual A/B testing would be too slow or error-prone
- NOT when the goal is subjective ("make it feel better") — the metric must be a number
Safety Rules
- NEVER modify files outside scope
- ALWAYS use worktree isolation for changes
- ALWAYS run typecheck before keeping a change
- Restore stashed changes on exit (even on error)
- If the metric command fails, treat as DISCARD (not crash)
Quality Gates
- Baseline was measured before any iterations ran
- Every kept iteration improved the metric AND passed typecheck
- Every discarded iteration has a logged reason
- The stop reason is one of: convergence, diminishing returns, or budget exhausted
- The experiment report exists at
.planning/research/experiment-{slug}.mdwith all iteration rows filled
Fringe Cases
Metric command outputs nothing or non-numeric text: Treat as a metric failure. Ask the user to provide a command that outputs a single number to stdout before starting iterations.
No worktree support (e.g., shallow clone): Fall back to branch isolation. Create a branch, run changes there, measure, then delete or merge the branch. Never modify the working tree directly.
If .planning/research/ does not exist: Create it before writing the experiment report. If .planning/ itself doesn't exist, create the full path or output the report inline.
Budget exhausted with zero kept iterations: Report outcome as "no improvement found". This is a valid result — do not continue past the budget.
Exit Protocol
---HANDOFF---
- Experiment: {description}
- Result: {baseline} → {final} ({improvement}%)
- Kept: {N}/{total} iterations
- Stop reason: {reason}
- Report: .planning/research/experiment-{slug}.md
---Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

