query-examples▌
PostHog/skills · updated Apr 10, 2026
### PostHog HogQL Query Reference
- ›Access comprehensive schema documentation for core system models including cohorts, feature flags, error tracking, and data warehouse.
- ›Utilize a library of optimized analytical query templates for trends, funnels, retention, user paths, and LLM trace analysis.
- ›Reference HogQL-specific syntax, available functions, and extensions for advanced data manipulation and session replay analysis.
Querying data in PostHog
If the MCP server haven't provided instructions on querying data in PostHog, read the guidelines.
Data Schema
Schema reference for PostHog's core system models, organized by domain:
- Activity logs
- Actions
- Alerts
- Annotations
- Early Access Features
- Cohorts & Persons
- Dashboards, Tiles & Insights
- Data Warehouse
- Data Modeling Endpoints
- Error Tracking
- Flags & Experiments
- Hog Flows
- Hog Functions
- Notebooks
- Surveys
- SQL Variables
- Skipped events in the read-data-schema tool
- Dynamic person and event properties — patterns like
$survey_dismissed/{id},$feature/{key}that don't appear in tool results
HogQL References
- Sparkline, SemVer, Session replays, Actions, Translation, HTML tags and links, Text effects, and more
- SQL variables.
- Available functions in HogQL. IMPORTANT: the list is long, so read data using bash commands like grep.
Analytics Query Examples
Use the examples below to create optimized analytical queries.
- Trends (unique users, specific time range, single series)
- Trends (total count with multiple breakdowns)
- Funnel (two steps, aggregated by unique users, broken down by the person's role, sequential, 14-day conversion window)
- Conversion trends (funnel, two steps, aggregated by unique groups, 1-day conversion window)
- Retention (unique users, returned to perform an event in the next 12 weeks, recurring)
- User paths (pageviews, three steps, applied path cleaning and filters, maximum 50 paths)
- Lifecycle (unique users by pageviews)
- Stickiness (counted by pageviews from unique users, defined by at least one event for the interval, non-cumulative)
- LLM trace (generations, spans, embeddings, human feedback, captured AI metrics)
- Web path stats (paths, visitors, views, bounce rate)
- Web traffic channels (direct, organic search, etc)
- Web views by devices
- Web overview
- Error tracking (search for a value in an error and filtering by custom properties)
- Logs (filtering by severity and searching for a term)
- Sessions (listing sessions with duration, pageviews, and bounce rate)
- Session replay (listing recordings with activity filters)
- Team taxonomy (top events by count, paginated)
- Event taxonomy (properties of an event, with sample values)
- Person property taxonomy (sample values for person properties)
Ratings
4.5★★★★★45 reviews- ★★★★★Chinedu Perez· Dec 24, 2024
Solid pick for teams standardizing on skills: query-examples is focused, and the summary matches what you get after install.
- ★★★★★Chaitanya Patil· Dec 16, 2024
Registry listing for query-examples matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Valentina Shah· Dec 12, 2024
query-examples is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Ren Chawla· Dec 12, 2024
query-examples fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Ava Abebe· Dec 8, 2024
I recommend query-examples for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Ava Yang· Nov 27, 2024
Useful defaults in query-examples — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Rahul Santra· Nov 15, 2024
query-examples reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Arjun Park· Nov 15, 2024
Registry listing for query-examples matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Piyush G· Nov 7, 2024
Solid pick for teams standardizing on skills: query-examples is focused, and the summary matches what you get after install.
- ★★★★★Ren Malhotra· Nov 3, 2024
We added query-examples from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 45