mcpbeat Sign in

Visualizing Change Over Time Agent Skill

> 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 mcp_analytics frontend, custom visualizations). Use when a user asks how something "changed", "moved", "grew", "dropped", "improved", or "regressed" between two points or periods, or mentions "before/after", "period over period", "week over week", "delta", "slope graph", "slopegraph", or comparing many series across two snapshots. Surfaces both the `SlopeChart` quill component and the native `ChartDisplayType.SlopeGraph` insight display as options.

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
690
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/PostHog/posthog --skill visualizing-change-over-time

The instruction itself

4 sections, as written by the author

Visualizing change over time

When a request is about how something changed, the default reach is a line/area

trend — and that is usually right for a continuous series with many x points. But for

some change-over-time shapes a different chart reads far better. This skill is the

menu to offer, including the slope graph, when building visualizations with

@posthog/quill-charts.

Present the fitting option(s) and let the user choose — none of these is mandatory.

Pick by the shape of the change

| The change is… | Reach for | Why |

| ------------------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |

| A continuous series over many time points (a trend) | TimeSeriesLineChart / LineChart (area fill for emphasis) | The standard trend; the slope between every pair of points is visible. |

| Two points only (before → after) across several series/categories | SlopeChart | One line per entity from a left "before" to a right "after" — direction and magnitude of each entity's change, and rank flips, read at a glance. |

| Magnitude comparison at points in time (not the path between them) | BarChart / TimeSeriesBarChart | Bars compare discrete values; group/stack for sub-series. |

| A single headline number plus its change vs a prior period | MetricCard | Big number + sparkline + change pill. |

If the user is comparing exactly two snapshots (this week vs last, control vs

treatment, Q1 vs Q2) and especially when there are many categories whose

_relative_ movement matters, offer the slope graph as the cleaner alternative to a

grouped bar or a 2-point line chart.

Using the SlopeChart

import { SlopeChart } from '@posthog/quill-charts'
import type { Series } from '@posthog/quill-charts'
import type { SlopeSeriesMeta } from '@posthog/quill-charts'

// One series per entity; `data` is exactly [start, end].
const series: Series<SlopeSeriesMeta>[] = [
    { key: 'us', label: 'US', data: [120, 185] },
    { key: 'eu', label: 'EU', data: [200, 150] },
]

<SlopeChart
    series={series}
    labels={['Before', 'After']}
    theme={theme}
    config={{
        showSeriesLabels: true, // name beside each end point; steepest line always keeps its label
        legend: { show: true }, // each row shows the color, label, and the formatted change
        deltaFormatter: (d) => `${d >= 0 ? '+' : ''}${d}`,
    }}
/>

Key options (full list in the charts

AGENTS.md "Composition" section):

  • showStartLabels / showEndLabels — chart-level defaults for the value labels;

override per series with meta.showStartLabel / meta.showEndLabel.

  • showSeriesLabels — the name labels; on collision the series with the **largest

change** (|end − start|) always keeps its label.

  • legend: { show, position } — rows carry the per-series change (deltaFormatter).
  • The value axis is hidden by default — the start/end labels are the readout.

The theme comes from useChartTheme(); give the wrapper a real height. See the

charts AGENTS.md for theme wiring and sizing.

Scope note

There are two ways to render a slope graph; which you reach for depends on the surface:

  • SlopeChart — the @posthog/quill-charts component. Use it when building UI

directly: dashboards, reports, the mcp_analytics frontend, custom visualizations.

It backs the Slope view toggle on Max's inline trends result card

(services/mcp/src/ui-apps/components/TrendsVisualizer.tsx).

  • ChartDisplayType.SlopeGraph — a first-class insight display (value

'SlopeGraph' in frontend/src/types.ts), rendered by the backend

SlopeGraphTrendsQueryRunner

(posthog/hogql_queries/insights/trends/slope_graph_trends_query_runner.py). It

takes a TrendsQuery and keeps the first and last bucket of the date range as

the two slope points (the last segment is dashed when it's the current,

still-accumulating period). Set it via trendsFilter.display: "SlopeGraph"

(trends-only).

  • In the product insight editor, the picker entry is gated behind

FEATURE_FLAGS.SLOPE_GRAPH_INSIGHT (slope-graph-insight).

  • Via the API / posthog:insight-create MCP tool it works without the flag —

pass a TrendsQuery with trendsFilter.display: "SlopeGraph". To frame a clean

before → after, choose the date range and interval so the first bucket is your

baseline and the last is "now" (e.g. monthly buckets starting from the baseline

month).

Other skills for the same job

different authors, same section of the catalogue
XLSX
by anthropics
vendor ×15

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas

5k tokens scripts
XLSX
by w95
×7

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.

3k tokens
Raffle Winner Picker
by frostant
×5

Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.

949 tokens
Fda Database
by christophacham
×4

Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.

32k tokens scripts
Matlab
by christophacham
×4

MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter.

25k tokens
Umap Learn
by ComeOnOliver
×4

UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.

14k tokens
D3 Viz
by chrisvoncsefalvay
×3

Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.

20k tokens
Alphafold Database
by christophacham
×3

Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.

7k tokens

How to use it

Copy the folder

Take posthog/visualizing-change-over-time from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.