posthog/tools-and-features-hogql
HogQL queries for PostHog analytics
npx skills add https://github.com/PostHog/skills --skill tools-and-features-hogql
This skill helps you write HogQL queries for PostHog analytics. HogQL is PostHog's SQL dialect, a wrapper around ClickHouse SQL with simplified property access and PostHog-specific functions.
references/expressions.md - Sql expressions - docsreferences/aggregations.md - Supported aggregations - docsreferences/clickhouse-functions.md - Supported clickhouse functions - docsreferences/data-access.md - Accessing data using sql - docsreferences/variables.md - Sql variables - docsreferences/useful-functions.md - Useful sql functions - docsreferences/posthog.md - PostHog table schemas (events, persons, groups, sessions)references/sessions.md - Sessions - docsConsult the documentation for SQL syntax, available functions, and query patterns.
properties.$property_name for event properties and person.properties.$property_name for person properties{filters} in queries to allow UI-based filtering in PostHog dashboardscount(), uniq(), avg(), sum()SELECT event, count()
FROM events
WHERE {filters}
GROUP BY event
ORDER BY count() DESC
SELECT properties.$browser AS browser, count()
FROM events
WHERE event = '$pageview' AND {filters}
GROUP BY browser
SELECT person.properties.email, count()
FROM events
WHERE {filters}
GROUP BY person.properties.email
Take posthog/tools-and-features-hogql from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.