querying-posthog-data

querying-posthog-data is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 184 tokens per session (2,783 once invoked), scanned A, original, MIT.

A set of instructions for finding PostHog entities and querying PostHog analytics data. PostHog is a product analytics platform that records how people use software.

In plain words
What is it for?
Finding insights, dashboards, cohorts, feature flags, experiments, surveys, and other PostHog records, or analysing trends, funnels, retention, paths, sessions, and errors.
Why use it?
It prevents incorrect queries and helps the agent choose the right data source and retrieval method.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Finding insights, dashboards, cohorts, feature flags, experiments, surveys, and other PostHog records, or analysing trends, funnels, retention, paths, sessions, and errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/querying-posthog-data
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PostHog/posthog-foss --skill querying-posthog-data
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for querying-posthog-data

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/querying-posthog-data/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/querying-posthog-data)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/querying-posthog-data"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/querying-posthog-data/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for querying-posthog-data

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/querying-posthog-data"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/querying-posthog-data.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 184 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,783 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00184 $0.02783
Opus 5.5 $0.00074 $0.01113
Sonnet 5.5 $0.00037 $0.00557
Haiku 4.5 $0.00018 $0.00278

Measured 2mo ago against content hash f99aa76b6cdf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

querying-posthog-data scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

products/posthog_ai/skills/querying-posthog-data/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Answering a headline business or telemetry measure (semantic layer)

When the user asks for a governed business or telemetry measure (MRR, activation rate, billable usage, active organizations, failure rates, ...), or asks how such a measure is defined ("what is our definition of an active org?"), check the data catalog's semantic layer before deriving it from raw data or calling a typed domain tool — the project may have a canonical, human-approved definition to reuse instead of guessing.

Read the full file on GitHub · 126 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +2 lines f99aa76b6cdf
  2. 2mo ago Changed · +1 lines b96fae685235
  3. 2mo ago Changed f704ae5a0909
  4. 2mo ago First seen · 123 lines · 184 tokens per session scan A e350ec5033a5

Subscribe to this mod's changes

querying-posthog-data is a skill published in the GitHub repository PostHog/posthog-foss (734 stars, last pushed today), licensed MIT. It adds 184 tokens to every session and 2,783 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

querying-posthog-data compared with skills from other repositories

querying-posthog-data next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
querying-posthog-dataPostHog/posthog-fossSkill734todayMITA184Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill395ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill331k2d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15ktodayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code