Pular para o conteúdo
Skillpedia
Análise e planilhas41 mil · #6904

investigate-metric

O que ela faz

Esta skill explica por que um gráfico do PostHog mudou, usando divisões, funis, retenção e outras consultas relacionadas. É para analistas e gerentes de produto que precisam da causa de uma mudança.

Quando usar

  • ✓Quando uma métrica caiu ou disparou e você quer saber o motivo.
  • ✓Quando alguém pede que você explique ou detalhe um gráfico que você não consegue interpretar.
  • ✓Quando uma métrica de funil, retenção ou ciclo de vida mudou e você precisa da causa raiz.

Link da skill

https://github.com/PostHog/posthog/blob/master/products/product_analytics/skills/investigate-metric/SKILL.md

Copie 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

Use esta skill para me ajudar: https://github.com/PostHog/posthog/blob/master/products/product_analytics/skills/investigate-metric/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Os cadastros caíram bruscamente na última terça-feira. Descubra por quê.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

Ela executa várias consultas relacionadas, como divisões por propriedade e os usuários por trás de uma mudança, depois verifica as anotações em busca de eventos que possam explicá-la. Junta os resultados em uma causa provável.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

Investigating a metric change

For "why did X change?" questions about a saved insight, dashboard tile, or pasted query, and for "explain this chart" or "walk me through this" when the user names no change. Don't load this skill for plain "what is X?" questions — only when there's a chart or an observed change to explain.

Tools

Targets PostHog MCP v2. Typed query tools accept the query body directly — pass kind, series, dateRange as top-level fields, do not wrap in InsightVizNode.

Tool Purpose
posthog:query-trends Trends (count over time)
posthog:query-funnel Funnels (multi-step conversion)
posthog:query-retention Retention (cohort return rates)
posthog:query-stickiness Stickiness (active days per user)
posthog:query-lifecycle Lifecycle (new/returning/resurrecting/dormant)
posthog:query-paths Paths (navigation flow)
posthog:query-trends-actors Users behind a trend bucket (trends source only)
posthog:execute-sql Existing SQL insights and custom analysis
posthog:read-data-schema Discover events, properties, sample values
posthog:insight-get / -query Fetch a saved insight's metadata / data
posthog:explain-chart Walk the user through a trends chart (Step 5)

Plus the standard PostHog tools the playbooks reference by name (feature-flag-get-all, experiment-list, annotations-list, query-error-tracking-issues-list, query-logs, query-session-recordings-list, cohorts-list/-create, annotation-create, insight-create).

Helper scripts

  • compare_to_prior_periods.py — auto-detects interval and compares recent values to the natural cycle (day-of-week, hour-of-week, or sequential). Use to resolve step 2.2 cheaply.
  • breakdown_attribution.py — ranks breakdown segments by absolute delta and flags offsetting moves.
python3 scripts/compare_to_prior_periods.py < query_result.json
WINDOW=7 python3 scripts/breakdown_attribution.py < breakdown_result.json

Step 1 — Classify the metric

Read query.kind from the source the user pointed at:

  • Saved insight (URL, short_id): posthog:insight-get → query.kind. Use posthog:insight-query if you also need the numbers.
  • A query you already ran or the user pasted: read kind directly.
  • A metric the user only names, such as "signups", or shows in a screenshot: find its event with posthog:read-data-schema and run it as one series over time with posthog:query-trends. That query is your TrendsQuery. When query-trends cannot express the metric, such as a warehouse-only metric or a custom SQL join, run it with posthog:execute-sql and treat it as a HogQLQuery.
  • Nothing pointed at, or several events could be the metric: ask which one. Don't guess.
kind Playbook
TrendsQuery trend-playbook.md
FunnelsQuery funnel-playbook.md
RetentionQuery retention-playbook.md
StickinessQuery stickiness-playbook.md
LifecycleQuery lifecycle-playbook.md
PathsQuery paths-playbook.md
HogQLQuery route by what the SQL aggregates (see below)

If kind === "TrendsQuery" and trendsFilter.display === "BoxPlot", use box-plot-playbook.md — distribution metric, no breakdowns.

For HogQLQuery insights, classify by the SQL's shape: count over time → trend playbook, multi-step conversion → funnel playbook, cohort return → retention playbook. Run the SQL through posthog:execute-sql to get the data, then follow the closest playbook's steps. See HogQL insights in shared-patterns.md.

Perguntas frequentes

Ela só funciona com insights salvos?

Não. Ela também pode trabalhar a partir de um card de dashboard ou de uma consulta que você colar.

Ela explica o que é uma métrica?

Não. Ela serve para mudanças ou gráficos que precisam de explicação, não para definições simples.

Como ela encontra os usuários por trás de uma mudança?

Ela usa a consulta de atores de tendências para ver quem está no grupo que mudou.

Detalhes

Descrição original do autor

Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries. Use when the user reports an anomaly, asks "why did X change?", asks to explain or walk them through a chart, or needs root-cause analysis for a trend, funnel, retention, stickiness, or lifecycle metric.

repo: PostHog/posthog

Popularidade

Estrelas no GitHub
41 mil
Posição no ranking
#6904
Licença
—
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas