# modeling-conversion-metrics

modeling-conversion-metrics builds a reusable conversion model: funnel steps, a conversion window, drop-off and time to convert. Works on PostHog warehouse views in HogQL or in a dbt project.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 178 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/modeling-conversion-metrics/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/modeling-conversion-metrics

## What it does

The skill turns a sequence of events into a durable conversion model: how many units reached each step, where they fall off, how long the trip takes. Four parameters get pinned down: the steps in order, the conversion window, the aggregation unit (`person_id` for B2C or a group key for B2B), and the order mode — ordered, strict or any order.

On PostHog it computes the funnel per unit with `windowFunnel(window)(timestamp, cond_1, …, cond_n)`, rolls the furthest step reached into rates, then saves the result through `view-create`. Reused views get monthly rollups synced daily via `sync_frequency`. In dbt it stages the event stream and builds an `fct_conversion` mart with tests. Recipes sit in `references/posthog/` and `references/dbt/`; exact definitions are in `references/conversion-metric-definitions.md`.

\`modeling-warehouse-foundations` comes first, because the view-versus-dbt choice is made there. Before any persistent view the skill checks that the events exist (`read-data-schema`) and asks you to confirm step names, since the same-sounding event means different things to different teams. No pinned window means no funnel. Overall conversion and step-to-step conversion are two separate numbers, and the skill keeps them apart.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/modeling-conversion-metrics
```

2. **Manually: put the files in place**
- File: `.github/skills/modeling-conversion-metrics/SKILL.md`

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill modeling-conversion-metrics -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/modeling-conversion-metrics/SKILL.md

## When to use it
- model a signup-to-paid funnel with a fixed conversion window
- find the step where most users drop off
- report conversion per account instead of per person
- turn a one-off funnel chart into a reusable warehouse view
- add dbt tests around an `fct_conversion` mart

## Example prompts
- Model conversion from `signed_up` to `purchased` with a 30-day window, and show both overall and step-to-step rates.
- Build the activation funnel per account using `$group_0` and tell me which step loses the most people.
- Create an `fct_conversion` mart in dbt with tests for the onboarding steps.

## Similar
- [aa-conversion-funnel-analysis](https://affpapa.org/en/nevibecode/skills/aa-conversion-funnel-analysis.md) — skill · 389 installs
- [cja-funnel-health-check](https://affpapa.org/en/nevibecode/skills/cja-funnel-health-check.md) — skill · 379 installs
- [conversion-optimization](https://affpapa.org/en/nevibecode/skills/wondelai-conversion-optimization.md) — skill · 1700 installs
- [querying-posthog-data](https://affpapa.org/en/nevibecode/skills/querying-posthog-data.md) — skill · 890 installs
- [analyzing-experiment-session-replays](https://affpapa.org/en/nevibecode/skills/analyzing-experiment-session-replays.md) — skill · 463 installs
- [seo-posthog](https://affpapa.org/en/nevibecode/skills/seo-posthog.md) — skill · 141 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
