If the skill install path cannot be resolved (some sandboxed environments): read the script file(s) from this skill, write a copy into a scripts/ folder inside the working folder, and run from there. The scripts are self-contained.
Skill: /experiment — OpenXP Experimentation Platform
Purpose
Multi-mode skill for the full experiment lifecycle — from design through analysis to ship/no-ship decision. Orchestrates the experiment plugin agents and calls the coded statistical library bundled in this skill at scripts/experiment_stats/ instead of improvising Python.
Using the bundled library: add this skill's scripts/ directory to sys.path, then import, e.g.
pythonimport sys sys.path.insert(0, "<path to this skill>/scripts") # the scripts/ dir next to this SKILL.md from experiment_stats import srm_check
Requires pandas, numpy, and scipy; power.py and corrections.py also need statsmodels (install it in the sandbox if missing).
When to Use
Invoke as /experiment [mode] or trigger on experiment-related intents:
- "I want to run an experiment"
- "Analyze this A/B test"
- "Did this experiment work?"
- "What's the power for this test?"
Modes
/experiment design
Purpose: Create a pre-registered experiment config.
Agent: the experiment-designer plugin agent
Flow:
- Run Experiment Brief skill to capture hypothesis, north star, guardrails
- Invoke Experiment Designer agent
- Output:
experiments/{slug}/experiment.yaml(fromtemplates/experiment.yaml) Checkpoint: Config review (Type B — skippable with --just-do-it)
/experiment power
Purpose: Power analysis + duration estimation. Flow:
- Read
experiments/{slug}/experiment.yamlfor metric type, baseline, MDE - Call the bundled power module (
scripts/experiment_stats/power.py):- Proportion metric →
power_proportion(baseline_rate, mde) - Continuous metric →
power_mean(baseline_mean, baseline_std, mde)
- Proportion metric →
- Call
duration_estimate(total_sample, daily_traffic, allocation) - Update
experiment.yamlwith computed values (sample_size, duration, viable) - If NOT_VIABLE → suggest
/causal selectas alternative Checkpoint: Power viability (Type C — NOT_VIABLE fires mandatory checkpoint)
/experiment analyze
Purpose: Run statistical tests on experiment data.
Agent: the experiment-analyzer plugin agent
Flow:
- Read
experiments/{slug}/experiment.yamlfor pre-registered config - SRM Gate (mandatory first step):
python
from experiment_stats import srm_check # Positional lists ONLY — do not pass dicts. # First arg: observed counts per variant (order must match expected_ratios). # Second arg: expected allocation ratios, summing to 1.0. result = srm_check([4218, 4196], [0.5, 0.5]) # result = {"chi2_stat": 0.058, "p_value": 0.81, "verdict": "PASS", ...} if result["verdict"] == "BLOCK": # HALT — do not proceed to treatment effect analysis - Treatment effect analysis using coded helpers:
python
from experiment_stats import welch_test, proportion_test, ratio_metric_test # Select based on metric type from experiment.yaml if metric_type == "proportion": result = proportion_test(c_success, c_n, t_success, t_n) elif metric_type == "continuous": result = welch_test(control_values, treatment_values) elif metric_type == "ratio": result = ratio_metric_test(num_c, den_c, num_t, den_t) - Effect size:
cohens_d(control, treatment) - Multiple comparisons:
adjust_pvalues(all_p_values, method="holm") - Guardrail checks against thresholds from experiment.yaml
- Segment analysis (Simpson's paradox check)
- Output:
experiments/{slug}/working/analysis_results.jsonCheckpoint: SRM gate (Type C — BLOCK halts everything)
/experiment interpret
Purpose: Walk the Result Interpretation Tree and classify the outcome.
Agent: the experiment-interpreter plugin agent
Flow:
- Read analysis results from
experiments/{slug}/working/analysis_results.json - Walk the Result Interpretation Tree:
- Positive result + clean guardrails → SHIP
- Positive result + degraded guardrails → INVESTIGATE (Mixed Results Framework)
- Null result (powered) → ABORT (no evidence of benefit)
- Null result (underpowered) → LEARN (extend or re-design)
- Negative result → ABORT
- SRM or data quality issue → INVALID
- Apply Spotify's EwL classification: Ship / Abort / Learn / Invalid
- Reference pre-registered decision rules from experiment.yaml
- Output: classification + rationale Checkpoint: Ship decision (Type C — always fires); INVALID → refuse to proceed
/experiment report
Purpose: Generate markdown report from analysis results.
Agent: the experiment-readout plugin agent
Flow:
- Read analysis results (structured JSON, not re-computing)
- Read experiment.yaml for context
- Fill report template (
templates/experiment-report.md) - Adapt to audience (executive/technical/cross-functional)
- Output:
experiments/{slug}/reports/experiment_report_{{DATE}}.md
/experiment monitor
Purpose: SRM check + guardrail status + sample tracking during a running experiment.
Agent: the experiment-monitor plugin agent
Flow:
- Read experiment.yaml for expected allocation and guardrail thresholds
- Run
srm_check()with p < 0.0005 threshold (Microsoft production standard) - Run guardrail tests (one-sided where appropriate)
- Track sample accumulation vs. required sample size
- Output:
experiments/{slug}/working/monitoring_update.md- Traffic light status: GREEN (on track) / YELLOW (watch) / RED (halt) Checkpoint: RED guardrail (Type C — triggers halt)
/experiment status
Purpose: Show experiment lifecycle state. Flow:
- Read
experiments/{slug}/experiment.yaml - Display: current status, key metrics, timeline, any blockers
- No agent needed — direct YAML read and format
/experiment full
Purpose: End-to-end: design → power → analyze → interpret → report. Flow: Runs design, power, analyze, interpret, report in sequence. Checkpoints: All Type C checkpoints fire. Type B skipped with --just-do-it.
State Management
experiments/{slug}/ ├── experiment.yaml # Pre-registered config (tracked) ├── working/ # Intermediates (gitignored) │ ├── analysis_results.json │ ├── monitoring_update.md │ └── ... └── reports/ # Final reports (tracked) └── experiment_report_{{DATE}}.md
Helper Function Reference
All statistical work uses the coded library bundled at scripts/experiment_stats/:
| Function | Module | Use For |
|---|---|---|
welch_test() | ab_tests | Continuous metric A/B test |
proportion_test() | ab_tests | Binary metric A/B test |
ratio_metric_test() | ab_tests | Ratio metric (delta method) |
winsorize() | ab_tests | Outlier-robust pre-processing |
power_proportion() | power | Sample size for proportions |
power_mean() | power | Sample size for means |
detectable_effect() | power | MDE from fixed sample |
duration_estimate() | power | Timeline planning |
srm_check() | srm | Sample ratio mismatch |
srm_diagnose() | srm | Segmented SRM root cause |
cohens_d() | effect_size | Standardized effect size |
relative_lift() | effect_size | Percentage change |
adjust_pvalues() | corrections | Multiple comparison correction |
cuped_adjust() | variance_reduction | CUPED variance reduction |
confidence_sequence() | sequential | Always-valid CI (peeking ok) |
bayesian_proportion() | bayesian | Bayesian A/B (proportions) |
bayesian_mean() | bayesian | Bayesian A/B (means) |
Cross-Product Handoffs
/experiment power→ NOT_VIABLE → suggest/causal select(quasi-experimental)/causal select→ "Can you randomize? YES" → suggest/experiment design/experiment analyze→ SRM BLOCK → suggest investigating assignment logic


