PostHog FOSS is a read-only mirror of PostHog, with all proprietary code removed. NOTE: This repo is synced automatically from the main PostHog repo. Please raise any issues and PRs there.
Use when adding timers (setInterval, setTimeout), event listeners (window.addEventListener, document.addEventListener, MediaQueryList.addEventListener), or any other resource that needs cleanup inside a kea logic. Every logic has cache.disposables.add(setup, key?, options?) and cache.disposables.dispose(key) available…
Use when adding a bucket-like rate limit backed by Redis: a per-caller budget with burst capacity and continuous refill, a refund path for requests that did no work, or a limit whose Retry-After must be a real wait rather than a window edge. posthog/tokenbucket.py provides an atomic Lua token bucket (consume, refund…
Helps PostHog engineers and agents pick the right chart when a request is about visualizing change over time, before/after comparisons, or period-over-period movement while building UI with @posthog/quill-charts (dashboards, reports, the mcpanalytics frontend, custom visualizations). Use when a user asks how something…
Add support for a new vendor API version to an existing Data warehouse import source, or deprecate an old one. Use when a vendor ships a new API version (Stripe date versions, Shopify quarterly versions, header-pinned revisions, /vN/ URL bumps), when implementing a version-update or deprecation task for a source under…
Guide for writing performant ClickHouse queries in PostHog product code. Use when writing HogQL query runners, adding or reviewing a ClickHouse call site (syncexecute, executehogqlquery, a QueryRunner) and choosing its Workload (ONLINE, OFFLINE, LOGS, ENDPOINTS), designing a ClickHouse table for a new product, adding…
Gates whether a code comment should exist and forces the ones that stay to explain why, not what. Use ALWAYS before writing or editing a comment in any language (Python, TypeScript, Go, Rust, SQL), and when reviewing a diff that adds comments. Removes the comment types that clutter the codebase: narration that…
House rules for Python dataclasses in PostHog: when to reach for one instead of a tuple or dict[str, Any], which decorator to use (@frozen from posthog.dataclasses), how to name, construct, consume and evolve them, how to keep secrets out of repr, and when a function should accept a dataclass instead of its unpacked…
Teaches how to write and run evals on the products/posthogai/evalharness/ harness — sandboxed agent suites that execute the real coding agent in a Docker or Modal sandbox against a seeded Hedgebox project, and one-shot suites that score a single in-process model invocation per case. Use when adding or changing eval…
Guide for writing or reviewing PostHog kea logic files (Logic.ts / Logic.tsx). Use when creating a new logic, adding actions/reducers/selectors/listeners/loaders/forms/router bindings, choosing between reducer vs selector vs cache, deciding between listeners and kea-subscriptions, wiring React with…
Shapes a PR body so a reviewer can understand the problem and change quickly. Use ALWAYS before writing or editing a PR description, before gh pr create or gh pr edit --body, or when asked to improve a description. States who is affected and what is wrong for them in Problem, taken from a source and never invented…
Guide for writing PostHog agent skills — job-to-be-done templates that teach agents how to use MCP tools to achieve a goal. Use when adding new product functionality that agents should know how to work with, creating a new skill, or updating existing skills in products//skills/ or .agents/skills/.
Gates whether a new test should exist and keeps it cheap and honest, protecting CI from tests that guard nothing. Use before any change to what a pytest, Jest, or Playwright test asserts or sets up, down to one fixture or one assertion added to an existing block. Carries the value bar (every test catches a realistic…
Structure and abstraction rules for PostHog UI code — any React component or frontend file under frontend/src/ or products//frontend/. Use ALWAYS before creating, moving, splitting, or restructuring a component or frontend file, extracting a shared/generic component, promoting a component to lib/, renaming a frontend…
Sets the voice and word choices for any text a person reads in PostHog: UI labels, buttons, tooltips, empty and error states, notifications, in-app messages, onboarding, docs, and support replies. Use ALWAYS before writing or editing user-facing copy, and whenever a code change adds or changes a string a user will…
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.
★not rated 736▲
+4
changed 3d agoASkillSpector: pass57 tokens
originalMIT
Author continuously-running online evaluations in PostHog AI observability, grounded in real failure modes you've identified. Use when the user wants evaluations that automatically score new generations or whole traces going forward — "create an eval to catch X", "continuously check that responses do Y", "turn these…
★not rated 736▲
+4
changed 3d agoASkillSpector: warn203 tokens
originalMIT
Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces. Use when someone wants to understand what's going wrong with an AI feature, find and categorize failure modes, triage errors, or investigate quality issues (wrong answers, ignored instructions…
★not rated 736▲
+4
changed 3d agoASkillSpector: pass154 tokens
originalMIT
Investigate AI observability clusters — understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into individual traces within clusters.
Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions. Use when the user asks "how much are we spending on LLMs?", "which model / user / feature is most expensive?", "why did cost spike?", wants to build a…
★not rated 736▲
+4
changed 3d agoASkillSpector: pass102 tokens
originalMIT
Investigate AI observability evaluations — hog (deterministic code-based), llmjudge (LLM-prompt-based), and sentiment (user-message sentiment). Find existing evaluations, inspect their configuration, run them against specific generations, query individual results, and set up scheduled reports on an evaluation. Use…
★not rated 736▲
+4
changed 3d agoASkillSpector: warn124 tokens
originalMIT
Debug and inspect LLM/AI agent traces using PostHog's MCP tools. Use when the user pastes a trace or session URL (e.g. /ai-observability/traces/ or /ai-observability/sessions/ ), asks to debug a trace, figure out what went wrong, check if an agent used a tool correctly, verify context/files were surfaced, inspect…
★not rated 736▲
+4
changed 3d agoASkillSpector: warn146 tokens
originalMIT
Set up an LLM-judge evaluation that extracts canonical use cases for a PostHog feature at scale and streams the results to a Slack channel as a live feed. Use when someone wants to understand how users are actually using a specific AI/LLM-powered feature in production — what they're investigating, what questions…
★not rated 736▲
+4
changed 3d agoASkillSpector: warn123 tokens
originalMIT
Export PostHog events, persons, sessions, or the results of a HogQL query on demand and download the resulting files. Use when the user asks to download/export raw PostHog data, export HogQL query results, create a one-off file export, fetch a Parquet or JSONLines export, or use the filedownloadbatchexports API.…
★not rated 736▲
+4
changed 3d agoASkillSpector: pass97 tokens
originalMIT
Explains PostHog billing usage and spend from the customer's visible Billing MCP tools. Use when the user asks why usage or spend is high, which product or project is driving usage, what a usage type means, how to reduce usage, what changed over time, why they got a usage change alert, or whether a spike/drop alert…
At most 3 mods per repository are shown here, and a mod shipped inside a plugin is left to that plugin's page — the rest are on their repository pages: