choosing-trend-or-slope-view
O que ela faz
Esta skill ajuda você a escolher o gráfico certo quando alguém pergunta como algo mudou entre dois pontos. É para quem quer um gráfico que combine com a sua pergunta.
Quando usar
- ✓Quando você pergunta quanto algo cresceu ou caiu entre duas datas.
- ✓Quando você quer ver como uma métrica se moveu ao longo de todo o período, incluindo picos.
- ✓Quando você quer comparar várias séries pelos seus valores de início e fim.
Link da skill
https://github.com/PostHog/posthog/blob/master/products/product_analytics/skills/choosing-trend-or-slope-view/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Quanto os cadastros mudaram de janeiro para março?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
Se o pedido puder significar o caminho completo ou apenas o início e o fim, a skill faz uma pergunta curta antes. Os dois gráficos vêm da mesma consulta, e o gráfico de inclinação mantém apenas o primeiro e o último ponto.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
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 same TrendsQuery 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"):
{
"kind": "TrendsQuery",
"series": [{ "kind": "EventsNode", "event": "$pageview", "math": "total" }],
"dateRange": { "date_from": "2025-01-01", "date_to": "2025-03-31" },
"trendsFilter": { "display": "ActionsLineGraph" }
}
Start vs end → slope
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-trendsresult 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.
Perguntas frequentes
Os dois gráficos são baseados em dados diferentes?
Não. Ambos vêm da mesma consulta de tendências no mesmo intervalo de datas, e o gráfico de inclinação mantém apenas o primeiro e o último ponto.
E se eu já souber qual gráfico quero?
Se você pedir claramente um deles, a skill o constrói sem perguntar.
Quando um gráfico de inclinação é melhor?
É melhor para mostrar a variação líquida e as mudanças de posição em muitas séries, sem o ruído do meio do caminho.
Detalhes
Descrição original do autor
Clarify how to visualize change over a time range before building a trend. Use whenever the user asks how much something changed, grew, dropped, improved, or regressed between two points or periods — "how much did X change from A to B", "before vs after", "start vs end", "week over week", "compare this month to last", "change over time" — or mentions a "slope chart" / "slopegraph". Two readings of "change" need different charts: the whole trend (a line, every interval) versus just the two endpoints (a slope, start vs end). Ask which they want, then render it. Not for choosing a saved insight C
repo: PostHog/posthog
Popularidade
- Estrelas no GitHub
- 41 mil
- Posição no ranking
- #6900
- Licença
- —
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
depot-ci
41 milAjuda seu agente a configurar e executar fluxos de trabalho do Depot CI, uma alternativa ao GitHub Actions, incluindo a migração de fluxos existentes e a leitura dos logs de execução.
depot-container-builds
41 milAjuda seu agente a criar imagens Docker nos builders remotos do Depot, incluindo imagens multiplataforma, envio para registros e correção de falhas de build.
depot-github-runners
41 milAjuda seu agente a levar tarefas do GitHub Actions para runners gerenciados pelo Depot, escolhendo os tamanhos e os rótulos dos runners e resolvendo problemas de configuração.
editing-agents-md
41 milAjuda seu agente a decidir se uma regra deve ficar em um arquivo AGENTS.md ou CLAUDE.md, e a escrevê-la de forma que seja seguida sem deixar o arquivo inchado.
Skills parecidas
gitcrawl
394 milPermite que seu agente pesquise um arquivo salvo de issues e pull requests do GitHub, agrupe os duplicados e verifique o status atual deles no GitHub.
slacrawl
394 milPermite que seu agente pesquise e conte mensagens em um arquivo local do Slack, verifique quão atualizado ele está e o atualize quando necessário.
goplaces
394 milAjuda seu agente a buscar lugares, obter detalhes e avaliações e identificar nomes de lugares usando o Google Places, com saída em JSON para scripts.