Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính41k · #6904

investigate-metric

Skill này làm gì

Skill này giải thích vì sao một biểu đồ PostHog thay đổi, dùng phân tách, phễu, giữ chân và các truy vấn liên quan khác. Nó dành cho nhà phân tích và quản lý sản phẩm cần nguyên nhân của một thay đổi.

Khi nào nên dùng

  • ✓Khi một chỉ số giảm hoặc tăng đột biến và bạn muốn biết vì sao.
  • ✓Khi có người yêu cầu bạn giải thích hoặc đi qua một biểu đồ mà bạn không đọc được.
  • ✓Khi một chỉ số phễu, giữ chân hoặc vòng đời thay đổi và bạn cần nguyên nhân gốc.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/PostHog/posthog/blob/master/products/product_analytics/skills/investigate-metric/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Lượt đăng ký giảm mạnh vào thứ Ba tuần trước. Tìm xem vì sao.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill chạy nhiều truy vấn liên quan, chẳng hạn phân tách theo thuộc tính và danh sách người dùng đứng sau thay đổi, rồi kiểm tra chú thích để tìm các sự kiện có thể giải thích. Sau đó, skill kết hợp kết quả thành một nguyên nhân có khả năng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.

Câu hỏi thường gặp

Skill có chỉ làm việc với insight đã lưu không?

Không. Nó cũng có thể làm việc từ một ô dashboard hoặc một truy vấn bạn dán vào.

Skill có giải thích chỉ số là gì không?

Không. Nó dành cho các thay đổi hoặc biểu đồ cần được giải thích, không dành cho định nghĩa đơn giản.

Làm sao nó tìm người dùng đứng sau một thay đổi?

Nó dùng truy vấn actors của xu hướng để xem ai nằm trong nhóm đã thay đổi.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6904
Giấy phép
—
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự