Skip to main content
skill CX Codex

modeling-revenue-metrics — Claude Code skill

modeling-revenue-metrics builds reusable revenue models for MRR, ARR, churn, ARPU and LTV from PostHog views or dbt. Use it for revenue analysis by customer, product or period.

no license 175 installs ★ 101 updated 2026-10-24

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add PostHog/ai-plugin --skill modeling-revenue-metrics -a claude-code
Open on GitHub

What modeling-revenue-metrics does

This skill helps choose a revenue source and turn it into models for MRR, ARR, gross revenue, new sales, expansion, contraction, churn, ARPU and LTV. In PostHog, it works with the managed revenue_item, mrr, customer, subscription, charge and product views and writes HogQL queries. Raw Stripe tables are not the modeling layer.

For an external warehouse, it describes a dbt flow that stages billing data and builds fct_revenue_item, fct_mrr and dim_customer marts with tests. Values in revenue_item.amount already use the project base currency; convertCurrency() is used when a different target currency is needed.

Event-based revenue does not populate MRR until a subscription property is configured, even when gross revenue is present. Check this before treating an empty MRR result as a query failure. Person- or group-level revenue also needs posthog_person_distinct_id metadata on the Stripe customer.

What it helps with

  • calculate MRR and ARR from revenue data
  • separate new, expansion, contraction and churn revenue
  • connect revenue with customers, cohorts and products
  • convert amounts to a target currency
  • build revenue marts in dbt

Example prompts for the agent

  • Build a monthly MRR and ARR model from the revenue_item view.
  • Report gross revenue by customer and product in the project base currency.
  • Check why mrr is empty while event-based revenue is populated.

How to install modeling-revenue-metrics

1Skills CLI (Vercel)

npx skills add PostHog/ai-plugin --skill modeling-revenue-metrics -a claude-code

2Manually: put the files in place

~/.claude/skills/modeling-revenue-metrics/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/modeling-revenue-metrics/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about modeling-revenue-metrics

How do I install modeling-revenue-metrics in Claude Code?

Run npx skills add PostHog/ai-plugin --skill modeling-revenue-metrics -a claude-code, then check ~/.claude/skills/modeling-revenue-metrics/SKILL.md.

What does modeling-revenue-metrics do?

It builds revenue models from PostHog views with HogQL or from an external dbt project. The skill covers MRR, ARR, churn, ARPU, LTV and revenue grouped by customer.

Why can the mrr view be empty?

Event-based revenue needs a configured subscription property before MRR is populated. Gross revenue can still be available without that setting.

Similar skills

All skills for Data and databases →
saas-revenue-growth-metrics deanpeters saas-revenue-growth-metrics is a Claude Code skill that calculates and explains SaaS revenue, retention, and growth metrics for investigating churn, expansion, and product-market-fit signals. CX Codex +1 2,500installs signals-scout-revenue-analytics PostHog The signals-scout-revenue-analytics skill checks PostHog Revenue Analytics sources and settings for stalled Stripe syncs, missing revenue events, and configuration problems. CX Codex +1 313installs revenuecat-forecasting RevenueCat revenuecat-forecasting projects MRR, ARR, and subscriber metrics from RevenueCat account data. Models cohort-based churn steps and required acquisition spend for revenue goals. CX Codex +1 316installs revenue-product-segmentation OctagonAI revenue-product-segmentation — a skill for Claude Code, Codex, Cursor and other agents that pulls a product-segment revenue breakdown for any public company via Octagon MCP. Covers annual periods and returns figures in USD billions. CX Codex +1 263installs Maxio MCP Servosity An MCP server for Maxio Advanced Billing that builds MRR waterfalls, computes retention, and tracks per-client history from a local SQLite mirror. Runs on Claude Code, Codex, Cursor, GitHub Copilot, Windsurf, Cline, and Zed. CX Codex +1 ★ 87repo stars saas-metrics claude-office-skills saas-metrics analyzes subscription business metrics like MRR, churn, cohorts, and unit economics. Helpful for preparing investor updates and monthly financial reviews. CX Codex +1 5,100installs

From the same set82

The whole set →
managing-streamlit-apps managing-streamlit-apps controls Streamlit apps in PostHog sandboxes using MCP tools, handling everything from provisioning to safe code patching. CX Codex +1 179installs modeling-activation-metrics modeling-activation-metrics builds an activation model: a per-user or per-account activated flag plus an activation-rate metric. Useful while the “aha moment” is still a guess. CX Codex +1 178installs modeling-conversion-metrics modeling-conversion-metrics builds a reusable conversion model: funnel steps, a conversion window, drop-off and time to convert. Works on PostHog warehouse views in HogQL or in a dbt project. CX Codex +1 178installs writing-streamlit-apps The writing-streamlit-apps skill guides Python code for Streamlit apps that read PostHog data inside a sandbox. Use it when building or debugging dashboards with tables and charts. CX Codex +1 177installs modeling-product-usage-metrics modeling-product-usage-metrics builds retention, frequency, and lifecycle models using PostHog HogQL views or dbt data marts with built-in tests. CX Codex +1 175installs modeling-dimension-tables modeling-dimension-tables builds star-schema dimension tables in PostHog HogQL views or dbt projects so you avoid repetitive joins across your metrics. CX Codex +1 174installs modeling-warehouse-foundations modeling-warehouse-foundations sets core guidelines for building PostHog data models via native HogQL views or an external dbt setup. CX Codex +1 172installs instrument-metrics The instrument-metrics Claude Code skill adds PostHog metric capture to a codebase. It runs after feature work or PR review, and when a request calls for counters or other metrics. CX Codex +1 154installs

Project sponsors

Companies that keep this analytics open