filtering-bot-traffic
O que ela faz
Esta skill ensina um agente a identificar bots, rastreadores e agentes de IA nos dados do PostHog e removê-los dos seus números. É para donos de site que querem análises que mostrem visitantes humanos.
Quando usar
- ✓Quando você quer remover bots das suas visualizações de página ou de outros relatórios.
- ✓Quando você quer saber quanto do seu tráfego vem de bots ou rastreadores de IA.
- ✓Quando você quer saber se uma ferramenta de IA específica está visitando seu site.
Link da skill
https://github.com/PostHog/posthog/blob/master/products/web_analytics/skills/filtering-bot-traffic/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Quanto do tráfego do meu site é de bots? Mostre meus números com os bots removidos.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O PostHog classifica cada requisição pelo seu user agent. O agente usa essas classificações em consultas ou no construtor de insights para incluir ou excluir o tráfego de bots nos relatórios históricos.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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 |
Perguntas frequentes
Esta skill cobre o tráfego de bots ao vivo?
Não. Perguntas sobre bots ao vivo vão para uma skill separada de tráfego ao vivo, enquanto esta é para relatórios históricos.
Ela consegue dizer quais bots visitam meu site?
Sim. Ela pode separar o tráfego por nome de bot e operador, para você ver quais rastreadores são responsáveis.
Posso usar isso em insights e dashboards salvos?
Sim. Funciona em intervalos de tempo históricos, insights salvos, dashboards e filtros.
Detalhes
Descrição original do 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
Popularidade
- Estrelas no GitHub
- 41 mil
- Posição no ranking
- #6975
- Licença
- —
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
depot-ci
41 milAjuda seu agente a configurar e executar fluxos de trabalho do Depot CI, uma alternativa ao GitHub Actions, incluindo a migração de fluxos existentes e a leitura dos logs de execução.
depot-container-builds
41 milAjuda seu agente a criar imagens Docker nos builders remotos do Depot, incluindo imagens multiplataforma, envio para registros e correção de falhas de build.
depot-github-runners
41 milAjuda seu agente a levar tarefas do GitHub Actions para runners gerenciados pelo Depot, escolhendo os tamanhos e os rótulos dos runners e resolvendo problemas de configuração.
editing-agents-md
41 milAjuda seu agente a decidir se uma regra deve ficar em um arquivo AGENTS.md ou CLAUDE.md, e a escrevê-la de forma que seja seguida sem deixar o arquivo inchado.
Skills parecidas
gitcrawl
394 milPermite que seu agente pesquise um arquivo salvo de issues e pull requests do GitHub, agrupe os duplicados e verifique o status atual deles no GitHub.
slacrawl
394 milPermite que seu agente pesquise e conte mensagens em um arquivo local do Slack, verifique quão atualizado ele está e o atualize quando necessário.
goplaces
394 milAjuda seu agente a buscar lugares, obter detalhes e avaliações e identificar nomes de lugares usando o Google Places, com saída em JSON para scripts.