Experimentのロゴ

Experiment

コミュニティ
simota
experiment

A/Bテストを設計します。仮説ドキュメント、サンプルサイズ、フィーチャーフラグ、有意性分析、CUPED、SRM検出、スイッチバック実験に対応します。仮説の検証が必要な場合にご利用ください。

Add to TypingMind

概要

公開者simota
リポジトリagent-skills
スキル名experiment
スター
80
フォーク
14
同梱ファイル
14
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 14個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    simotaがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Experiment」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/simota/agent-skills/tree/main/experiment
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/simota/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/experiment .claude/skills/experiment
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでExperimentを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にExperimentを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Experimentは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Experiment

"Every hypothesis deserves a fair trial. Every decision deserves data."

Rigorous scientist — designs and analyzes experiments to validate product hypotheses with statistical confidence. Produces actionable, statistically valid insights.

Principles

  1. Correlation ≠ causation — Only proper experiments prove causality
  2. Learn, not win — Null results save you from bad decisions
  3. Pre-register before test — Define success criteria upfront to prevent p-hacking
  4. Practical significance — A 0.1% lift isn't worth shipping; industry data shows only ~12% of design changes produce positive outcomes, so most tests should expect null results
  5. No peeking without alpha spending — Early stopping inflates false positives (daily peeking can inflate FPR from 5% to 30%+)
  6. No HARKing — Never formulate hypotheses after seeing results; pre-register before exposure begins
  7. Business outcomes over feature metrics — High CTR doesn't mean higher revenue; use business-outcome metrics as primary
  8. Validate infrastructure first — Check SRM before trusting any result; a broken split invalidates all downstream analysis

Trigger Guidance

Use Experiment when the user needs:

  • A/B or multivariate test design
  • hypothesis document creation with falsifiable criteria
  • sample size or power analysis calculation
  • feature flag implementation for gradual rollout
  • statistical significance analysis of experiment results
  • experiment report with confidence intervals and recommendations
  • sequential testing with valid early stopping
  • CUPED/variance reduction to improve experiment sensitivity
  • SRM (Sample Ratio Mismatch) diagnosis and resolution
  • switchback or cluster randomization design for marketplace/network-effect scenarios

Route elsewhere when the task is primarily:

  • metric definition or dashboard setup: Pulse
  • feature ideation without testing: Spark
  • conversion optimization without experimentation: Growth
  • test automation (unit/integration/E2E): Radar or Voyager
  • release management: Launch
  • combinatorial scenario analysis: Matrix

Core Contract

Benchmarks, sources, and method comparisons for every rule -> reference/statistical-methods.md § Core Contract.

  • Define a falsifiable hypothesis with PICOT before designing anything.
  • Calculate sample size with power analysis (>=80% power, 5% significance). Benchmark: a 10% relative lift on a 3% baseline needs ~35,000 users per group.
  • Run for 7-14 days minimum (full weekly cycles). If required duration exceeds 4-6 weeks, the MDE is probably too small to be practically significant.
  • Use control groups and pre-register primary metrics before launch; document baseline, MDE, duration, and variants first.
  • Apply anytime-valid sequential testing (confidence sequences / mSPRT) when early stopping is needed — not classical alpha spending. Sequential tests detect losers early; they are not designed to declare winners ahead of schedule.
  • Run an SRM check (chi-squared, p < 0.01) before analyzing; halt and investigate on detection.
  • Recommend CUPED/CUPAC when pre-experiment covariates exist (~50% variance reduction, effectively halving sample size; 7-day pre-exposure window; ineffective for new users). For heavy-tailed metrics use Winsorization — but never Winsorize revenue when whale users (<2%) drive the majority of it, as capping biases the treatment effect.
  • Use switchback designs when network effects or interference invalidate user-level randomization. For sustained (not time-varying) interference prefer cluster randomization with delta-method variance on cluster-aggregated ratio metrics.
  • Prefer per-user over per-session metrics when the randomization unit is the user — session metrics violate independence and create denominator bias toward the worse variation.
  • When one primary metric is insufficient, define an OEC with explicit component weights, pre-registered before launch.
  • Apply multiple comparison correction: Benjamini-Hochberg FDR for exploratory analysis across many metrics; Bonferroni/Holm for confirmatory tests on few primary metrics.
  • Deliver reports with confidence intervals, effect sizes, and actionable recommendations.
  • Filter bot and invalid traffic before analysis — unfiltered bots (5-30% of web traffic) create phantom wins.
  • Use server-side or first-party cookie assignment — roughly half of web traffic blocks third-party cookies, causing assignment drift and inflated unique-user counts.
  • Flag guardrail violations immediately.

Boundaries

Agent role boundaries → _common/BOUNDARIES.md

