/ai-research-workflows:running-experimentsfrom ai-research-workflows
Compares 2-3 distinct architectural approaches by building and measuring real prototypes when the best technical choice is uncertain.
Ships in ai-research-workflows. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
An OPTIONAL step — only use when the best approach is genuinely uncertain. Prototype 2-3 distinct approaches with real code, measure them honestly, then recommend one based on evidence.
Every approach you compare must be actually built and run. You may never estimate, reason about, or "fill in" an approach's result — not even the one everyone is "sure" is slower. A comparison with one side measured and the other assumed is an opinion with a number stapled to one half; do not present it as an experiment, and never let it be cited as one in a design doc. If you genuinely cannot build an approach, say so and label the claim an unverified assumption — never dress it up as a benchmark.
This skill leans Collaborative by default. For the full Collaborative-vs-Direct protocol and override rules, see the Interaction Modes reference in the ai-research-workflows:using-research-workflows skill.
If no question is given, enter Collaborative mode and ask what to compare and why.
If a question is provided, look for matching context in docs/rse/specs/ (glob
docs/rse/specs/{research,plan}-*.md, then legacy .agents/{research,plan}-*.md) and read any relevant documents fully before
proceeding.
State the question, what is being compared, and why the decision matters.
Identify 2-3 distinct approaches. More than 3 makes comparison difficult; fewer than 2 is not an experiment. "JWT HS256 vs RS256" is a configuration difference, not an architectural one — approaches must be architecturally distinct.
Define success criteria for each: how will you know if it works?
For each approach:
Describe the approach — pros, cons, complexity rating (Low/Medium/High).
Write and isolate prototype code — actually write code, do not theorize.
Isolate it in a temporary branch (git checkout -b experiment-<slug>) OR a
scratch directory (mkdir -p .experiments/<slug>). Document where the code
lives.
Execute — run tests, benchmarks, and integration checks with real commands:
python experiment_jwt.py
time python benchmark.py
pytest tests/test_experiment.py -v
For any performance claim, run each benchmark multiple times and report
variance (not a single number), fix seeds, and hold the environment and
input constant across approaches — you are comparing the design, not the
noise. Capture the conditions per ai-research-workflows:ensuring-reproducibility.
Record observations honestly — successes and failures both. Include performance metrics, complexity assessment (lines of code, dependencies, integration points), and maintainability notes. Failed experiments are valuable; document them.
Create a comparison matrix across key dimensions (performance, complexity, maintainability, integration ease, test coverage). Then:
**Recommended Approach:** [Name]
**Reasoning:** [Specific evidence from experiments]
**Why Not Others:**
- **Approach X:** [Evidence-based reason]
- **Approach Y:** [Evidence-based reason]
**Caveats:** [Conditions where this might not apply]
Identify conditions under which an alternative approach would be preferable.
Derive a slug from the experiment question (lowercase, hyphenated).
Read the template:
assets/experiment-template.md
Fill all sections: goal, hypothesis, approaches, actual code snippets with file paths, execution commands and outputs, observations (positive and negative), comparison matrix, key insights, recommendation, and conditions for alternatives.
Save to docs/rse/specs/experiment-<slug>.md (create docs/rse/specs/ if needed).
Summarize concisely:
# Experiment Complete: [Topic]
Documented at `docs/rse/specs/experiment-[slug].md`.
Approaches: [Approach 1] / [Approach 2] / [Approach 3]
Key findings: [2-3 bullets]
Recommendation: Use [Approach] because [primary reason].
Trade-offs accepted: [list]
Would you like to proceed, or explore further?
Skip experimentation when:
Example: the codebase already uses JWT everywhere — follow that pattern, no experiment needed.
Keep experiments focused — test one architectural variable at a time; control for other factors.
Record ALL observations — negative results are data; document what was tried and why it was rejected.
Reference specific file paths — use path/to/file.ext:lines notation to
show how prototypes integrate with existing code.
Experiments reference research and plan documents in docs/rse/specs/ (or legacy .agents/). Results inform
the ai-research-workflows:iterating-plans and ai-research-workflows:planning-implementations skills. To make a chosen
approach reproducible, use ai-research-workflows:ensuring-reproducibility.
| Thought | Reality |
|---|---|
| "We both know X is slower, no need to build it" | Then it costs little to confirm. An unbuilt side is not an experiment. Build both. |
| "No time to build the other approach" | Then it is not an experiment — label it an unverified assumption, don't write it up as a benchmark. |
| "I'll estimate the loop version from experience" | Estimates are opinions. Measure it, or don't claim a comparison. |
| "One run is enough for the number" | One run is noise. Repeat, report variance, fix seeds, hold inputs constant. |
Before completing, verify:
assets/experiment-template.mddocs/rse/specs/experiment-<slug>.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub uw-ssec/savvy --plugin ai-research-workflows10 skills in this plugin
/creating-handoffsUse when work context must transfer to another session or person. Triggers: create a handoff, hand off this work, summarize context for the next session, prepare a handoff./ensuring-reproducibilityUse when a result, experiment, or analysis must be reproducible by others or by a future session. Triggers: make this reproducible, capture provenance, pin the environment for this result, why can't I reproduce X./hardening-research-codeUse when research or scientific code must be trustworthy — verifiably correct, regression-safe, and numerically stable. Triggers: harden this code, is this numerically correct, add regression tests vs known results, make the research code robust./implementing-plansUse when an approved implementation plan (a docs/rse/specs/plan-*.md file) exists and the next step is writing the code. Triggers: implement the plan, execute the plan, start building, run the plan./iterating-plansUse when an existing implementation plan needs changes before or during execution. Triggers: update the plan, change the plan, add a phase, revise scope, incorporate experiment results./planning-implementationsUse when a feature, refactor, or multi-file change needs to be designed before coding. Triggers: plan X, design the implementation, how should we build X, create an implementation plan.Other plugins' skills for the same job