analyzing-experiment-session-replays
What it does
This skill reviews recordings of users in each experiment variant to see how their behavior differs. It is for product and growth teams who want the story behind their test numbers.
When to use it
- ✓When you want to see how users in each experiment variant behave.
- ✓When you want to find usability problems that appear in only one variant.
- ✓When you want qualitative evidence to explain the results of a launched experiment.
Skill link
https://github.com/PostHog/posthog/blob/master/products/experiments/skills/analyzing-experiment-session-replays/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Show me how users behave in the test variant of my pricing experiment compared with the control.”
5 new skills a week. 1 minute to read.
How it works
It finds the experiment and its variants, then reviews the session recordings for each group. It compares what users did and summarizes the differences.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Analyzing experiment session replays
This skill guides you through analyzing session recordings for experiment variants to understand behavioral differences between control and test groups.
When to use this skill
Use this skill when:
- The user asks to analyze session replays for an experiment
- The user wants to understand how users behave differently across experiment variants
- The user asks to compare user behavior between control and test variants
- The user wants qualitative insights to complement experiment metrics
- The user asks questions like "How are users behaving in my experiment?" or "Show me session replays for variant X"
Prerequisites
Before analyzing session replays:
- The experiment must be launched (not in draft state)
- Session replay must be enabled for the project
- Users must have been exposed to the experiment variants
- The experiment must have a start date
Workflow
1. Get experiment details and feature flag variants
First, retrieve the experiment information and the feature flag variants (source of truth).
Step 1a: Get experiment metadata
You can either:
- Option A: Use the
experiment-gettool if you already have the experiment ID from context - Option B: Query the experiments table via HogQL:
SELECT
e.id,
e.name,
f.key AS feature_flag_key,
e.start_date,
e.end_date
FROM system.experiments e
JOIN system.feature_flags f ON f.id = e.feature_flag_id
WHERE e.id = <experiment_id>
From the experiment data, extract:
feature_flag_key: The feature flag controlling the experimentstart_dateandend_date: The experiment's time range
Step 1b: Get variants from the feature flag
IMPORTANT: Always get variants from the feature flag, NOT from experiment.parameters.feature_flag_variants.
The parameters can be out of sync or deprecated. The feature flag is the source of truth.
Query the feature flag to get the current variants:
SELECT filters.multivariate.variants AS variants
FROM system.feature_flags
WHERE key = '<feature_flag_key>'
Select the variants path directly — selecting the whole filters object gets truncated in results for flags with large targeting configs.
Example structure: [{"key": "control", "name": "Control", "rollout_percentage": 50}, {"key": "test", ...}]
The variant key values (e.g., "control", "test", "variant_a") are what you'll use to filter session recordings.
2. Build session recording filters for each variant
For each variant in the experiment, construct recording filters that match users exposed to that variant.
Filter structure for a variant (input to query-session-recordings-list):
{
"date_from": "<experiment.start_date>",
"date_to": "<experiment.end_date or current time>",
"filter_test_accounts": true,
"properties": [
{
"type": "event",
"key": "$feature/<feature_flag_key>",
"operator": "exact",
"value": ["<variant_key>"]
}
]
}
Key points:
- The
$feature/<flag_key>event property records the flag's value on each event — filtering on it matches recordings where the flag was active with that variant. This is an approximation of exposure, broader than the experiment's exposure event ($feature_flag_called, or$experiment_exposureon the new rollout — both deduped per identity): right for browsing behavior across variants, but not an exact mirror of the analysis population — thescanning-experiments-with-replay-visionskill derives that exact filter when you need it valueis an array of variant key strings (e.g.["control"]); for boolean flags use["true"]or["false"]- Avoid the
type: "flag"/flag_evaluates_toproperty filter for variant scoping — the recordings query accepts it but silently ignores it, returning unfiltered results (last verified 2026-06-10). If you want to try it anyway, verify it actually filters first: a query with a nonexistent flag key should return zero recordings - Set the date range to the experiment's start and end dates
- Enable
filter_test_accounts: trueto exclude test users
3. Retrieve recordings for each variant
Use the query-session-recordings-list tool with the filters constructed in step 2.
Call the tool once per variant to get recordings for each group:
- Variant "control" → recordings for control group
- Variant "test" → recordings for test variant
- Additional variants if the experiment has more than 2
The tool retur
FAQ
Why must the experiment be launched?
Replays are linked to variants once users have been exposed, so the experiment must be running and have a start date.
Do I need session replay turned on?
Yes. Session replay must be enabled for the project before this works.
Does this replace the experiment metrics?
No. It adds qualitative insight to help explain the numbers.
Details
Original description by the author
Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with different experiment variants, identify usability issues, compare behavior patterns between control and test groups, or get qualitative insights to complement quantitative experiment results. Also covers pairing the observed behavior with a linked survey when the user wants qualitative feedback beyond what recordings show.
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6874
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-container-builds
41kHelps your agent build Docker images on Depot's remote builders, including multi-platform images, pushing to registries, and fixing build failures.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
Similar skills
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
slacrawl
394kLets your agent search and count messages in a local Slack archive, check how fresh that archive is, and refresh it when needed.
goplaces
394kHelps your agent search for places, get their details and reviews, and resolve place names using Google Places, with JSON output for scripts.