Skip to main content
skill CX Codex

finding-experiments — Claude Code skill: what it does, how to install

Resolves loose names, statuses, or relative dates into concrete PostHog experiment IDs. It saves users from digging up raw numeric IDs manually.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add PostHog/skills --skill finding-experiments -a claude-code
Open on GitHub

What finding-experiments does

When developers discuss tests, they rarely remember numeric IDs. This skill maps phrases like "signup test" or "latest pricing experiment" to PostHog experiment IDs. It queries the experiment-list tool from the local PostHog MCP server. Generic feature flag tools are ignored.

Search filters examine names, status values (draft, running, paused, exposure_frozen, stopped), and flag keys. If several tests match, the agent shows candidate names and dates so you can choose. It asks for confirmation before destructive actions.

This skill requires the PostHog-local MCP server. Without that server, lookups fail completely.

What it helps with

  • resolve casual experiment names into PostHog experiment IDs
  • disambiguate matching tests using status and creation date
  • verify flag key availability prior to creating a test
  • locate experiments by lifecycle status or recency

Example prompts for the agent

  • Pause my signup experiment
  • Find the most recent pricing test and check its status
  • Check if there is an active experiment for flag key checkout-v2

How to install finding-experiments

1Skills CLI (Vercel)

npx skills add PostHog/skills --skill finding-experiments -a claude-code

2Manually: put the files in place

~/.claude/skills/finding-experiments/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/finding-experiments/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about finding-experiments

How do I install finding-experiments in Claude Code?

Run npx skills add PostHog/skills --skill finding-experiments -a claude-code. The skill file is placed at ~/.claude/skills/finding-experiments/SKILL.md.

What does the finding-experiments skill do?

It translates natural language references into concrete PostHog experiment IDs using the MCP experiment-list tool. Matches are resolved through names, recency, or lifecycle states like running and paused.

Can this skill search experiments via feature flag tools?

No. The skill explicitly bans feature-flag-get-all and forces the agent to use dedicated handlers like experiment-list and experiment-get-by-flag-key.

Source text

SKILL.md · MIT
---
name: finding-experiments
description: 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.
---

# Finding experiments

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

```text
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
```

## When NOT to search

- 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

## Related skills

- **`managing-experiment-lifecycle`** — act on the experiment once you've resolved its ID
- **`diagnosing-experiment-health`** — investigate the experiment you found

© PostHog · MIT · PostHog/skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set52

configuring-experiment-rollout A skill that helps the agent set variant splits and rollout percentages for PostHog experiments, and disambiguate vague requests like "roll out to 25%". CX Codex +1 389installs exploring-llm-costs The skill investigates LLM spend in PostHog: total cost, breakdowns by model, user and trace, plus token and cache economics. CX Codex +1 385installs feature-usage-feed Builds an LLM-judge eval that pulls canonical use cases for a PostHog feature and streams them to Slack. Useful when trace volume is too high to read by hand. CX Codex +1 381installs managing-experiment-lifecycle A PostHog skill that walks an experiment through its states: launch, pause, freeze exposure, end, archive, and migration of a legacy experiment to the new engine. CX Codex +1 379installs exploring-live-traffic A skill that teaches the agent to read PostHog's Live tab: who is on the site right now, which bots are crawling, and where visitors go. CX Codex +1 378installs finding-replay-for-issue Picks the session recording that actually shows what the user did before an error, instead of guessing among hundreds of linked sessions. CX Codex +1 375installs setting-up-a-data-warehouse-source Guides connecting external sources like Stripe, Postgres, or Supabase to PostHog's data warehouse. It handles credential validation, schema discovery, and sync setup. CX Codex +1 374installs suggesting-data-imports Spots which data PostHog doesn't collect and points you to the right warehouse source. Handy when a query fails on a missing table. CX Codex +1 372installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor