debugging-experiments
БесплатноЗапускает вложенные скриптыНе проверенDebug PostHog Experiments (A/B tests) when the results look wrong. Use for a results question, most commonly "why aren't my exposures even?", "why is one…
от PostHog★ 41 278 звёзд на GitHubОб этом скилле
Debugging experiments
PostHog Experiments are A/B tests: a feature flag randomizes users into variants, the SDK records an exposure when the flag is read, and PostHog computes per-variant metrics and significance. Someone looks at that results page and asks why it looks wrong.
Most experiment-results problems are config or exposure-collection problems, not statistics bugs. The randomization is fine; something upstream is skewing which users get exposed, or stopping exposures from being recorded. The job is to find which, prove it with the experiment's own data, and give a plain-language explanation plus the fix.
This skill is the first stop for a results question. It carries the two most common complaints
inline (uneven exposures, missing exposures) and loads
diagnosing-experiment-health as a diagnostic
library for the deeper long tail (interpretation traps, numbers-vs-SQL, mid-run surprises).
Debugging workflow
- Pin down the question. Establish the experiment ID or name, the
lib/platform if relevant, the exact complaint in the user's words, and what they already tried. The config may have been edited since the problem was first seen, so pull the current state and treat earlier claims as stale. - Resolve the experiment. If you have a name rather than an ID, load
finding-experimentsto resolve it, then callposthog:experiment-get. - Pull the data read-only. Run the fixed data-pull sequence in
references/pulling-the-data.md. This produces the
"pertinent numbers" you will report: per-variant exposed-person counts,
$multipleshare, thedistinct_id/personfragmentation ratio, the SRM chi-squared result, the exposure trajectory, and the flag/experiment activity log. Verify from data before asking the user anything. - Match the complaint to the known-cause catalog below. Confirm the single leading cause
with one targeted number from step 3 before writing. Treat the user's own conclusion
("it's just noise", "a measurement bug") as a hypothesis to disconfirm, not confirm —
pull the data independently rather than re-deriving their answer. Quantify a suspected cause
before asserting its impact (count the contaminating cohort, don't eyeball it). One trap in
particular: never run the SRM chi-square against an assumed even split — read the configured
rollout_percentagefirst, since an intended 34/33/33 reads as a ~2% SRM under an equal-split assumption. - Scope the fix to the experiment's state before recommending it. On a draft, config
changes are free — recommend freely. On a running experiment every change has a mid-run
tradeoff (changing the split is an anti-pattern — prefer reset or end+restart; see
configuring-experiment-rolloutandmanaging-experiment-lifecycle). On a stopped/shipped experiment the flag and results are the documented outcome, so recommend interpretation or a next experiment, not a mid-run edit. Don't propose reversing a state change unless the user asks how to undo it. - Report the answer: cause → fix → the numbers that prove it. Use the labels the experiment UI shows ("Multiple variant handling", "Exclude from analysis"), not field names.
Known-cause catalog — "exposures aren't even" / "one variant has no traffic"
Ordered by how often they're the answer. Full mechanism detail lives in
diagnosing-experiment-health/references/bias-and-skew.md
(group A) — load it when a case needs more depth than the summary here.
First, split a real SRM into its two possible homes. Assignment is a deterministic hash of a
stable identifier (the distinct_id by default; the device ID or group key for those flag types —
see references/pulling-the-data.md), so with an unchanged split
every user has a fixed variant and any set of users must fall close to the configured percentages.
A confirmed SRM (chi-squared p < 0.001 at healthy volume — not eyeballed) therefore lives in exactly
one of two places:
- Assignment-side — the recorded variant disagrees with what the hash would assign. Something overrode assignment at serve time: a stale local-evaluation definition, an inherited bootstrap value, a forced release-condition variant, or a mid-run rehash.
- Capture-side — the recorded variant agrees with the hash (assignment is fine), but which users get an exposure recorded is selected: one arm reaches a surface the other never does, or one arm's users read the flag before it loaded and are silently dropped.
The decisive test that tells you which half you're in — recompute the assignment hash offline, then split the observed gap i
Установить debugging-experiments в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл debugging-experiments?
Debug PostHog Experiments (A/B tests) when the results look wrong. Use for a results question, most commonly "why aren't my exposures even?", "why is one variant getting no traffic?", "why am I missing / seeing too few exposures?", "why does the bias banner show?", or "why don't PostHog's numbers match my SQL?". Pulls the experiment's real data read-only, matches it to a known-cause catalog, and gives a plain explanation, the fix, and the numbers that prove it. Loads diagnosing-experiment-health as its deep diagnostic library. DO NOT TRIGGER when: creating an experiment (use creating-experiments), only configuring rollout (configuring-experiment-rollout) or metrics (configuring-experiment-analytics), asking lifecycle questions (managing-experiment-lifecycle), or the underlying feature flag is what's misbehaving rather than the results (use debugging-feature-flags).
Как установить скилл debugging-experiments?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл debugging-experiments запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic