Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

investigate-metric

Skill by PostHog

Diagnoses why a product metric dropped, spiked, or plateaued by running breakdowns, actors, paths, lifecycle, retention, and annotations queries. It is for PostHog users investigating anomalies in trends, funnels, retention, stickiness, or lifecycle charts.

  • Score 86
  • 41k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install investigate-metric

Built from the published package, never by AI.

git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.claude/skills && cp -r /tmp/posthog/products/product_analytics/skills/investigate-metric ~/.claude/skills/investigate-metric

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install investigate-metric in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill helps an AI assistant find the cause of a change in a product metric. It starts by classifying the metric from a saved insight, a pasted query, or a named event, then checks whether the movement is normal variance. It then looks for known changes in the same window, such as feature flags, experiments, annotations, and git commits, and runs the playbook that matches the query kind. A cross-check on a segment the suspected cause should not affect helps confirm or reject a hypothesis.

The skill targets PostHog MCP v2 and works through typed query tools and execute-sql. When chart explanations are enabled, it can finish by drawing the chart with each anomaly highlighted. Otherwise it writes a report with a likely cause, confidence, evidence, and ruled-out hypotheses. It is aimed at product and analytics teams who ask why a metric changed.

Written from the project's SKILL.md and checked against it.

What it can do

  • posthog:query-trendsRuns trends queries to count events over time for the metric under review.
  • posthog:query-funnelRuns funnel queries to check multi-step conversion and where it drops.
  • posthog:query-retentionRuns retention queries to check cohort return rates.
  • posthog:query-trends-actorsLists the users behind a trend bucket to inspect a spike or drop.
  • posthog:execute-sqlRuns existing SQL insights and custom analysis when insight queries are not enough.
  • posthog:annotations-listFinds annotations near the start of the anomaly as possible known changes.
  • posthog:feature-flag-get-allFinds feature flags updated near the anomaly start as possible causes.
  • posthog:explain-chartWalks the user through a trends chart or funnel, with each anomaly as a chapter.

What you need

  • PostHog MCP v2 access
  • Python 3 to run the helper scripts

Try asking

  • Why did our signups drop last week? Investigate the trend.
  • Explain this trends chart and walk me through the spike.
  • Find the root cause of the drop in this retention insight.

Good to know

  • The chart explanation tool exists only where chart explanations are enabled.
  • Asks the user which metric to use when several events could match, instead of guessing.
  • Box plot metrics use their own playbook and have no breakdowns.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: products/product_analytics/skills/investigate-metric/SKILL.md, products/product_analytics/skills/investigate-metric/scripts/breakdown_attribution.py, products/product_analytics/skills/investigate-metric/scripts/compare_to_prior_periods.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md13 KB
  • references/box-plot-playbook.md4 KB
  • references/common-causes.md2 KB
  • references/funnel-playbook.md2 KB
  • references/lifecycle-playbook.md1 KB
Show all 13 files
  • references/paths-playbook.md2 KB
  • references/retention-playbook.md1 KB
  • references/shared-patterns.md6 KB
  • references/stickiness-playbook.md1 KB
  • references/trend-playbook.md2 KB
  • references/what-stands-out.md3 KB
  • scripts/breakdown_attribution.py6 KB
  • scripts/compare_to_prior_periods.py14 KB

Alternatives to investigate-metric

All alternatives →
kaggle-cliKaggle
94

Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.

AAA Skill 7.7k
bigquery-bigframesgoogle
94

Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.

AAA Skill 25k
data-loadingmicrosoft
94

Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.

AAA Skill 18k
data-manager-api-setupgoogle
94

Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.

AAA Skill 25k
managed-airflow-dag-authoringgoogle
94

Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.

AAA Skill 25k
data-feedsdavila7
94

Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.

AAA Skill 34k

Compare with kaggle-cli, bigquery-bigframes or data-loading

investigate-metric: common questions

What metrics can this skill investigate?

The source covers trends, funnels, retention, stickiness, lifecycle, paths, and box plot metrics, plus HogQL insights classified by their SQL shape.

Does it change anything in my PostHog project?

The source describes optional steps that create insights or annotations, such as insight-create and annotation-create, but only offers them after the investigation.

What if the movement is normal variance?

The skill reports that the movement is normal variance and stops, according to the variance check in the source.

How do I install investigate-metric?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is investigate-metric free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is investigate-metric safe to use?

It scores 86 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to investigate-metric?

Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.

investigate-metric Install

Add to stack

Loading.