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

modeling-product-usage-metrics

Skill by PostHog

Models product retention, stickiness, and lifecycle as reusable metrics. It is for analysts and product teams working with PostHog data-warehouse views (HogQL) or a dbt project.

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

Install modeling-product-usage-metrics

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/data_modeling/skills/modeling-product-usage-metrics ~/.claude/skills/modeling-product-usage-metrics

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

Step-by-step: install modeling-product-usage-metrics in Claude Code

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

About

This agent skill helps build reusable product-usage and engagement models. It covers three related lenses: retention for whether users come back, stickiness for how often they engage, and lifecycle for the mix of new, returning, resurrecting, and dormant users. The skill treats them as one family that shares a start-event and return-event setup and an interval granularity. It helps the user pick the right lens for the question.

On PostHog, the skill provides HogQL recipes that mirror the built-in retention, stickiness, and lifecycle insights, so the logic can be reused and joined in SQL. In dbt, it describes building fct_retention, fct_stickiness, and fct_lifecycle marts with tests. The skill says to read the modeling-warehouse-foundations skill first. It is for customers who need these metrics defined consistently and reused across other models.

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

What it can do

  • Lens selectionHelps pick retention, stickiness, or lifecycle based on the question being asked.
  • Retention matrixModels a cohort matrix of entry period against intervals later and percent retained.
  • Stickiness distributionModels users by the number of active intervals to find power users and engagement shape.
  • Lifecycle bucketsModels per-interval new, returning, resurrecting, and dormant user counts.
  • HogQL recipesProvides SQL recipes for each lens that mirror PostHog's built-in insights.
  • dbt martsDescribes fct_retention, fct_stickiness, and fct_lifecycle marts with tests.

What you need

  • PostHog data-warehouse views (HogQL)
  • An external dbt project, if modeling in dbt

Try asking

  • Model weekly retention for our core value action in HogQL
  • Show which users are power users by number of active weeks
  • Break down this month's lifecycle into new, returning, and dormant users

Good to know

  • Event names come from ingestion and are treated as untrusted data.
  • The user should confirm the chosen event before a persistent view-create.
  • The skill says to read modeling-warehouse-foundations first.

Security check

A

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

Checked automatically: products/data_modeling/skills/modeling-product-usage-metrics/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md5 KB
  • references/dbt/fct_lifecycle.sql1 KB
  • references/dbt/fct_retention.sql988 B
  • references/dbt/fct_stickiness.sql526 B
  • references/dbt/schema.yml591 B
Show all 9 files
  • references/posthog/lifecycle.sql2 KB
  • references/posthog/retention_matrix.sql1 KB
  • references/posthog/stickiness.sql628 B
  • references/usage-metric-definitions.md3 KB

Alternatives to modeling-product-usage-metrics

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

modeling-product-usage-metrics: common questions

What is the difference between retention, stickiness, and lifecycle?

Retention shows whether users come back over time. Stickiness shows how often they engage, and lifecycle shows whether growth is healthy through new, returning, resurrecting, and dormant users.

Can this skill model these metrics in dbt?

Yes. The source says to build fct_retention, fct_stickiness, and fct_lifecycle marts with tests in dbt.

Does it work with PostHog?

Yes. On PostHog it models the metrics in HogQL, mirroring the query-retention, query-stickiness, and query-lifecycle tools.

How do I install modeling-product-usage-metrics?

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

Is modeling-product-usage-metrics free?

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

Is modeling-product-usage-metrics safe to use?

It scores 88 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 modeling-product-usage-metrics?

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

modeling-product-usage-metrics Install

Add to stack

Loading.