Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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,
.claude/skills/kunanonj-cursor-plugin-posthog-querying-posthog-data/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-18 | ✗→✓ | ▲ Improved | 86% | 0% |
| case-06 | ✓→✗ | ▼ Worse | 33% | 0% |
| case-07 | ✓→✗ | ▼ Worse | -40% | 0% |
| case-08 | ✓→✗ | ▼ Worse | -38% | 0% |
| case-09 | ✓→✗ | ▼ Worse | -25% | 0% |
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 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:
posthog:execute-sql to query the system table and find the matching entity (typically returning its ID).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.
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:
posthog:execute-sql. If no example fit, compose the query from scratch using the Data Schema and HogQL References.Schema reference for PostHog's core system models, organized by domain:
posthog.trace_spans)heatmaps data + system.heatmaps_saved)posthog.ai_events)logs data plane + saved views and alerts)posthog.metrics)$survey_dismissed/{id}, $feature/{key} that don't appear in tool resultsperson.properties.* to understand if values are historical or current.Use the examples below to create optimized analytical queries.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 7,532 | 7,664 | +2% | 1 | 1 | 0% | 1,299 | 2,217 | +71% | 0 | 0 | — |
case-02 | fail→fail | 7,856 | 17,580 | +124% | 1 | 1 | 0% | 1,463 | 3,310 | +126% | 0 | 0 | — |
case-03 | fail→fail | 6,488 | 12,660 | +95% | 1 | 1 | 0% | 1,001 | 2,754 | +175% | 0 | 0 | — |
case-04 | fail→fail | 5,834 | 10,711 | +84% | 1 | 1 | 0% | 342 | 2,270 | +564% | 0 | 0 | — |
case-05 | fail→fail | 5,348 | 7,210 | +35% | 1 | 1 | 0% | 782 | 2,022 | +159% | 0 | 0 | — |
case-06 | pass→fail | 8,499 | 56,457 | +564% | 1 | 1 | 0% | 1,599 | 2,133 | +33% | 0 | 0 | — |
case-07 | pass→fail | 28,472 | 10,726 | -62% | 1 | 1 | 0% | 3,711 | 2,239 | -40% | 0 | 0 | — |
case-08 | pass→fail | 16,012 | 3,642 | -77% | 1 | 1 | 0% | 3,066 | 1,907 | -38% | 0 | 0 | — |
case-09 | pass→fail | 17,535 | 11,134 | -37% | 1 | 1 | 0% | 3,255 | 2,442 | -25% | 0 | 0 | — |
case-10 | pass→fail | 13,443 | 7,954 | -41% | 1 | 1 | 0% | 2,527 | 2,168 | -14% | 0 | 0 | — |
case-11 | fail→fail | 12,491 | 9,724 | -22% | 1 | 1 | 0% | 2,041 | 2,339 | +15% | 0 | 0 | — |
case-12 | pass→fail | 4,643 | 15,586 | +236% | 1 | 1 | 0% | 765 | 3,044 | +298% | 0 | 0 | — |
case-13 | pass→fail | 4,720 | 7,738 | +64% | 1 | 1 | 0% | 807 | 2,190 | +171% | 0 | 0 | — |
case-14 | pass→pass | 13,632 | 20,718 | +52% | 1 | 1 | 0% | 2,490 | 4,557 | +83% | 0 | 0 | — |
case-15 | pass→fail | 10,007 | 9,985 | -0% | 1 | 1 | 0% | 1,838 | 2,284 | +24% | 0 | 0 | — |
case-16 | fail→fail | 6,574 | 6,280 | -4% | 1 | 1 | 0% | 1,048 | 1,987 | +90% | 0 | 0 | — |
case-17 | fail→fail | 12,099 | 9,877 | -18% | 1 | 1 | 0% | 2,069 | 2,537 | +23% | 0 | 0 | — |
case-18 | fail→pass | 9,826 | 7,921 | -19% | 1 | 1 | 0% | 1,661 | 3,095 | +86% | 0 | 0 | — |
case-19 | fail→fail | 6,808 | 8,419 | +24% | 1 | 1 | 0% | 1,202 | 3,267 | +172% | 0 | 0 | — |
case-20 | pass→fail | 8,849 | 20,768 | +135% | 1 | 1 | 0% | 1,706 | 2,882 | +69% | 0 | 0 | — |
case-21 | pass→fail | 6,130 | 8,256 | +35% | 1 | 1 | 0% | 1,002 | 2,426 | +142% | 0 | 0 | — |
case-22 | pass→fail | 50,176 | 7,496 | -85% | 1 | 1 | 0% | 313 | 2,079 | +564% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 3 counted toward the lift figure. The other 19 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of -45 percentage points is the difference between those two pass rates over the 3 comparable cases. 12 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.