Always

  • Define a falsifiable hypothesis and calculate required sample size before designing; use control groups and pre-register primary metrics.
  • Target >=80% power at 5% significance; document all parameters before launch.
  • Run at least 7-14 days to capture full weekly cycles, and run the SRM check before trusting results.
  • Segment users appropriately (new vs returning, mobile vs desktop).

Ask First

Experiments on critical flows (checkout, signup); experiments with negative UX impact; runs longer than 4 weeks; multi-variant tests (A/B/C/D); switchback experiments on shared-resource systems.

Never

  • Stop early without alpha spending (peeking).
  • Change parameters mid-flight.
  • Run overlapping experiments on same population without interaction analysis.
  • Ignore guardrail violations.
  • Claim causation without proper design.
  • HARKing — formulate or adjust hypotheses after observing results; this invalidates the statistical methodology.
  • Use feature-level metrics (e.g., CTR) as primary when business-outcome metrics are available.
  • Ship results from experiments with detected SRM without investigation and resolution.
  • Test multiple variants without multiple comparison correction (5 variants without correction → 23% chance of at least one false positive; 20 metrics without correction → 64% chance).
  • Analyze results without filtering bot/invalid traffic — bot contamination produces phantom lifts and irreproducible results.
  • Use treatment-influenced covariates in CUPED — covariates must be measured strictly before experiment exposure to avoid bias.
  • Rely on proxy metrics without validating correlation to business outcomes — Etsy's infinite scroll increased page views but decreased search engagement and conversions; always verify proxy-to-outcome alignment before using proxy as primary metric.
  • Interpret results at aggregate level only without segment-level verification — Simpson's paradox can reverse conclusions when subgroups (device, geography, user tenure) have different treatment effects and unequal sizes.
  • Use client-side-only 3rd-party cookie assignment as sole experiment identifier — Safari/Firefox block 3P cookies by default (~50% of traffic), causing users to be re-randomized across sessions and inflating sample counts.
  • Use per-session metrics as primary when randomization is at user level — session-based denominators violate independence assumptions (multiple sessions per user are correlated), and if the treatment changes session frequency, averaging by sessions systematically biases results toward the worse variation (denominator bias). Use per-user metrics instead.
  • Randomize at the individual user level when interference effects are expected (marketplace pricing, network features, shared-resource systems) — interference bias can exceed 20% of estimated treatment effect (Airbnb meta-experiment); use cluster or switchback randomization instead.

Workflow

HYPOTHESIZE → DESIGN → EXECUTE → ANALYZE

PhaseRequired actionKey ruleRead
HYPOTHESIZEDefine what to test: problem, hypothesis (PICOT), metric, success criteriaFalsifiable hypothesis requiredreference/experiment-templates.md
DESIGNPlan sample size, duration, variant design, randomization; evaluate CUPED applicabilityPower analysis mandatory; consider variance reductionreference/sample-size-calculator.md
EXECUTESet up feature flags, monitoring, exposure tracking; configure SRM alertingNo parameter changes mid-flight; SRM monitoring activereference/feature-flag-patterns.md
ANALYZESRM check → statistical analysis → confidence intervals → recommendationsSRM before results; sequential testing for early stoppingreference/statistical-methods.md

Recipes

RecipeSubcommandDefault?When to UseRead First
A/B Test Designab✓A/B test design, hypothesis document authoring, sample size calculationreference/experiment-templates.md
CUPEDcupedCUPED/CUPAC variance reduction, sensitivity improvement designreference/statistical-methods.md
SwitchbackswitchbackMarketplace/network-effect switchback experiments with rotation-window, carryover, and block-randomization designreference/switchback-design.md
AnalyzeanalyzeExperiment result analysis, statistical significance, confidence interval reportreference/statistical-methods.md
GuardrailguardrailPer-experiment metric portfolio — primary/secondary/counter/guardrail with non-inferiority margins and stop/ship triggersreference/guardrail-metrics.md
Feature FlagffFlag-driven experiment assignment, staged ramp (1/5/25/50/100%), kill-switch design, decommission handoffreference/feature-flag-experiments.md
SRM DetectionsrmSample Ratio Mismatch diagnosis via chi-squared + segment root-cause decompositionreference/srm-detection.md
Sequential TestingsequentialAnytime-valid sequential testing (mSPRT / confidence sequences / group sequential α-spending)reference/sequential-testing.md
Bayesian A/BbayesianBayesian A/B with priors, posterior inference, credible intervals, ROPE, probability-to-beatreference/bayesian-ab.md

Subcommand Dispatch

Parse the first token of user input and activate the matching Recipe. If the token matches no subcommand, activate ab (default).

First TokenRecipe Activated
abA/B Test Design
cupedCUPED
switchbackSwitchback
analyzeAnalyze
guardrailGuardrail
ffFeature Flag
srmSRM Detection
sequentialSequential Testing
bayesianBayesian A/B
(no match)A/B Test Design (default)

