mcpField
Q
query-examples

query-examples

github.com/posthogData & databases7641 installsUpdated 1d ago
Repository

About query-examples

A reference skill for querying data in PostHog, aimed at people building analytics queries. It organizes schema guidance, HogQL references, and examples spanning product analytics, sessions, errors, logs, and LLM traces.

Key features

  1. 01PostHog data schema reference
  2. 02HogQL function guidance
  3. 03Analytics query examples
  4. 04Examples across product and session data
  5. 05Error, log, and LLM trace queries

Use cases

  1. 01Building user trend or funnel queries
  2. 02Analyzing retention and user paths
  3. 03Querying session recordings and logs
  4. 04Exploring LLM generations and traces

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/posthog/skills --skill query-examples

After installing, type/query-examplesin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
available-functions.md
example-error-tracking.md
example-event-taxonomy.md
example-funnel-breakdown.md
example-funnel-trends.md
example-lifecycle.md
example-llm-trace.md
example-llm-traces-list.md
example-logs.md
example-paths.md
example-person-property-taxonomy.md
example-retention.md
example-session-replay.md
example-sessions.md
example-stickiness.md
example-team-taxonomy.md
example-trends-breakdowns.md
example-trends-unique-users.md
example-web-overview.md
example-web-path-stats.md
example-web-traffic-by-device-type.md
example-web-traffic-channels.md
guidelines.md
hogql-extensions.md
models-actions.md
models-activity-logs.md
models-alerts.md
models-annotations.md
models-batch-exports.md
models-cohorts.md

Details

From the project README

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:

HogQL References

Analytics Query Examples

Use the examples below to create optimized analytical queries.

Comments

Markdown supported