checking-member-access
Explains what a member or a role can do in a PostHog project, using the access control MCP tools. Use when the user asks what someone can see or edit, who can…
Build reusable revenue models — MRR, ARR, gross revenue, new/expansion/contraction/churn, ARPU, LTV, and per-customer/per-account revenue — on either PostHog data-warehouse views (HogQL) or an external dbt project. Use when the user wants to model, define, or compute recurring
$ npx -y skills add posthog/posthog --skill modeling-revenue-metrics --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/modeling-revenue-metricsContext preview
The summary Claude sees to decide when to auto-load this skill.
Build reusable revenue models — MRR, ARR, gross revenue, new/expansion/contraction/churn, ARPU, LTV, and per-customer/per-account revenue — on either PostHog data-warehouse views (HogQL) or an external dbt project. Use when the user wants to model, define, or compute recurring
name: modeling-revenue-metrics description: > Build reusable revenue models — MRR, ARR, gross revenue, new/expansion/contraction/churn, ARPU, LTV, and per-customer/per-account revenue — on either PostHog data-warehouse views (HogQL) or an external dbt project. Use when the user wants to model, define, or compute recurring revenue, monthly/annual recurring revenue, churn or retention of revenue, lifetime value, average revenue per user, or revenue by customer, cohort, product, or currency. On PostHog, build on the managed revenue_analytics_* views (revenue_item, mrr, customer, subscription, charge, product) fed by Stripe or custom revenue events — not raw Stripe tables — and normalize money with convertCurrency(). In dbt, stage the payment source and compute fct_mrr / fct_revenue_item / dim_customer marts with tests. Covers picking the right source, the subscription-config gotcha that leaves MRR empty, currency handling, and linking revenue to persons/groups. Read modeling-warehouse-foundations first for the view-vs-dbt mechanics.
Turn payment/subscription data into durable revenue models. Read `modeling-warehouse-foundations` first for the view-vs-dbt decision, the `view-*` workflow, and `convertCurrency()`; this skill is the revenue-specific layer on top. Metric definitions live in [`references/revenue-metric-definitions.md`](references/revenue-metric-definitions.md); copy-paste recipes in [`references/posthog/`](references/posthog/) and [`references/dbt/`](references/dbt/).
Revenue reaches PostHog two ways; both feed the same **managed `revenue_analytics_*` views**:
the business runs on a billing platform. Connect via `setting-up-a-data-warehouse-source`.
there's no supported platform or you already track revenue in-product.
If neither exists yet, use `suggesting-data-imports` to recommend a source. In **dbt**, the equivalent is staging whichever billing tables landed in the warehouse.
PostHog auto-generates a curated set of views per source. **Do not re-derive revenue from raw Stripe tables** — the managed views already handle deferred-revenue recognition, currency, and a stable schema.
Discover the exact names (they're prefixed by source, e.g. `stripe.<prefix>.…`, plus a cross-source `revenue_analytics.all.…`):
SELECT table_name FROM system.information_schema.tables WHERE table_name ILIKE '%revenue_analytics%'
| Managed view | Grain | Use for | | ------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------- | | `revenue_item` (**start here**) | 1 / invoice line item | Gross revenue, monthly recurring revenue, revenue by product/customer/period. Implements deferred revenue + currency. | | `mrr` | 1 / (customer, subscription) | **Live snapshot** of current MRR — not a time series. | | `customer` | 1 / customer | `dim_customer`: email, country, cohort, metadata. | | `subscription` | 1 / subscription | Subscription state for churn/expansion logic. | | `charge` | 1 / charge | Raw charges; prefer `revenue_item` unless you specifically need charges. | | `product` | 1 / product | Product dimension. |
Key `revenue_item` columns: `amount` (already converted to the project **base currency**), `currency` (that base currency), `original_amount` / `original_currency` (as charged), `is_recurring`, `customer_id`, `subscription_id`, `product_id`, `group_0_key`…`group_4_key` (B2B account keys), `timestamp`.
1. **MRR is empty without a subscription config.** For event-based revenue, MRR only populates when a subscription property is configured. Empty MRR + populated gross revenue is **expected behaviour**, not a bug — say so instead of "fixing" it. 2. **The `mrr` managed view is a current snapshot**, not history ("MRR at the current time"). For MRR _over time_, sum recurring `amount` per month from `revenue_item` (see the recipe), or materialize a monthly snapshot of the `mrr` view on a schedule. 3. **`amount` is already in base currency.** Use it directly for reporting. Only call `convertCurrency(original_currency, 'XXX', original_amount, timestamp)` when you need a _different_ target currency, or when working from raw events. 4. **Link revenue to people via metadata.** Person/group-level revenue needs `posthog_person_distinct_id` metadata on the Stripe customer (or the person join). Without it, revenue is customer-level only. 5. **Don't build on the Revenue dashboard** — it's being retired (~2026-06-30). Model against the `revenue_analytics_*` views and the person/group revenue properties. 6. **Exclude test accounts.** Confirm `filter_test_accounts` behaviour so QA/internal charges don't inflate revenue.
**PostHog:** write the HogQL (alias every column), `view-create`, verify with `view-get`, then `view-materialize` the expensi
:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Repo: posthog/posthog
Explains what a member or a role can do in a PostHog project, using the access control MCP tools. Use when the user asks what someone can see or edit, who can…
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user…
Author continuously-running online evaluations in PostHog AI observability, grounded in real failure modes you've identified. Use when the user wants…
Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces. Use when someone wants to understand…
Investigate AI observability clusters — understand usage patterns in AI/LLM traffic, compare cluster behavior, compute cost/latency metrics, and drill into…
Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost…