Decides whether a 'how did X change' question needs a full trend line or a start-versus-end slope view, then builds the same underlying query and renders whichever chart actually answers it.
WHEN TO USE
SCOPE
USE FOR
Ask whether someone wants the whole trend line or just the before-and-after change.
Compare where several metrics started versus where they ended without the noise between.
Show week-over-week or month-over-month movement as a clean slope chart.
Overlay this period against last period on the same line chart instead of a slope.
NOT FOR
Choosing a saved insight's chart display type directly in the insight editor UI.
This is a saved copy of the skill's SKILL.md instructions. It may differ from the upstream file or the version you install.
Choosing a trend line vs a slope view
"How did X change between A and B?" is ambiguous. Two charts answer two different
questions, so clarify before you build unless the user already named one:
Change over time (line) — the value at every interval across the range.
Shows the path: dips, spikes, when it moved. This is the default trend.
Start vs end (slope) — only the first and last point, one line per series
connecting them. Shows the net change and, across many series, which rose,
which fell, and any rank flips — without the noise of the path between.
When the request could be either, ask a short either/or, e.g.:
Do you want to see how it moved across the whole period (a line chart), or just
the change from the start to the end (a slope chart)?
If the user clearly wants one — "just tell me how much it grew start to end" → slope;
"show me the trend / when did it spike" → line — skip the question and build it.
How to render each
Both come from the sameTrendsQuery over the same date range — the slope is
that series collapsed to its first and last point, not a different query.
Change over time → line
Default trends behavior. Create or run a TrendsQuery and leave
trendsFilter.display as ActionsLineGraph (the default, "change over time"):
Run the trend with posthog:query-trends. The result card Max renders has a
Line / Bar / Slope view toggle — switch it to Slope to show each series as
a single line from its first to its last point, with the per-series change in the
legend. Tell the user they can flip to the Slope view on the result.
The slope view is best for a clean before→after comparison, especially with several
series/categories whose relative movement matters. Pick a date range whose two ends
are the points you want compared (the slope uses the first and last interval).
Important limits
Two surfaces, one computation. Both the inline slope (Max's query-trends
result card) and the saved-insight slope (ChartDisplayType.SlopeGraph) show the
same thing: the first interval's value vs the last interval's value, at the chosen
group-by interval. The grouping defines the slope - group by month to compare the
first vs last month, by day for the first vs last day. Use the inline view for a
quick before-and-after on a result you're already looking at; use the saved display
to persist it on a dashboard. A still-accumulating final period is shown as-is with
a dashed connector, the same affordance the line chart uses for an incomplete tail.
For period-over-period on a single series (this month vs last), a line with
compareFilter: { "compare": true } overlays the two periods; a slope is the
better fit when comparing the endpoints of many series at once.
MCP connection required
1 FOR YOU
01
Connect the PostHog MCP server
Connect PostHog's MCP server so the skill can run posthog:query-trends against the user's project and render the line or slope view of the result.
🔌 This skill ships inside the PostHog AI Plugin. Listed package contents include 3 slash commands, 1 agent, hooks and an MCP server. Installed components and skill versions may vary by AI tool.
Install just this skill
Run this outside your AI tool, using Node.js 22.20.0 or newer. Skills CLI 1.7.2 skips skill selection; prompts cancel installation without an interactive terminal. If choosing Project when asked about installation scope, open your project's folder before running this.
Install checklist
Check selected tools if a picker appears; Claude Code may be unchecked under Additional agents. ↑/↓ moves, Space toggles selections, Enter confirms.
Without a tool picker, check Installing to: for your intended tool. Stop if it names a different tool.
If asked, choose Symlink (Recommended) for shared files or Copy to all agents for separate copies; review the summary before confirming installation.
Install the find-skills skill? defaults to Yes, adding another skill for all projects. Choose No if you don't want that extra installation.
Skills CLI 1.7.2 sends install data to skills.sh by default, including the source, skill names, target tools and file details; GitHub sources are reported only when GitHub confirms the repository is public, while other remote sources can also be reported. Confirmed-public GitHub sources also trigger a security-audit request. Before installing, set the environment variable DO_NOT_TRACK=1 or DISABLE_TELEMETRY=1 to disable both.
After installing for Claude Code, open it in the installation project if you chose Project; Global makes the skill available across projects on this computer. Once Claude Code loads the skill, its description helps Claude decide when to use it.
If installation created a top-level skills folder that did not exist when your Claude Code session started, run /reload-skills in that session. Run it again after later changes in that folder.
MCP server required
The skill's steps call for tools from the PostHog MCP server. Installing just this skill doesn't add that connection; set it up in your AI tool if it isn't there yet: PostHog MCP setup. Installing the whole plugin instead includes the connection settings.
Requirements for the PostHog MCP server
Connecting is free; sign in with your PostHog account.
Some tools use AI internally and may incur PostHog AI charges. Those tools require AI data processing to be enabled in your organization settings.
Install the whole plugin
This route installs the posthog plugin package selected for your AI tool.
Claude Code
Add PostHog's marketplace, then install the plugin
Run both lines in a terminal. They install PostHog's posthog plugin: this skill, PostHog's other skills, and a connection to PostHog's hosted MCP server.
01
claude plugin marketplace add PostHog/ai-plugin
02
claude plugin install posthog@posthog
Installation and loading
The plugin installs for you in every project and loads the next time you start Claude Code, or after /reload-plugins in an open session.
To connect your PostHog account, start claude, type /mcp, select plugin:posthog:posthog and follow the browser prompts.
Good to know
The plugin includes PostHog's session-capture hook; PostHog's README says it sends sessions to LLM Analytics only when POSTHOG_LLMA_CC_ENABLED=true and POSTHOG_API_KEY are both set.
If you use the separate posthog-telemetry plugin, PostHog says to keep only one of the two, because both register the same hook.
On a self-hosted PostHog, this route's MCP connection won't reach your instance: the plugin's config is fixed to https://mcp.posthog.com/mcp, which routes to PostHog's US or EU region. POSTHOG_MCP_URL works only for the Gemini CLI extension.
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties already work: feature flag targeting, cohorts, insight filters and breakdowns, surveys, session replay filters, workflows, and the person profile. Use when the user wants to "add a person property from my warehouse", "enrich people with Stripe/Postgres/Salesforce data", "put ARR or plan tier on my persons", "target a feature flag by a warehouse column", "sync warehouse columns onto groups or organizations", or wants to inspect, backfill, disable, or debug an existing warehouse-backed person or group property.Read full description
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.Read full description
Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with different experiment variants, identify usability issues, compare behavior patterns between control and test groups, or get qualitative insights to complement quantitative experiment results. Also covers pairing the observed behavior with a linked survey when the user wants qualitative feedback beyond what recordings show.Read full description
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 cross-referencing autocapture events on the same page, and can create a saved heatmap the user opens in PostHog, then summarizes the behavior and proposes improvements.
TRIGGER when: user asks what a heatmap shows, why people aren't clicking something, where users rage-click, how far they scroll, what to change on a page based on heatmap/click data, or to 'analyze/assess/review the heatmap' for a URL.
DO NOT TRIGGER when: the user only wants to create a saved heatmap screenshot with no analysis (use heatmaps-saved-create directly), or is asking about session replay in general (use investigating-replay).Read full description
Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks "what endpoints can I clean up?", "are any of my endpoints broken?", "which materialised versions are still being called?", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.Read full description
Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check, or review experiments or feature flags, check flag hygiene, or verify experiment setup.Read full description