creating-experiments
Qué hace
Esta skill recorre la creación de una nueva prueba A/B, desde la lectura de tu proyecto hasta la configuración de la métrica y del tiempo de ejecución. Está pensada para equipos de producto que quieren probar un cambio rápidamente.
Cuándo usarla
- ✓Cuando quieres crear una nueva prueba A/B para una página o funcionalidad.
- ✓Cuando quieres configurar las métricas y el tiempo de ejecución de una prueba.
- ✓Cuando quieres un experimento en borrador que puedas refinar después.
Link de la skill
https://github.com/PostHog/posthog/blob/master/products/experiments/skills/creating-experiments/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Crea una prueba A/B para mi página de precios y ver si un nuevo titular consigue más registros.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Primero lee tu proyecto para elegir un evento objetivo y una métrica razonables, crea un experimento en borrador y después refina el despliegue y el análisis. Indica qué decisiones son suposiciones y solo te pregunta por la asignación de usuarios.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Creating experiments
This skill walks through creating a new A/B test experiment: read the project, then the 3-step flow, then report the draft.
Core principle: draft first, iterate on details
Create the experiment as a draft quickly, then iterate on metrics and configuration. The user gets a tangible draft immediately and can refine it. Choose settings from the project's facts rather than asking, and say which choices are guesses. Bucketing is the exception: the facts cannot decide it, so ask before you create the experiment.
Step 0: Read the project
The right bucketing, metric and running time depend on the project: who sees the page, which SDKs evaluate the flag, how often the metric event happens. Read that before configuring anything.
From the request, infer the target (the event that marks someone reaching the change, usually
$pageviewfor a page) and a candidate metric event. Confirm both exist withread-data-schema. Don't ask the user for event names you can find. For a page, readevent_property_valuesfor$hostand$pathnameon the target event as well. The response samples the values rather than listing them all, so read it for the shape the project records (a trailing slash, awww.prefix, the casing) rather than as proof that a value is absent. An exact filter has to carry that shape:/pricingmatches nothing where every pageview says/pricing/, andexample.commatches nothing where the host iswww.example.com.If the
experiment-setup-contexttool is available, call it once withtarget_eventandmetric_event. For a web surface, addtarget_propertieswith an exact$host. Add an exact$pathnameas well when the surface is one page.target_url_containsis a substring match on$current_url. A bare domain matches any host that contains it,notexample.comincluded, and a homepage path matches every page under it. Both overstate the traffic and the exposure rate. For a surface that spans several pages, keep the exact$hostand put only the path fragment intarget_url_contains. Addmetric_propertiesin the same call when the candidate metric counts only some occurrences of its event. Passprevious_experiments_limit: 5. Five experiments are enough to read a precedent, and the default of 10 roughly doubles the response for no more signal. If the tool is not available, continue without it and treat every choice below as a best guess. Never call a tool you can't see.Each filter needs a
typeofeventorperson, akey, anoperatorand avalue. The call rejects theflag_evaluates_tooperator with a 400 that names it. For the homepage of one domain:{ "target_event": "$pageview", "target_properties": [ { "key": "$host", "type": "event", "operator": "exact", "value": ["www.example.com"] }, { "key": "$pathname", "type": "event", "operator": "exact", "value": ["/"] } ], "metric_event": "your_conversion_event", "previous_experiments_limit": 5 }Apply references/setup-decisions.md to the result. It maps each fact to a choice (bucketing, where the flag is evaluated, exposure, primary metric, running time, precedent) and to a tier for the summary.
Carry those choices into steps 1 to 3.
Ask the user only when a choice is "not decided" and the user is in the conversation. If the user said they are away, or asked for a draft without questions, decide with the defaults and list the open points in the report.
The 3-step creation flow
Step 1: What are we testing?
Gather these before calling experiment-create:
- Experiment name — descriptive, inferred from context when possible
- Hypothesis — what you expect to happen (goes in
description) - Feature flag key — kebab-case. Infer a new key unless the user names an existing flag.
The flag is auto-created — do NOT create one separately. The one exception is device-id bucketing, which
experiment-createcannot set (see the recipe inconfiguring-experiment-rollout). - Type — leave empty (will internally default to
"product". The"web"value is reserved for no-code experiments configured visually with the PostHog toolbar in a browser; it cannot be meaningfully driven via MCP. If a user asks for a no-code/toolbar experiment, point them to the PostHog UI instead of creating one here.)
If the user gives enough c
Preguntas frecuentes
¿Empezará la prueba de inmediato?
Primero crea el experimento como borrador, para que puedas revisar y ajustar los detalles antes de que se ejecute.
¿Qué me pregunta?
Solo pregunta cómo se asignan los usuarios a las variantes, porque los datos de tu proyecto no pueden decidir eso.
¿Cómo elige la métrica?
Revisa los eventos de tu proyecto para encontrar un objetivo y un evento candidato a métrica, y confirma que existen antes de usarlos.
Detalles
Descripción original del autor
Guides agents through experiment creation: reading the project's setup with experiment-setup-context, defining the hypothesis, configuring rollout and bucketing, setting up analytics and running time, and reporting which choices are guesses. Delegates rollout decisions to configuring-experiment-rollout and metric setup to configuring-experiment-analytics. TRIGGER when: user asks to create a new experiment or A/B test, OR when you are about to call experiment-create. DO NOT TRIGGER when: user is updating an existing experiment, managing lifecycle, or only browsing experiments.
repo: PostHog/posthog
Popularidad
- Estrellas en GitHub
- 41 mil
- Posición en el ranking
- #6877
- Licencia
- —
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
depot-ci
41 milAyuda a tu agente a configurar y ejecutar flujos de Depot CI, una alternativa a GitHub Actions, y a leer los registros de ejecución.
depot-container-builds
41 milAyuda a tu agente a crear imágenes de Docker en los constructores remotos de Depot, incluidas las multiplataforma, y a corregir fallos.
depot-github-runners
41 milAyuda a tu agente a pasar los trabajos de GitHub Actions a runners gestionados por Depot, elegir su tamaño y etiquetas y resolver problemas de configuración.
editing-agents-md
41 milAyuda a tu agente a decidir si una regla debe ir en un archivo AGENTS.md o CLAUDE.md, y a escribirla para que se cumpla sin sobrecargar el archivo.
Skills parecidas
gitcrawl
394 milPermite que tu agente busque en un archivo guardado de incidencias y pull requests de GitHub, agrupe duplicados y revise su estado actual en GitHub.
slacrawl
394 milPermite que tu agente busque y cuente mensajes en un archivo local de Slack, revise qué tan reciente es y lo actualice cuando haga falta.
goplaces
394 milAyuda a tu agente a buscar lugares, obtener sus detalles y reseñas, y resolver nombres de lugares usando Google Places, con salida JSON para scripts.