creating-experiments
できること
このスキルは、プロジェクトの読み取りから、指標と実行期間の設定まで、新しいA/Bテストを作る手順を案内します。変更を素早くテストしたいプロダクトチーム向けです。
使う場面
- ✓ページや機能のA/Bテストを新しく作りたいとき。
- ✓テストの指標と実行期間を設定したいとき。
- ✓後で調整できる実験の下書きがほしいとき。
スキルのリンク
https://github.com/PostHog/posthog/blob/master/products/experiments/skills/creating-experiments/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“価格ページの新しい見出しで、サインアップが増えるかを確かめるA/Bテストを作ってください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
まずプロジェクトを読み取って、適切な対象イベントと候補の指標を選びます。その後、実験を下書きとして作り、ロールアウトと分析を調整します。どの選択が推測なのかを示し、振り分けについてだけ尋ねます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Creating experiments
This skill walks through creating a new A/B test experiment: read the project, then the 3-step flow, then report the draft.
Core principle: draft first, iterate on details
Create the experiment as a draft quickly, then iterate on metrics and configuration. The user gets a tangible draft immediately and can refine it. Choose settings from the project's facts rather than asking, and say which choices are guesses. Bucketing is the exception: the facts cannot decide it, so ask before you create the experiment.
Step 0: Read the project
The right bucketing, metric and running time depend on the project: who sees the page, which SDKs evaluate the flag, how often the metric event happens. Read that before configuring anything.
From the request, infer the target (the event that marks someone reaching the change, usually
$pageviewfor a page) and a candidate metric event. Confirm both exist withread-data-schema. Don't ask the user for event names you can find. For a page, readevent_property_valuesfor$hostand$pathnameon the target event as well. The response samples the values rather than listing them all, so read it for the shape the project records (a trailing slash, awww.prefix, the casing) rather than as proof that a value is absent. An exact filter has to carry that shape:/pricingmatches nothing where every pageview says/pricing/, andexample.commatches nothing where the host iswww.example.com.If the
experiment-setup-contexttool is available, call it once withtarget_eventandmetric_event. For a web surface, addtarget_propertieswith an exact$host. Add an exact$pathnameas well when the surface is one page.target_url_containsis a substring match on$current_url. A bare domain matches any host that contains it,notexample.comincluded, and a homepage path matches every page under it. Both overstate the traffic and the exposure rate. For a surface that spans several pages, keep the exact$hostand put only the path fragment intarget_url_contains. Addmetric_propertiesin the same call when the candidate metric counts only some occurrences of its event. Passprevious_experiments_limit: 5. Five experiments are enough to read a precedent, and the default of 10 roughly doubles the response for no more signal. If the tool is not available, continue without it and treat every choice below as a best guess. Never call a tool you can't see.Each filter needs a
typeofeventorperson, akey, anoperatorand avalue. The call rejects theflag_evaluates_tooperator with a 400 that names it. For the homepage of one domain:{ "target_event": "$pageview", "target_properties": [ { "key": "$host", "type": "event", "operator": "exact", "value": ["www.example.com"] }, { "key": "$pathname", "type": "event", "operator": "exact", "value": ["/"] } ], "metric_event": "your_conversion_event", "previous_experiments_limit": 5 }Apply references/setup-decisions.md to the result. It maps each fact to a choice (bucketing, where the flag is evaluated, exposure, primary metric, running time, precedent) and to a tier for the summary.
Carry those choices into steps 1 to 3.
Ask the user only when a choice is "not decided" and the user is in the conversation. If the user said they are away, or asked for a draft without questions, decide with the defaults and list the open points in the report.
The 3-step creation flow
Step 1: What are we testing?
Gather these before calling experiment-create:
- Experiment name — descriptive, inferred from context when possible
- Hypothesis — what you expect to happen (goes in
description) - Feature flag key — kebab-case. Infer a new key unless the user names an existing flag.
The flag is auto-created — do NOT create one separately. The one exception is device-id bucketing, which
experiment-createcannot set (see the recipe inconfiguring-experiment-rollout). - Type — leave empty (will internally default to
"product". The"web"value is reserved for no-code experiments configured visually with the PostHog toolbar in a browser; it cannot be meaningfully driven via MCP. If a user asks for a no-code/toolbar experiment, point them to the PostHog UI instead of creating one here.)
If the user gives enough c
よくある質問
すぐにテストを開始しますか?
いいえ。まず実験を下書きとして作るため、開始前に詳細を確認して調整できます。
何を尋ねられますか?
ユーザーの振り分け方法についてだけ尋ねます。プロジェクトの事実からはそれを決められないためです。
指標はどう選ばれますか?
プロジェクトのイベントを見て対象と候補の指標を探し、使う前にそれらのイベントが存在することを確認します。
詳細
作者による元の説明
Guides agents through experiment creation: reading the project's setup with experiment-setup-context, defining the hypothesis, configuring rollout and bucketing, setting up analytics and running time, and reporting which choices are guesses. Delegates rollout decisions to configuring-experiment-rollout and metric setup to configuring-experiment-analytics. TRIGGER when: user asks to create a new experiment or A/B test, OR when you are about to call experiment-create. DO NOT TRIGGER when: user is updating an existing experiment, managing lifecycle, or only browsing experiments.
repo: PostHog/posthog
人気
- GitHubのスター
- 41k
- ランキング
- #6877
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
depot-ci
41kエージェントが、GitHub Actionsの代替であるDepot CIのワークフローを設定し実行できるよう支援します。既存のワークフローの移行や、実行ログの確認も含みます。
depot-container-builds
41kエージェントが、Depotのリモート・ビルダーでDockerイメージを作れるよう支援します。マルチプラットフォームのイメージ、レジストリへのプッシュ、ビルド失敗の修正を含みます。
depot-github-runners
41kエージェントが、GitHub Actionsのジョブを Depot が管理するランナーに移し、ランナーのサイズとラベルを選び、ランナー設定の問題を解決できるよう支援します。
editing-agents-md
41kエージェントが、AGENTS.mdとCLAUDE.mdのどちらにルールを書くべきかを判断し、ファイルを膨らませずに守られやすい形で書けるよう支援します。
似ているスキル
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
slacrawl
394kローカルのSlackアーカイブ内のメッセージを検索して件数を数え、アーカイブの新しさを確認し、必要に応じて更新するようエージェントを支援します。
goplaces
394kGoogle Placesを使って、場所を検索し、詳細や口コミを取得し、場所の名前を解決するようエージェントを支援します。スクリプト用にJSON出力もできます。