filtering-bot-traffic
Qué hace
Esta skill enseña a un agente a identificar bots, rastreadores y agentes de IA en los datos de PostHog y a quitarlos de tus cifras. Está pensada para dueños de sitios web que quieren analíticas que muestren visitantes humanos.
Cuándo usarla
- ✓Cuando quieres quitar los bots de tus vistas de página u otros informes.
- ✓Cuando quieres saber qué parte de tu tráfico viene de bots o rastreadores de IA.
- ✓Cuando quieres saber si una herramienta de IA concreta visita tu sitio.
Link de la skill
https://github.com/PostHog/posthog/blob/master/products/web_analytics/skills/filtering-bot-traffic/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
“¿Qué porcentaje de mi tráfico web son bots? Por favor, muéstrame mis cifras sin bots.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
PostHog clasifica cada petición según su user agent. El agente usa esas clasificaciones en consultas o en el constructor de insights para incluir o excluir el tráfico de bots en los informes históricos.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Filtering and measuring bot traffic
PostHog classifies every request by user agent so you can tell humans apart from bots, crawlers, and AI agents anywhere HogQL runs — the SQL editor, insights, trends, and Web analytics breakdowns. This skill teaches you (the agent) how to use that classification to:
- exclude bots so analytics reflect human traffic only
- measure how much traffic is automated, and which bots / operators are responsible
- separate AI-agent traffic (worth measuring) from noise (worth dropping)
- pick the right surface — virtual properties for the insight builder, functions for raw SQL
For real-time ("right now", last 30 min) bot questions and the Live tab tiles, use the exploring-live-traffic skill instead. This skill is for historical windows, saved insights, dashboards, and filtering.
When to use this skill
Use it when the user wants to:
- exclude or filter out bots ("remove bots from my pageviews", "humans only")
- quantify automated traffic ("what % of traffic is bots?", "how much is AI crawlers?")
- find which bots hit them ("which crawlers visit us?", "is ChatGPT reading our docs?")
- break a trend down by traffic type or bot name
- measure AI-agent / AI-search traffic specifically (AEO / answer-engine visibility)
Do not use it for the Live tab, real-time numbers, or the per-minute bot charts — that is exploring-live-traffic.
The classification surface
Two equivalent ways to reach the same classification. Prefer virtual properties in the insight builder and filters; use functions in hand-written SQL or when you need a value the virtual properties don't expose.
Virtual properties (insight builder, filters, breakdowns)
These read the user agent for you (falling back from $raw_user_agent to $user_agent),
so you don't pass anything in. Available wherever you pick an event property.
| Property | Value |
|---|---|
$virt_is_bot |
boolean — true for bots / crawlers / automation |
$virt_traffic_type |
Regular, AI Agent, Bot, or Automation |
$virt_traffic_category |
finer category, e.g. ai_crawler, ai_search, ai_assistant, search_crawler, seo_crawler, social_crawler, monitoring, http_client, headless_browser, no_user_agent, regular |
$virt_bot_name |
display name, e.g. Googlebot, GPTBot, ClaudeBot |
$virt_bot_operator |
company behind the bot, e.g. Google, OpenAI, Anthropic |
HogQL functions (raw SQL)
Pass properties.$raw_user_agent (and optionally properties.$ip) as is, the same arguments the
virtual properties use. Don't wrap it, e.g. in coalesce(...): server and mobile SDK events (and
cookieless events) are exempt from the empty-UA rule only when the argument is that plain field.
| Function | Returns |
|---|---|
isLikelyBot(ua) |
true on a bot pattern or empty UA (server/mobile SDK events exempt) |
getTrafficType(ua) |
AI Agent / Bot / Automation / Regular |
getTrafficCategory(ua) |
subcategory; regular for humans |
getBotType(ua) |
same subcategory but empty string for humans — handy for filtering |
getBotName(ua) |
bot name; empty for humans |
getBotOperator(ua) |
operator |
Preguntas frecuentes
¿Esta skill cubre el tráfico de bots en directo?
No. Las preguntas sobre bots en directo van a una skill distinta de tráfico en vivo, mientras que esta es para informes históricos.
¿Puede decir qué bots visitan mi sitio?
Sí. Puede desglosar el tráfico por nombre de bot y operador, para que veas qué rastreadores son responsables.
¿Puedo usarla en insights guardados y dashboards?
Sí. Funciona en rangos de tiempo históricos, insights guardados, dashboards y filtros.
Detalles
Descripción original del autor
Identify, measure, and exclude bot / crawler / AI-agent traffic in PostHog web and product analytics using the traffic classification surface (the isLikelyBot / getTrafficType HogQL functions and the $virt_* virtual properties). Use when the user asks to "exclude bots", "filter out crawlers", "remove bot traffic from my numbers", "how much of my traffic is bots / AI crawlers", "is GPTBot / ChatGPT / Claude hitting my site", "break down traffic by human vs bot", or wants clean human-only counts in an insight or dashboard. For the real-time Live tab bot tiles, use exploring-live-traffic instead.
repo: PostHog/posthog
Popularidad
- Estrellas en GitHub
- 41 mil
- Posición en el ranking
- #6975
- 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.