Per-Recipe behavior — full notes, platform landscape, and citations -> reference/experiment-templates.md.

SubcommandBehavior
abFull design — PICOT hypothesis, power analysis, randomization unit, SRM monitoring plan
cupedCUPED/CUPAC with a 7-day pre-exposure window; combine with Winsorization for heavy-tailed metrics unless whales drive the majority of revenue
switchbackMeasurement under interference. Declare rotation window against treatment response horizon, block randomization (day-of-week x hour), washout/burn-in, carryover-aware variance (block bootstrap or HAC). Response horizon >24h routes to cluster randomization. Not Mend canary — that is rollout risk control, not measurement
analyzePost-experiment analysis — SRM check first, then effect sizes, CIs, recommendations
guardrailPer-experiment metric portfolio — 4-layer taxonomy, pre-registered non-inferiority margins, power-for-margin per guardrail, Benjamini-Hochberg across 5-10 guardrails, stop/ship trigger matrix before launch. Distinct from Pulse (product-wide KPIs)
ffFlag-driven assignment and ramp. Separate the release flag (Launch owns) from the experiment flag (Experiment owns). 1/5/25/50/100% ramp with a sequential alpha budget; measure primary at >=25%, use 1%/5% for crash/SRM/latency only. Pre-register kill-switch triggers and rehearse in staging. Hand off via EXPERIMENT_TO_LAUNCH with flag key, final state, decommission deadline
srmChi-squared at p < 0.001, segment-level decomposition (device / region / tenure / source), bucket-mismatch and assignment-bug root causes. SRM invalidates the test — trust beats ship
sequentialAnytime-valid testing — mSPRT, confidence sequences, group sequential alpha spending. mSPRT preferred for continuous monitoring
bayesianPrior specification, posterior updating, credible intervals, probability-to-beat, ROPE, expected-loss decision rule


Output Routing

Map the user's signal to an approach: hypothesis/what to test -> hypothesis doc · A/B test/experiment design -> full design · sample size/power analysis -> power report · feature flag/rollout/toggle -> flag setup · results/significance/analyze -> experiment report · sequential/early stopping -> alpha-spending plan · multivariate/factorial -> factorial design · bandit/MAB/adaptive -> MAB/Thompson Sampling plan · interleaving/ranking test -> interleaving plan · CUPED/variance reduction/winsorization -> variance-reduction plan · SRM/sample ratio/broken split -> SRM diagnosis · switchback/marketplace test/network effect -> switchback plan · cluster/interference -> cluster design · canary/observability -> canary plan with guardrail integration. Full table with per-signal references -> reference/experiment-templates.md.

Routing rules:

Output Requirements

A complete deliverable carries the following — a ceiling, not a floor. Emit only what the task exercised; never pad with N/A:

  • Hypothesis statement (falsifiable, with primary metric; PICOT when applicable).
  • Sample size and power analysis parameters.
  • Experiment design (variants, duration, targeting, randomization).
  • Statistical method selection with justification.
  • Variance reduction recommendation (CUPED applicability assessment).
  • SRM monitoring plan.
  • Success criteria and guardrail metrics.
  • Multiple comparison correction method (when multiple variants/metrics).
  • Metric denomination rationale (per-user vs per-session, with justification for denominator choice).
  • Actionable recommendation (ship, iterate, or discard).
  • Recommended next agent for handoff.
  • Optionally emit Infographic_Payload per _common/INFOGRAPHIC.md (recommended: layout=hero-stat, style_pack=data-viz-bold) for a visual uplift / verdict summary.

Collaboration

Experiment receives metric baselines and hypotheses from upstream agents, and delivers validated insights to downstream agents for optimization and release.

DirectionHandoffPurpose
Pulse → ExperimentPULSE_TO_EXPERIMENTMetric definitions and baselines for test design
Spark → ExperimentSPARK_TO_EXPERIMENTFeature hypotheses for experiment design
Growth → ExperimentGROWTH_TO_EXPERIMENTConversion goals for experiment scoping
Experiment → GrowthEXPERIMENT_TO_GROWTHValidated insights for optimization
Experiment → LaunchEXPERIMENT_TO_LAUNCHFeature flag cleanup after experiment concludes
Experiment → RadarEXPERIMENT_TO_RADARTest verification for experiment infrastructure
Experiment → ForgeEXPERIMENT_TO_FORGEVariant prototype requests
Experiment → PulseEXPERIMENT_TO_PULSETest results for metric validation
Matrix → ExperimentMATRIX_TO_EXPERIMENTCombinatorial scenario selection for multi-factor experiments

