From posthog
Guides querying PostHog data via HogQL/SQL, covering system table schemas, functions, and entity discovery for analytics queries.
How this skill is triggered — by the user, by Claude, or both
Slash command
/posthog:querying-posthog-dataThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The [guidelines](./references/guidelines.md) contain the same instructions as `posthog:execute-sql`. If you've already read `posthog:execute-sql`, you don't need to read them again.
references/available-functions.mdreferences/example-error-tracking.mdreferences/example-event-taxonomy.mdreferences/example-funnel-breakdown.mdreferences/example-funnel-trends.mdreferences/example-lifecycle.mdreferences/example-llm-trace.mdreferences/example-llm-traces-list.mdreferences/example-logs.mdreferences/example-observability-correlation.mdreferences/example-paths.mdreferences/example-person-property-taxonomy.mdreferences/example-retention.mdreferences/example-session-replay.mdreferences/example-sessions.mdreferences/example-stickiness.mdreferences/example-team-taxonomy.mdreferences/example-trends-breakdowns.mdreferences/example-trends-unique-users.mdreferences/example-web-overview.mdThe guidelines contain the same instructions as posthog:execute-sql. If you've already read posthog:execute-sql, you don't need to read them again.
When the user wants to find a specific entity created in PostHog (insights, dashboards, cohorts, feature flags, experiments, surveys, hog flows, data warehouse items, etc.), or when a list/search tool returns too many results to narrow down:
posthog:execute-sql to query the system table and find the matching entity (typically returning its ID).posthog:insight-get, posthog:dashboard-get) to retrieve the full entity by ID.Don't try to reconstruct the entity from SQL — execute-sql is for discovery, the read tool is for retrieval.
When the user wants analytics data (trends, funnels, retention, paths, sessions, LLM traces, web analytics, errors, logs, etc.) and the existing insight schemas don't fit the request:
posthog:execute-sql. If no example fit, compose the query from scratch using the Data Schema and HogQL References.Schema reference for PostHog's core system models, organized by domain:
posthog.trace_spans)heatmaps data + system.heatmaps_saved)posthog.ai_events)logs data plane + saved views and alerts)$mcp_tool_call events)posthog.metrics)$survey_dismissed/{id}, $feature/{key} that don't appear in tool resultsperson.properties.* to understand if values are historical or current.Use the examples below to create optimized analytical queries.
npx claudepluginhub anthropics/claude-plugins-official --plugin posthogDesigns analytics systems, writes SQL queries, plans event tracking, and builds dashboards for product and user metrics. Triggers on SQL, analytics, dashboards, tracking, data pipelines, or user behavior analysis.
Optimizes PostHog performance via local feature flag evaluation, client batching, event sampling, efficient HogQL queries, and serverless flushing. For latency in high-volume apps.
Scans a PostHog project for cross-product correlations and emits findings into the Signals inbox. Useful for discovering issues across surfaces not covered by specialists.