Skip to main content
skill CX Codex

filtering-bot-traffic — Claude Code skill: what it does

filtering-bot-traffic splits human traffic from bots and AI crawlers in PostHog. Use it to clean a metric or to see how much of the traffic runs on autopilot.

no license 208 installs ★ 101 updated 2026-10-24

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

What filtering-bot-traffic does

The skill hands the agent a classification map for PostHog traffic. Requests get sorted by user agent into four buckets: Regular, AI Agent, Bot, Automation. From there the agent either drops the noisy part from an insight or measures how much came from crawlers and which company runs them.

Inside the insight builder and filters you get virtual properties: $virt_is_bot, $virt_traffic_type, $virt_traffic_category, $virt_bot_name, $virt_bot_operator. They read the user agent on their own. In hand-written SQL the same answers come from isLikelyBot, getTrafficType, getBotType and the rest.

One thing breaks quietly in HogQL: the argument has to be the plain properties.$raw_user_agent. Wrap it in coalesce(...) and events from server and mobile SDKs lose their exemption for an empty user agent, so bot counts inflate. Filtering changes the numbers in a query only; stored events stay untouched. Real-time questions and the Live tab tiles belong to the exploring-live-traffic skill.

What it helps with

  • drop bots from pageview and session counts
  • measure the share of traffic coming from AI crawlers
  • list which crawlers and operators reach the site
  • split a trend by traffic type
  • build a dashboard with human visitors only

Example prompts for the agent

  • Filter crawlers out of the signup funnel: keep only events where $virt_is_bot is false.
  • What share of last month's traffic was AI agents? Break it down by $virt_bot_name.
  • Which bot operators hit our docs most often?

How to install filtering-bot-traffic

1Skills CLI (Vercel)

npx skills add PostHog/ai-plugin --skill filtering-bot-traffic -a claude-code

2Manually: put the files in place

~/.claude/skills/filtering-bot-traffic/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/filtering-bot-traffic/

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

Questions about filtering-bot-traffic

How do I install filtering-bot-traffic in Claude Code?

Run npx skills add PostHog/ai-plugin --skill filtering-bot-traffic -a claude-code. The skill lands in ~/.claude/skills/filtering-bot-traffic/SKILL.md.

What does filtering-bot-traffic do?

It tells the agent how to use PostHog virtual properties and HogQL functions to exclude bots from an insight or to size up automated traffic and who sends it.

Does it cover real-time numbers?

No. This one is for historical windows, saved insights, dashboards and filters. Questions about the last few minutes and the Live tab tiles go to exploring-live-traffic.

Similar skills

All skills for Data and databases →

From the same set82

The whole set →
authoring-error-tracking-alerts authoring-error-tracking-alerts guides your agent in configuring PostHog error tracking notifications, selecting lifecycle triggers, and connecting them to Slack or webhooks. CX Codex +1 209installs building-a-dashboard building-a-dashboard — a skill for Claude Code, Codex, and Cursor that builds and updates PostHog dashboards via MCP tools. Coordinates insight reuse and grid layout. CX Codex +1 208installs investigating-metric-anomalies investigating-metric-anomalies turns a PostHog Metrics symptom (rising lag, error spike, falling throughput) into a probable cause backed by logs and traces. CX Codex +1 206installs choosing-trend-or-slope-view choosing-trend-or-slope-view — a skill that settles what “change over time” means before a chart gets built: the full trend interval by interval, or only the gap between the two ends. CX Codex +1 204installs auditing-warehouse-source-health auditing-warehouse-source-health audits PostHog data warehouse sources and syncs to pinpoint broken connectors, failed schemas, and degraded webhooks. CX Codex +1 204installs signals-scout-product-analytics signals-scout-product-analytics — a skill for Claude Code and Codex monitoring core product analytics flows in PostHog. Detects derived-rate regressions across funnels and retention while entrant volume holds steady. CX Codex +1 204installs auditing-warehouse-view-health auditing-warehouse-view-health runs a project-wide check on PostHog materialized views: lists the ones that failed to refresh and points at materialized views nobody queries. CX Codex +1 204installs building-workflows building-workflows is a Claude Code skill for building, patching, and testing PostHog automation graphs over MCP before publishing them in the visual editor. CX Codex +1 204installs

Project sponsors

Companies that keep this analytics open