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
npx skills add PostHog/ai-plugin --skill modeling-revenue-metrics -a claude-codeWhat 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_itemview. - Report gross revenue by customer and product in the project base currency.
- Check why
mrris 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-code2Manually: put the files in place
~/.claude/skills/modeling-revenue-metrics/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/modeling-revenue-metrics/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-revenue-metrics -a codex2Manually: put the files in place
.agents/skills/modeling-revenue-metrics/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-revenue-metrics -a cursor2Manually: put the files in place
.cursor/skills/modeling-revenue-metrics/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install PostHog/ai-plugin skills/modeling-revenue-metrics2Manually: put the files in place
.github/skills/modeling-revenue-metrics/SKILL.md1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-revenue-metrics -a gemini-cli2Platform CLI
gemini skills install https://github.com/PostHog/ai-plugin --path skills/modeling-revenue-metricsManually: put the files in place
.devin/skills/modeling-revenue-metrics/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-revenue-metrics -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.