debugging-experiments
Was er macht
Dieser Skill hilft, wenn die Ergebnisse eines Experiments falsch wirken, meist weil Nutzer nicht gleichmäßig gezählt werden. Er richtet sich an Kundenbetreuer und Supportkräfte, die die Ergebnisse eines Experiments verstehen müssen.
Wann du ihn nutzt
- ✓Wenn ein Experiment für eine Variante weit weniger Expositionen zeigt als für die andere.
- ✓Wenn ein Experiment eine Verzerrungswarnung zeigt und du den Grund nicht kennst.
- ✓Wenn die Zahlen in PostHog nicht zu dem passen, was du mit deiner eigenen SQL berechnet hast.
Link zum Skill
https://github.com/PostHog/posthog/blob/master/products/experiments/skills/debugging-experiments/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Warum bekommt eine Variante meines Experiments fast keinen Traffic, obwohl die Aufteilung 50/50 ist?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill liest die Einrichtung des Experiments und prüft die Expositionsdaten, um herauszufinden, was bestimmt, welche Nutzer gezählt werden. Danach erklärt er Ursache und Lösung in einfacher Sprache.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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. A customer looks at that results page and asks why it looks wrong.
Most experiment-results tickets 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 customer's own data, and hand back a plain-language explanation plus the fix.
This skill is the customer-support front door. 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
- Parse the ticket. Extract project ID, instance (US vs EU — the URLs and data live in
different places), experiment ID or name, the
lib/platform if relevant, the exact complaint in the customer's words, and what they already tried. Aged or multi-reply tickets are dirty: the config may have been edited mid-thread, so re-pull current state and treat earlier claims as stale. - Resolve the experiment. If the ticket names it rather than giving 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 show the customer: 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 customer 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 customer'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 customer asks how to undo it. - Write the reply using references/customer-reply.md: cause → fix → the numbers that prove it, in the customer's UI language.
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 disag
Häufige Fragen
Ist die Randomisierung meist kaputt?
Meist nicht. Die meisten Probleme mit Ergebnissen kommen von der Einrichtung oder der Erfassung der Exposition, nicht von der Statistik.
Warum weichen PostHog-Zahlen von meiner SQL ab?
Jede Seite nutzt andere Regeln, wer gezählt wird. Der Skill vergleicht beide, um den Unterschied zu finden.
Was ist, wenn das Experiment während des Tests bearbeitet wurde?
Der Skill prüft die aktuelle Einrichtung erneut, weil frühere Notizen veraltet sein können.
Details
Originalbeschreibung des Autors
Debug and support PostHog Experiments (A/B tests) for a customer looking at their own results. Use whenever an experiment support ticket is pasted or a customer asks 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 produces a customer-facing explanation, fix, and review of the pertinent numbers. Loads diagnosing-experiment-
repo: PostHog/posthog
Beliebtheit
- GitHub-Sterne
- 41k
- Platz im Ranking
- #6878
- Lizenz
- —
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
depot-ci
41kBringt deinem Agenten bei, Depot-CI-Workflows einzurichten, bestehende Workflows zu migrieren und Laufprotokolle auszuwerten.
depot-container-builds
41kHilft deinem Agenten, Docker-Images auf Depot-Remote-Buildern zu bauen, mit Multi-Plattform-Images, Registry-Push und Fehlerbehebung.
depot-github-runners
41kLässt deinen Agenten GitHub-Actions-Jobs auf Depot-Runnern laufen, mit passender Runner-Größe und Labels, und hilft bei Einrichtungsfehlern.
editing-agents-md
41kHilft deinem Agenten zu entscheiden, ob eine Regel in AGENTS.md oder CLAUDE.md gehört, und sie so zu formulieren, dass sie hält.
Ähnliche Skills
gitcrawl
394kLässt deinen Agenten ein gespeichertes Archiv von GitHub-Issues und Pull Requests durchsuchen, Duplikate gruppieren und ihren aktuellen Status auf GitHub prüfen.
slacrawl
394kLässt deinen Agenten Nachrichten in einem lokalen Slack-Archiv durchsuchen und zählen, dessen Aktualität prüfen und es bei Bedarf auffrischen.
goplaces
394kHilft deinem Agenten, mit Google Places nach Orten zu suchen, Details und Bewertungen abzurufen und Ortsnamen aufzulösen, mit JSON-Ausgabe für Skripte.