Skill Press

No. 427 · finding-experiments

Finding experiments

A field guide from PostHog

PostHog

When to use it

Resolves a PostHog experiment reference from natural language to a concrete experiment ID by browsing `experiment-list` (not feature-flag tools), with disambiguation when multiple experiments match. Use when the user names or quotes an experiment ("split test demo", "the File engagement boost experiment", "onboarding retention test", "landing page hero experiment", "pricing experiment"), describes it loosely ("the signup experiment", "my pricing test", "the one with the new checkout"), uses a relative reference ("latest", "most recent", "the one I created yesterday"), filters by status (running, draft, paused, exposure frozen, stopped, archived), or otherwise refers to an experiment by anything other than its concrete ID.

Rank
No. 427 of 971
Installs
Not listed yet
Length
379 words · 2 min
Files
2
License
MIT

Get this skill

Download the skill folder (.zip, 3 KB) ↓ · SKILL.md only ↓

Agent prompt

Paste into a coding agent with terminal access. Check the upstream requirements for the skill you’re installing.

Prompt
Install the "finding-experiments" Agent Skill by PostHog, from https://github.com/PostHog/posthog.

1. Fetch the whole folder products/experiments/skills/finding-experiments — SKILL.md plus every script, reference, and asset beside it, not just SKILL.md. For example:
   skill_checkout=$(mktemp -d)
   git init "$skill_checkout"
   git -C "$skill_checkout" fetch --depth 1 https://github.com/PostHog/posthog.git b7bb6c25dda489af1b71f2da4e3e9a7037f2ff8d
   git -C "$skill_checkout" checkout --detach FETCH_HEAD
2. Copy it into your skills directory as a folder named "finding-experiments":
   - Claude Code: ~/.claude/skills/finding-experiments/ (all projects) or .claude/skills/finding-experiments/ (this project only)
   - Another agent: the directory you load Agent Skills from (folders containing a SKILL.md)
3. Check that finding-experiments/SKILL.md exists and its frontmatter says name: finding-experiments.
4. Read SKILL.md, then tell me in two or three sentences what the skill does and when it will trigger, and list any dependencies it mentions (Python packages, npm packages, CLIs) that aren't installed yet. Don't install them without asking.

Note: These workflows use PostHog product tools and project data. Some need features such as experiments, heatmaps or AI visibility enabled in your PostHog project.

skills CLI

One command; the skills.sh installer detects your agents (Claude Code, Cursor, Codex, and more).

Terminal
npx skills add https://github.com/PostHog/posthog/tree/b7bb6c25dda489af1b71f2da4e3e9a7037f2ff8d/products/experiments/skills/finding-experiments --skill finding-experiments

Contents

  1. How to find an experiment
  2. After finding matches
  3. Get full details if needed
  4. Examples
  5. When NOT to search
  6. Related skills

The skill, in full

Users refer to experiments by name, description, or relative references — not by ID. This skill resolves natural language references to concrete experiment IDs.

How to find an experiment

Use the experiment-list tool from the Posthog-local MCP server.

IMPORTANT: Do NOT use feature-flag-get-all or any feature flag tool to find experiments. Use the dedicated experiment list tool: experiment-list.

This tool returns experiments with their id, name, status, feature_flag_key, start_date, end_date, and created_at. Browse the returned list to find the experiment matching the user’s reference:

  • By name: scan the name field for matches
  • By recency: results are ordered newest first by default
  • By status: match the status field (draft, running, paused, exposure_frozen, stopped)
  • By flag key: skip the list and call experiment-get-by-flag-key with the key. It returns the full experiment, or found: false with a reason. no_flag and no_experiment mean the key is free, so this is also the existence check to run before experiment-create. ambiguous means several experiments share the flag and none is the single live one: show the candidates and pick one with experiment-get rather than creating another.
  • By partial flag key: call experiment-list with search set to the fragment. search matches substrings of the experiment name and the flag key, ignoring case.

After finding matches

  • Exactly one match: Use it. Confirm with the user by name before destructive actions (delete, ship, end).
  • Multiple matches: List them with name, status, and creation date. Ask the user to pick.
  • No matches: Tell the user. Suggest checking archived experiments or different terms.

Get full details if needed

After resolving to an ID, call experiment-get for the full object (metrics, flag details, parameters).

Examples

User: "pause my signup experiment"

Agent:
1. Calls experiment-list
2. Scans results, finds "New signup process" (ID: 1371, status: running)
3. Proceeds to pause experiment 1371
  • You already have the experiment ID from earlier in the conversation
  • The user just created the experiment — you have the ID from the create response
  • The user provided the ID directly
  • managing-experiment-lifecycle — act on the experiment once you’ve resolved its ID
  • diagnosing-experiment-health — investigate the experiment you found

More in Conversion & Retention

All Conversion & Retention skills →

More from PostHog

From PostHog/posthog at b7bb6c2, MIT. Install counts from skills.sh.