experiment-new

experiment-new is a command for Claude Code from with-geun/alive-analysis. It costs 0 tokens per session (2,773 once invoked), scanned A, original, MIT.

A command for starting a structured A/B test, where two versions are compared to see which performs better. It guides the user through the change being tested, the experiment format, and the main success measure.

In plain words
What is it for?
Setting up full or quick product experiments, recording the control and new version, and choosing the primary metric.
Why use it?
It provides a consistent place to define what is changing and how success will be judged before the test begins.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Setting up full or quick product experiments, recording the control and new…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/with-geun/alive-analysis/experiment-new
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/with-geun/alive-analysis

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for experiment-new

README.md
[![agentmods](https://agentmods.dev/badge/commands/with-geun/alive-analysis/experiment-new.svg)](https://agentmods.dev/commands/with-geun/alive-analysis/experiment-new)
Your own site
<a href="https://agentmods.dev/commands/with-geun/alive-analysis/experiment-new"><img src="https://agentmods.dev/badge/commands/with-geun/alive-analysis/experiment-new.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,773 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02773
Opus 5 $0.00000 $0.01386
Sonnet 5 $0.00000 $0.00555
Haiku 4.5 $0.00000 $0.00277

Measured 7d ago against content hash 12f40caabd47, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

experiment-new scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/experiment-new.md · 281 lines

How it starts

The opening of the file, as written. The whole thing — 281 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/experiment new

Start a new A/B test experiment.

Instructions

You are helping the user design and run a structured experiment using the ALIVE loop adapted for A/B testing: Design → Validate → Analyze → Decide → Learn.

Follow these steps in order. Do NOT auto-fill any content — ask the user and build the experiment together through conversation.

Step 1: Ask initial questions

Q1: What do you want to test? Understand the change, feature, or hypothesis the user wants to experiment with.

  • "What change are you testing? Describe the control (current) and treatment (new)."

Q2: Full or Quick?

  • Full Experiment — For experiments with business impact. 5 files, full statistical rigor, checklists.
  • Quick Experiment — For low-risk experiments (feature flag toggles, small UI tweaks). Single file, abbreviated.

Guide:

  • "Will this experiment influence a product/business decision?" → Full
  • "Is this a quick validation or low-stakes test?" → Quick

Q3: What's the primary metric? The single metric that determines success or failure.

  • "If you could only look at ONE number to decide whether this worked, what would it be?"
  • Reference config.md metrics if available.

Q4: Guardrail metrics? Metrics that must NOT get worse. Reference config.md guardrails.

  • "What must NOT break if this experiment succeeds? (e.g., crash rate, page load time, revenue)"

Q5: How long can this experiment run?

  • "What's the maximum duration you'd accept? (1 week, 2 weeks, 4 weeks)"
  • This informs sample size feasibility.

Step 2: Generate ID

Read .analysis/status.md to determine the next sequence number for today.

  • Full Experiment: E-{YYYY}-{MMDD}-{seq} (e.g., E-2026-0215-001)
  • Quick Experiment: QE-{YYYY}-{MMDD}-{seq} (e.g., QE-2026-0215-001)

Sequence resets daily, starts at 001.

Step 3: Create files

3A. Full Experiment

Create folder: ab-tests/active/{ID}_{title-slug}/

Generate 01_design.md:

# DESIGN: {title}
> ID: {ID} | Type: 🧪 Experiment | Stage: 📐 DESIGN | Started: {YYYY-MM-DD}

## Hypothesis
- **If** we {change/treatment description},
- **Then** {primary metric} will {direction} by {expected magnitude},
- **Because** {mechanism/reasoning}.

## Experiment Setup
- **Control**: {current experience}
- **Treatment**: {new experience}
- **Variants**: {number of variants, including control}
- **Randomization unit**: user / session / device / other
- **Traffic allocation**: {control %}% / {treatment %}%
- **Target population**: {all users / specific segment}
- **Exclusions**: {who should NOT be in the experiment}

## Metric Structure

### Primary Metric (decision criterion)
| Metric | Current Baseline | MDE (Minimum Detectable Effect) | Direction |
|--------|-----------------|--------------------------------|-----------|
| {metric} | {value} | {absolute or relative change} | ↑ / ↓ |

### Secondary Metrics (additional insight)
| Metric | Baseline | Expected Direction | Why Track |
|--------|----------|--------------------|-----------|
| | | | |
| | | | |

### Guardrail Metrics (must not degrade)
| Metric | Current Value | Acceptable Range | Source |
|--------|--------------|-------------------|--------|
| | | | config.md / custom |

## Sample Size Calculation
- **Test type**: two-sided / one-sided
- **Significance level (α)**: 0.05
- **Power (1-β)**: 0.80
- **Baseline rate/mean**: {from primary metric}
- **MDE**: {from primary metric}
- **Required sample size per variant**: {AI calculates}
- **With current daily traffic ({N}/day)**: ~{X} days needed
- **Feasibility**: ✅ fits within timeline / ⚠️ tight / 🔴 not feasible

> 💡 AI will guide through the calculation:
> - For proportions: n = (Z_α/2 + Z_β)² × [p₁(1-p₁) + p₂(1-p₂)] / (p₁-p₂)²
> - For means: n = (Z_α/2 + Z_β)² × 2σ² / δ²
> - Practical shortcut: "Can we get {n} users per variant within {max duration}?"

## Duration & Schedule
- **Start date**: {planned}
- **Minimum duration**: {from sample size calculation}
- **Maximum duration**: {from Q5}
- **Include full week cycles**: Yes (avoid day-of-week effects)
- **Ramp-up plan**: {start at X% → full allocation after Y days} / none

## Risk Assessment
- **Worst-case scenario**: If treatment is bad, what's the impact?
- **Rollback trigger**: {specific condition for emergency stop}
- **Blast radius**: {number of affected users, revenue at risk}
- **Reversibility**: Fully reversible / Partially / Irreversible

## Stakeholders
- **Experiment owner**: {name}
- **Decision maker**: {name/role}
- **Engineering contact**: {name}

## Provenance
- Triggered by analysis: {analysis ID, if any — e.g., "F-2026-0210-001 found that X correlates with Y"}
- Key finding that motivated this experiment:

## Pre-registration
> This section locks the analysis plan BEFORE seeing results (prevents p-hacking).
- Primary metric: {locked}
- Success threshold: {locked — what constitutes a "win"?}
- Analysis method: {locked — frequentist / bayesian / both}
- Segment analysis planned: {list segments you'll check, if any}
- Decision framework: {when to Launch / Kill / Extend / Iterate}

---
{Insert DESIGN checklist from ab-tests/checklists/design.md}

Read the full file on GitHub · 281 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 281 lines · 0 tokens per session scan A 12f40caabd47

Subscribe to this mod's changes

experiment-new is a command published in the GitHub repository with-geun/alive-analysis (41 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,773 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.