# debugging-experiments

debugging-experiments — a Claude Code skill for investigating PostHog experiment results. It checks uneven or missing exposures against the experiment’s data and known causes.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 150 installs · ★ 101 repo stars
- Author: PostHog
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/debugging-experiments/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/debugging-experiments

## What it does

The skill investigates support questions about PostHog A/B test results, including uneven exposures, a variant with no traffic, bias warnings, and numbers that differ from SQL. It reads the experiment data, identifies a likely cause, then drafts an explanation with a fix and supporting figures.

For deeper checks, it loads the `diagnosing-experiment-health` library. It matches the proposed fix to the experiment’s state, whether draft, running, or stopped. This skill is not for creating experiments, configuring rollout or metrics, lifecycle questions, or debugging a misbehaving feature flag.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill debugging-experiments -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/debugging-experiments/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/debugging-experiments/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill debugging-experiments -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/debugging-experiments/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill debugging-experiments -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/debugging-experiments/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/debugging-experiments
```

2. **Manually: put the files in place**
- File: `.github/skills/debugging-experiments/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill debugging-experiments -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/ai-plugin --path skills/debugging-experiments
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/debugging-experiments/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill debugging-experiments -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/debugging-experiments/SKILL.md

## When to use it
- trace an uneven exposure split to its cause
- find out why a variant receives no traffic
- investigate missing or unusually low exposure counts
- compare PostHog experiment results with SQL
- explain a bias warning and outline a fix

## Example prompts
- Investigate why the variants in this experiment have different exposure counts.
- One variant has no traffic. Check the data and explain what is happening.
- Compare this PostHog experiment with my SQL results and find the discrepancy.

## Similar
- [systematic-debugging](https://affpapa.org/en/nevibecode/skills/systematic-debugging.md) — skill · 306118 installs
- [debugging-and-error-recovery](https://affpapa.org/en/nevibecode/skills/debugging-and-error-recovery.md) — skill · 79600 installs
- [brainstorm-experiments-new](https://affpapa.org/en/nevibecode/skills/brainstorm-experiments-new.md) — skill · 3100 installs
- [brainstorm-experiments-existing](https://affpapa.org/en/nevibecode/skills/brainstorm-experiments-existing.md) — skill · 3000 installs
- [debugging-strategies](https://affpapa.org/en/nevibecode/skills/debugging-strategies.md) — skill · 13414 installs
- [parallel-debugging](https://affpapa.org/en/nevibecode/skills/parallel-debugging.md) — skill · 10000 installs

From the same set: [posthog/ai-plugin](https://affpapa.org/en/nevibecode/by/posthog/ai-plugin.md) — 82 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
