querying-posthog-data
Originally fromposthog/ai-plugin
Installation
SKILL.md
Querying data in PostHog
The guidelines explain SQL syntax and schema discovery. Read them when you choose posthog:execute-sql. You do not need them for typed queries.
Choose the query path
Choose the method from the requested calculation and output. Do not choose a method from the tool name. No method fits all tasks.
For governed measures, follow the semantic-layer workflow below before deriving a query. Reuse a matching approved metric or saved query when it defines the requested measure.
Typed query tools
Use a typed query when the task needs standard PostHog calculation rules or native insight controls: