本文へ移動
cccskills
無料GitHub で公開

querying-posthog-data

Required reading before writing any HogQL/SQL or calling execute-sql against PostHog. Use whenever the user wants to search, find, or do complex aggregations PostHog entities (insights, dashboards, cohorts, feature flags, experiments, surveys, hog flows, data warehouse, persons, etc.) and query analytics data (trends, funnels, retention, lifecycle, paths, stickiness, web analytics, error tracking, logs, sessions, LLM traces). Covers HogQL syntax differences from ClickHouse SQL, system table schemas (system.*), available functions, query examples, and the schema-discovery workflow.

インストール方法を見る

含まれるファイル(57)

  • SKILL.md7.3 KB
  • references/available-functions.md11.6 KB
  • references/example-error-tracking.md2.8 KB
  • references/example-event-taxonomy.md1.8 KB
  • references/example-funnel-breakdown.md2.9 KB
  • references/example-funnel-trends.md2.2 KB
  • references/example-lifecycle.md3.8 KB
  • references/example-llm-trace.md3.3 KB
  • references/example-llm-traces-list.md3.8 KB
  • references/example-logs.md1.2 KB
  • references/example-observability-correlation.md4.8 KB
  • references/example-paths.md4.7 KB
  • references/example-person-property-taxonomy.md630 B
  • references/example-retention.md2.6 KB
  • references/example-session-replay.md1.9 KB
  • references/example-sessions.md468 B
  • references/example-stickiness.md1.8 KB
  • references/example-team-taxonomy.md521 B
  • references/example-trends-breakdowns.md4.4 KB
  • references/example-trends-unique-users.md1.3 KB
  • references/example-web-overview.md1.4 KB
  • references/example-web-path-stats.md3.2 KB
  • references/example-web-traffic-by-device-type.md1.2 KB
  • references/example-web-traffic-channels.md1.4 KB
  • references/guidelines.md15.0 KB
  • references/hogql-extensions.md5.7 KB
  • references/models-actions.md2.8 KB
  • references/models-activity-logs.md2.7 KB
  • references/models-ai-observability-events.md3.3 KB
  • references/models-ai-observability-reviews.md7.5 KB
  • references/models-alerts.md2.1 KB
  • references/models-annotations.md2.1 KB
  • references/models-apm-spans.md8.3 KB
  • references/models-batch-exports.md4.8 KB
  • references/models-cohorts.md5.6 KB
  • references/models-dashboards-insights.md3.2 KB
  • references/models-data-warehouse.md8.2 KB
  • references/models-early-access-features.md2.4 KB
  • references/models-endpoints.md2.7 KB
  • references/models-error-tracking.md5.0 KB
  • references/models-flags-experiments.md3.6 KB
  • references/models-heatmaps.md3.0 KB
  • references/models-hog-flows.md1.9 KB
  • references/models-hog-functions.md2.7 KB
  • references/models-integrations.md2.5 KB
  • references/models-logs.md14.4 KB
  • references/models-metrics.md10.2 KB
  • references/models-notebooks.md2.8 KB
  • references/models-session-recording-playlists.md2.0 KB
  • references/models-session-recordings.md2.3 KB
  • references/models-support-tickets.md2.5 KB
  • references/models-surveys.md2.8 KB
  • references/models-usage-metrics.md3.1 KB
  • references/models-variables.md2.7 KB
  • references/person-property-modes.md2.4 KB
  • references/taxonomy-dynamic-properties.md2.8 KB
  • references/taxonomy-skipped-events.md1.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Querying data in PostHog

The 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 to use this skill

Finding a specific PostHog entity

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:

  1. Read the appropriate schema reference under Data Schema to understand the entity's table and columns.
  2. Use posthog:execute-sql to query the system table and find the matching entity (typically returning its ID).
  3. Use the dedicated read tool for that entity type (e.g. 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.

Querying analytics data

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:

  1. Look for a matching example under Analytics Query Examples. The list is not exhaustive — there may not be an example for every scenario. If one is a close fit (same domain, similar aggregation), read it; otherwise skip this step.
  2. Adapt the example query (if one was found) to the user's request and run it via posthog:execute-sql. If no example fit, compose the query from scratch using the Data Schema and HogQL References.

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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use Cursor's browser aria snapshots to audit a page for accessibility issues — missing labels, broken tab order, contrast, and ARIA misuse.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

Add PostHog analytics to a web application, including event tracking, page views, feature flags, and session replay.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

Generate OpenAPI/Swagger documentation for an API, including endpoint schemas, request/response types, and interactive docs UI.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

Add authentication to a web application using NextAuth.js (Auth.js), including OAuth providers, session management, and protected routes.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

Dockerize an application with a production-ready Dockerfile, docker-compose setup, and .dockerignore.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

Set up Playwright end-to-end testing in a project, including test configuration, example tests, and CI integration.

日本語の概要は準備中です。原文の説明を表示しています。

0xAidan/polymarket-bot-test42026年9月4日 更新

0xAidan のスキルをすべて見る

このスキルの問題を報告する