跳到正文
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(原文)

安装前可以查看交给 AI 代理的指令内容。

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.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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 的全部技能

报告此技能的问题