modeling-revenue-metrics
Skill by PostHog
Builds reusable revenue models such as MRR, ARR, churn and LTV on PostHog data-warehouse views or an external dbt project. Aimed at analysts who need revenue metrics from Stripe or custom revenue events.
Install modeling-revenue-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-revenue-metrics ~/.claude/skills/modeling-revenue-metricsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install modeling-revenue-metrics in Claude Code
git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/posthog/products/data_modeling/skills/modeling-revenue-metrics ~/.gemini/antigravity-cli/skills/modeling-revenue-metricsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install modeling-revenue-metrics in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill helps an AI assistant build reusable revenue models. It covers MRR, ARR, gross revenue, new, expansion, contraction and churn revenue, ARPU, LTV, and per-customer or per-account revenue. Models can run on PostHog data-warehouse views using HogQL, or in an external dbt project.
On PostHog, the skill builds on the managed revenue views, which are fed by Stripe or custom revenue events, and normalizes money with convertCurrency(). In dbt, it stages the payment source and computes fct_mrr, fct_revenue_item and dim_customer marts with tests. It also covers choosing the right source, the subscription configuration that leaves MRR empty, currency handling, and linking revenue to persons and groups. It is intended for teams that need revenue metrics they can reuse.
Written from the project's SKILL.md and checked against it.
What it can do
- Choose a revenue sourceHelps pick between a payment platform source and custom revenue events.
- Model on managed viewsBuilds on the managed *_revenue_view views instead of raw Stripe tables.
- MRR and ARRComputes monthly and annual recurring revenue from recurring invoice lines.
- Churn and expansionModels new, expansion, contraction and churn revenue.
- Customer revenueBuilds revenue by customer, cohort, product or currency.
- Currency handlingNormalizes money with convertCurrency() on PostHog.
- dbt martsStages the payment source and computes fct_mrr, fct_revenue_item and dim_customer with tests.
- Person and group linksLinks revenue to persons and groups using metadata.
What you need
- A PostHog data warehouse source such as Stripe, or custom revenue events
- HogQL access in PostHog for the view-based path
- An external dbt project for the dbt path
Try asking
- Calculate MRR by month from my Stripe revenue data
- Build a revenue by customer view in PostHog using HogQL
- Create dbt marts for MRR and revenue items with tests
Good to know
- For event-based revenue, MRR stays empty until a subscription property is configured.
- The mrr managed view is a current snapshot, not a history of MRR over time.
- dbt has no convertCurrency(), so a rate seed is needed for currency conversion.
- The source says the Revenue dashboard is being retired and should not be built on.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: products/data_modeling/skills/modeling-revenue-metrics/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
references/dbt/_sources_stripe.yml862 B -
references/dbt/dim_customer.sql324 B -
references/dbt/fct_mrr.sql2 KB -
references/dbt/fct_revenue_item.sql3 KB
Show all 10 files
-
references/dbt/schema.yml1 KB -
references/posthog/gross_revenue_by_month.sql595 B -
references/posthog/mrr_and_arr.sql1 KB -
references/posthog/revenue_by_customer.sql1 KB -
references/revenue-metric-definitions.md6 KB
Alternatives to modeling-revenue-metrics
All alternatives →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.
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.
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.
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.
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.
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.
Compare with kaggle-cli, bigquery-bigframes or data-loading
modeling-revenue-metrics: common questions
Why is my MRR empty but gross revenue populated?
The source says this is expected when event-based revenue has no subscription property configured. It is not treated as a bug.
Can I get MRR over time from PostHog?
The mrr view is a current snapshot. The source says to sum recurring amounts per month from revenue_item or materialize a monthly snapshot of the mrr view.
Which payment platforms are supported as a source?
The source says Stripe is supported today, with Chargebee, Polar and RevenueCat listed as coming.
How do I install modeling-revenue-metrics?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is modeling-revenue-metrics free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is modeling-revenue-metrics 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 modeling-revenue-metrics?
Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.