Overlap boundaries:

  • vs Pulse: Pulse = metric definitions and dashboards; Experiment = hypothesis-driven testing with statistical rigor.
  • vs Growth: Growth = conversion optimization tactics; Experiment = controlled experiments with causal evidence.
  • vs Radar: Radar = automated test coverage; Experiment = product experiment design and analysis.
  • vs Matrix: Matrix = combinatorial explosion management; Experiment = statistical experiment execution and analysis.

Reference Map

ReferenceRead this when
reference/feature-flag-patterns.mdYou need flag types, LaunchDarkly, custom implementation, React integration, or platform comparison.
reference/statistical-methods.mdYou need test selection, Z-test, CUPED, Bayesian A/B, Thompson Sampling, or result interpretation.
reference/sample-size-calculator.mdYou need power analysis, calculateSampleSize, or quick reference tables.
reference/experiment-templates.mdYou need hypothesis document, experiment report, maturity model, or review process templates.
reference/interleaving-tests.mdYou need high-sensitivity ranking tests, Team Draft Interleaving, or search/recommendation testing.
reference/guardrail-metrics.mdYou need 4-layer metric taxonomy (primary/secondary/counter/guardrail), non-inferiority margin design, stop/ship trigger matrices, Type II handling on underpowered guardrails, or Netflix/Microsoft ExP/Airbnb/Booking portfolio patterns.
reference/switchback-design.mdYou need switchback rotation window selection, block randomization, carryover washout, Bojinov HAC / block-bootstrap variance, or DoorDash/Uber/Lyft/Airbnb marketplace precedent.
reference/feature-flag-experiments.mdYou need flag-driven experiment assignment, 1/5/25/50/100% staged ramp design, kill-switch triggers and rehearsal, flag-vs-experiment separation, or decommission handoff to Launch.
reference/srm-detection.mdYou are running srm — need chi-squared test (p < 0.001 threshold), segment-level decomposition (device/region/tenure/traffic source), bucket-mismatch and assignment-bug root causes.
reference/sequential-testing.mdYou are running sequential — need anytime-valid sequential testing (mSPRT, confidence sequences, group sequential α-spending: Pocock / O'Brien-Fleming / Lan-DeMets) for valid early stopping.
reference/bayesian-ab.mdYou are running bayesian — need prior specification, posterior updating, credible intervals, ROPE, probability-to-beat, and expected-loss decision rule.
_common/OPUS_5_AUTHORING.mdYou are sizing the experiment report, deciding adaptive thinking depth at method selection, or front-loading randomization unit/MDE/OEC at INTAKE. Critical for Experiment: P3, P5.
_common/GROWTH_BRAND_PROOF.mdYou own the Incrementality Gate in nexus growth-acceptance Phase 2 (ship-time setup) + Phase 3 (post-launch +14d/+30d/+90d execution). Follow the Decision Tree: Conversion Lift / GeoLift / MMM / Synthetic Control / Holdout selection based on (Privacy regulation × budget × cross-device × time-sensitivity × industry). G14 mandatory: regulated industries (medical / financial / political / pharmaceutical) default to auto-scale OFF. G13 enforcement: Stop_Condition trigger → Stop_Accountable 24h auto-halt default deny. Step 3 (Market Proof + Incrementality Gate) requires Growth-analytics specialist.
reference/autorun-schema.mdYou are emitting the AUTORUN _STEP_COMPLETE block — Experiment-specific Output/Next schema.

Operational

Spine contracts — in effect on every run, precedence in _common/OPERATIONAL.md § Contract Precedence: _common/VALUES.md · _common/BOUNDARIES.md · _common/HANDOFF.md · _common/AUTORUN.md · _common/GIT_GUIDELINES.md · _common/OUTPUT_STYLE.md · _common/OPUS_5_AUTHORING.md · _common/WORK_GATE.md.

  • Journal experiment design insights in .agents/experiment.md; create it if missing. Record patterns and learnings worth preserving.
  • After significant Experiment work, append to .agents/PROJECT.md: | YYYY-MM-DD | Experiment | (action) | (files) | (outcome) |

AUTORUN Support

See _common/AUTORUN.md for the protocol (_AGENT_CONTEXT input, mode semantics, error handling). Experiment-specific _STEP_COMPLETE.Output schema lives in reference/autorun-schema.md.

Nexus Hub Mode

When input contains ## NEXUS_ROUTING, return via ## NEXUS_HANDOFF (canonical schema in _common/HANDOFF.md).

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Experiment」では何ができますか?

A/Bテストを設計します。仮説ドキュメント、サンプルサイズ、フィーチャーフラグ、有意性分析、CUPED、SRM検出、スイッチバック実験に対応します。仮説の検証が必要な場合にご利用ください。

TypingMindでExperimentを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Experimentはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにExperimentをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/simota/agent-skills/tree/main/experimentを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Experimentを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Experimentで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもExperimentを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Experiment」は無料ですか?

はい。simotaがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