Langsung ke konten
Skillpedia
Analisis & spreadsheet41k Β· #6904

investigate-metric

Fungsinya

Skill ini menjelaskan mengapa grafik PostHog berubah, dengan menggunakan rincian, corong, retensi, dan kueri terkait lainnya. Ditujukan untuk analis dan manajer produk yang memerlukan penyebab sebuah perubahan.

Kapan dipakai

  • βœ“Saat sebuah metrik turun atau melonjak dan Anda ingin tahu alasannya.
  • βœ“Saat seseorang meminta Anda menjelaskan grafik yang tidak dapat Anda pahami.
  • βœ“Saat metrik corong, retensi, atau siklus hidup berubah dan Anda memerlukan akar penyebabnya.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/PostHog/posthog/blob/master/products/product_analytics/skills/investigate-metric/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œPendaftaran turun tajam pada Selasa lalu. Cari tahu mengapa.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill menjalankan beberapa kueri terkait, seperti rincian menurut properti dan pengguna di balik perubahan, lalu memeriksa anotasi untuk event yang mungkin menjelaskannya. Hasilnya digabungkan menjadi penyebab yang paling mungkin.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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.

Pertanyaan umum

Apakah hanya bekerja dengan insight yang sudah disimpan?

Tidak. Skill juga dapat bekerja dari ubin dasbor atau kueri yang Anda tempelkan.

Apakah skill menjelaskan apa itu sebuah metrik?

Tidak. Skill ini untuk perubahan atau grafik yang memerlukan penjelasan, bukan definisi sederhana.

Bagaimana skill menemukan pengguna di balik sebuah perubahan?

Skill menggunakan kueri aktor tren untuk melihat siapa saja yang berada di kelompok yang berubah.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
41k
Peringkat
#6904
Lisensi
β€”
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa