agent-laboratory
Skill1 starsChanged 3 months agoMITView on GitHub
Builds self-verifying experiment laboratories and measurement feedback loops for optimization, debugging, visual fidelity, quality, cost, and solution-search work. Use when a user asks to make something faster, cheaper, more accurate, less buggy, closer to a reference, or otherwise better across competing approaches where benchmarks, screenshots, traces, fixtures, or repeated trials can measure progress.
In this repository6 other files it gives its agents.
- animationSkill
- designSkill
- infrastructure-autopilotSkill
- shadersSkill
- test-suite-auditorSkill
- truthful-tddSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Keep a change only when repeated measurements improve the objective and all gates pass.
- Very specific: line 20
Use scripts/lab.py when a lightweight, generic experiment ledger is useful:
- Distinctive: line 40
Prefer real inputs and the real stack.
- Distinctive: line 41
Add the missing feedback instrument: benchmark, test, trace, profiler, screenshot comparison, evaluator, debug log, cost counter, or todo …
- Distinctive: line 47
Run the baseline before edits and save its commit, configuration, parameters, results, and sample count.
- Distinctive: line 49
Do not claim improvement from one noisy sample, a changed workload, or a surrogate metric alone.
- Distinctive: line 56
When the search space is finite and affordable, automate a parameter or pipeline sweep.
- Distinctive: line 57
Use new evidence to refine the next hypothesis rather than blindly exhausting options.
- Distinctive: line 62
Run correctness, regression, integration, and relevant adversarial tests.
- Distinctive: line 63
Check representative edge cases and inspect artifacts directly: screenshots, traces, decoded media, output diffs, or logs.
- Distinctive: line 72
Ask the user only when the true success criterion requires their taste, authority, credentials, or an irreversible choice.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Laboratory
Turn an underspecified improvement request into a measured search. Give the agent both a laboratory for controlled experiments and a stopwatch for objective feedback.
Quick start
- State the objective as a measurable outcome.
- Define correctness and quality gates that no candidate may violate.
- Build the smallest harness that reproduces the important path.
- Measure and save the untouched baseline before changing production code.
- List a bounded set of hypotheses, then test one variable at a time.
- Keep a change only when repeated measurements improve the objective and all gates pass.
- Deliver the winning change, harness, raw results, and a before/after report.
Use scripts/lab.py when a lightweight, generic experiment ledger is useful:
python scripts/lab.py init work/lab --objective "Reduce export latency without changing output"
python scripts/lab.py record work/lab --variant baseline --metric latency_ms=820 --metric exact_match=1
python scripts/lab.py record work/lab --variant stream-parser --metric latency_ms=510 --metric exact_match=1 --parameter chunk_kb=64
python scripts/lab.py report work/lab --baseline baseline --primary latency_ms --direction lower --output work/lab/report.mdWorkflow
1. Frame the experiment
- Identify the representative inputs, critical path, primary metric, constraints, and stop condition.
- Separate optimization metrics from invariant gates. Speed never compensates for wrong output.
- Choose the closest observable proxy only when the real outcome cannot be measured; label the proxy.
- Record uncontrolled factors, tool versions, hardware, services, and likely sources of noise.
2. Build the laboratory
- Prefer real inputs and the real stack. Use fixtures only when they preserve the behavior under study.
- Add the missing feedback instrument: benchmark, test, trace, profiler, screenshot comparison, evaluator, debug log, cost counter, or todo ledger.
- Make runs reproducible and cheap enough to repeat. Preserve raw outputs and failure cases.
- For latency, include warmups and multiple measured runs. For stochastic systems, use a fixed evaluation set and enough repetitions to expose variance.
3. Establish the stopwatch
- Run the baseline before edits and save its commit, configuration, parameters, results, and sample count.
- Confirm the harness detects an intentional regression or known difference when practical.
- Do not claim improvement from one noisy sample, a changed workload, or a surrogate metric alone.
4. Search deliberately
- Rank three to five hypotheses by likely impact, confidence, and experiment cost.
- Change one independent variable per trial unless explicitly testing interactions.
- Record every trial, including failures. Revert losing changes; preserve useful evidence.
- When the search space is finite and affordable, automate a parameter or pipeline sweep.
- Use new evidence to refine the next hypothesis rather than blindly exhausting options.
5. Verify the winner
- Re-run the baseline and candidate under matching conditions, in alternating order when drift matters.
- Run correctness, regression, integration, and relevant adversarial tests.
- Check representative edge cases and inspect artifacts directly: screenshots, traces, decoded media, output diffs, or logs.
- Distinguish measured facts, evaluator judgments, and unverified inferences.
6. Report
Include the objective, harness, environment, baseline, candidates, discarded hypotheses, winning result, variance, quality gates, limitations, raw-data path, and exact reproduction command. Prefer a compact table or HTML chart when several candidates or metrics must be compared.
Stop and ask
Ask the user only when the true success criterion requires their taste, authority, credentials, or an irreversible choice. Before asking them to manually verify routine work, first try to add the instrument that would let the agent verify it.
See REFERENCE.md for domain-specific laboratory patterns and measurement traps.
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.

