adding-warehouse-perso…
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties…
Pick the right y-axis unit when creating or updating an insight via `posthog:insight-create` or `posthog:insight-update` — both TrendsQuery (`trendsFilter.aggregationAxisFormat`) and SQL insights (`DataVisualizationNode`, `chartSettings.yAxis[].settings.formatting`). Use when
$ npx -y skills add PostHog/ai-plugin --skill formatting-insight-axes --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/formatting-insight-axesContext preview
The summary Claude sees to decide when to auto-load this skill.
Pick the right y-axis unit when creating or updating an insight via `posthog:insight-create` or `posthog:insight-update` — both TrendsQuery (`trendsFilter.aggregationAxisFormat`) and SQL insights (`DataVisualizationNode`, `chartSettings.yAxis[].settings.formatting`). Use when
name: formatting-insight-axes description: > Pick the right y-axis unit when creating or updating an insight via `posthog:insight-create` or `posthog:insight-update` — both TrendsQuery (`trendsFilter.aggregationAxisFormat`) and SQL insights (`DataVisualizationNode`, `chartSettings.yAxis[].settings.formatting`). Use when the agent is about to add a `formula` purely to convert units (e.g. dividing seconds by 60 to display minutes), when a `math_property` or SQL column is a duration, currency, ratio, or large count, or whenever the user mentions "format the y-axis", "duration", "seconds", "minutes", "hours", "milliseconds", "ms", "percentage", "%%", "currency", "decimals", "axis label", or "axis unit" in the context of a graph insight.
PostHog renders insights with a built-in axis formatter. Use it instead of contorting the query or a literal prefix/postfix to fake units.
The two insight kinds configure it in different places:
`settings.formatting` (see [SQL insights](#sql-insights-datavisualizationnode))
If you are reaching for any of these, stop and pick a format below first:
These freeze the unit at one scale. The built-in formatter picks a friendly unit per value (1.5s, 2m 12s, 1h 4m) and keeps the underlying series numerically correct for further math, breakdowns, and alerts.
Set `trendsFilter.aggregationAxisFormat` on the TrendsQuery:
| Value | Use when the series is... | Renders as | | ------------------- | ---------------------------------------- | --------------------------- | | `numeric` (default) | a plain count | `1,234` | | `duration` | **seconds** (any scale) | `45s`, `2m 12s`, `1h 4m` | | `duration_ms` | **milliseconds** | `850ms`, `1.5s`, `1m 4s` | | `percentage` | already 0-100 | `47.3%` | | `percentage_scaled` | a ratio 0-1 | `47.3%` | | `currency` | money in the **project's base currency** | `$1,234.56` (or local code) | | `short` | large counts you want compacted | `1.2K`, `3.4M` |
Companion fields on `trendsFilter`:
pinned to a specific currency or unit, regardless of project settings
format can't express (e.g. `" req"`, `" events"`), never for `"mins"` / `"s"` / `"%"` — the percentage formats already append the `%` sign, so a `"%"` postfix renders `50%%`
`aggregationAxisFormat: "currency"` renders with the **project's base currency** (set in project settings, defaults to USD). Use it when the underlying values are in that same currency — e.g. revenue events that PostHog auto-converts to the project's base currency.
If the values are pinned to a specific currency regardless of project (e.g. `$ai_total_cost_usd` is always USD, even on a EUR-base project), use `aggregationAxisPrefix: "$"` + `decimalPlaces: 2` so the symbol matches the data. Using `format: "currency"` here would render USD values with `€` on a EUR project.
If the series is in seconds (latency, session length, time-to-first-event, processing time, page load, etc.), silently default to `aggregationAxisFormat: "duration"`. Do not stop to ask — the formatter is non-destructive (the underlying values stay in seconds either way, only the labels change), so picking it is always at least as good as raw seconds.
Only confirm with the user when they have **explicitly** named a fixed unit they want pinned ("show this in minutes", "graph the average in hours"):
> "I can pin the y-axis to minutes by dividing the series by 60, or use > PostHog's `duration` formatter which auto-picks seconds / minutes / hours > per value — `90s` renders as `1m 30s` and `5400s` as `1h 30m`. Which would > you prefer?"
In one-shot MCP contexts where no user is in the loop, just pick `duration` and move on.
{
"kind": "TrendsQuery",
"series": [
{
"kind": "EventsNode",
"event": "$pageview",
"math": "p95",
"math_property": "$performance_page_loaded"
}
],
"trendsFilter": {
"aggregationAxisFormat": "duration_ms"
}
}{
"kind": "TrendsQuery",
"series": [
{
"kind": "EventsNode",
"event": "$pageleave",
"math": "avg",
"math_property": "$session_duration"
}
],
"trendsFilter": {
"aggregationAxisFormat": "duration"
}
}{
"trendsFilter": {
"aggregationAxisFormat": "currency",
"decimalPlaces": 2
}
}{
"trendsFilter": {
"aggregationAxisPrefix": "$",
"decimalPlaces": 2
}
}{
"kind": "TrendsQuery",
"series": [
{
"kind": "EventsNode",
"event": "checkout_completed",
"math": "dau"
},
{
"kindOfficial PostHog plugin for AI clients. Access PostHog products directly from your AI coding tool.
Repo: PostHog/ai-plugin
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties…
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…
Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with…
Split a completed PostHog task run into activity records — what the agent tried, whether it worked, what blocked it — and record each one through the…
Assesses what a page's heatmap is telling you and recommends concrete changes. Pulls click / rageclick / scroll-depth data for a URL, names the hot elements by…
Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks "what endpoints can…