Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
posthog avatar

Query Examples

  • 43 installs
  • 70 repo stars
  • Updated August 4, 2026
  • posthog/ai-plugin

query-examples is a Claude Code skill for ai & agent building.

About

query-examples is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • query-examples
  • AI & Agent Building
  • AI-coding skill

Query Examples by the numbers

  • 43 all-time installs (skills.sh)
  • Ranked #7,921 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/posthog/ai-plugin --skill query-examples

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs43
repo stars70
Last updatedAugust 4, 2026
Repositoryposthog/ai-plugin

How do I helps with ai & agent building tasks during AI-assisted development.?

Helps with ai & agent building tasks during AI-assisted development.

Who is it for?

Best when you're working on ai & agent building and need structured help with query examples.

Skip if: Teams with no ai & agent building needs, or anyone wanting a generic chat assistant without this specific workflow.

When should I use this skill?

When you need to helps with ai & agent building tasks during AI-assisted development., or when query-examples is a claude code skill for ai & agent building.

What you get

Structured output aligned to query-examples: query-examples, AI & Agent Building.

Files

SKILL.mdMarkdownGitHub ↗

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
  • Batch exports
  • Early Access Features
  • Cohorts & Persons
  • Dashboards, Tiles & Insights
  • Data Warehouse
  • Data Modeling Endpoints
  • Error Tracking
  • Flags & Experiments
  • Hog Flows
  • Hog Functions
  • Integrations
  • Logs
  • Notebooks
  • Session Recording Playlists
  • Session Recordings
  • Support Tickets
  • 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

  • Person property modes (event-time vs query-time). Read when working with person.properties.* to understand if values are historical or current.
  • 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)
  • LLM traces list (searching and listing traces with property filters, two-phase query)
  • 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)

Related skills

FAQ

What does query-examples do?

query-examples is a Claude Code skill for ai & agent building.

When should I use query-examples?

When you need to helps with ai & agent building tasks during AI-assisted development., or when query-examples is a claude code skill for ai & agent building.

What are the main capabilities?

query-examples; AI & Agent Building; AI-coding skill.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.