modeling-revenue-metrics
하는 일
이 스킬은 청구 데이터나 매출 이벤트로부터 MRR, ARR, 이탈, 생애 가치를 포함한 반복 매출과 총매출 지표를 모델링합니다. 믿을 수 있는 매출 숫자를 원하는 재무 및 성장 팀을 위한 것입니다.
사용하는 경우
- ✓청구 데이터로 월간 또는 연간 반복 매출을 계산하고 싶을 때.
- ✓고객별 매출 이탈, 확장, 생애 가치를 보고 싶을 때.
- ✓PostHog의 관리형 매출 뷰에서 나온 매출 숫자가 필요할 때.
스킬 링크
https://github.com/PostHog/posthog/blob/master/products/data_modeling/skills/modeling-revenue-metrics/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Stripe 데이터로 지난 여섯 달의 월간 반복 매출과 이탈을 계산해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 연결된 청구 플랫폼이 있으면 PostHog의 관리형 매출 뷰를 쓰고, 지원되는 플랫폼이 없으면 사용자 지정 매출 이벤트를 씁니다. 그다음 선택한 지표를 계산해 재사용 가능한 모델로 저장하므로 숫자가 일관되게 유지됩니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Modeling revenue metrics
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; copy-paste recipes in
references/posthog/ and references/dbt/.
Step 1 — find where revenue lives
Revenue reaches PostHog two ways; both feed the same managed revenue views:
- A payment platform as a warehouse source — Stripe today (Chargebee/Polar/RevenueCat coming). Best when
the business runs on a billing platform. Connect via
setting-up-a-data-warehouse-source. - Custom revenue events — you send events (e.g.
purchase_completed) with a revenue property. Best when 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.
Step 2 — model on the managed views, not raw tables
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.
Each source gets its own views. There is no cross-source view. Names depend on the source type:
- Warehouse source:
<source>.<prefix>.<kind>_revenue_view, for examplestripe.prod.mrr_revenue_view. The<prefix>.part is absent when the source has no prefix. - Custom revenue events:
revenue_analytics.events.<event_name>.<kind>_events_revenue_view, where every non-alphanumeric character in the event name becomes_.
<kind> is one of the managed views in the table below. Discover the exact names. Do not search for
revenue_analytics, because it does not match warehouse source views:
SELECT table_name FROM system.information_schema.tables
WHERE position(table_name, 'revenue_view') > 0 ORDER BY table_name
If this returns nothing, the project has no revenue source configured yet. Check the governed mrr metric
(metric-list) or discover warehouse billing tables, and read their columns before modeling. Do not guess
view names.
| 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.
Rules before you model (revenue gotchas)
- 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.
- **The
mrrmanag
자주 묻는 질문
Stripe가 필요한가요?
Stripe는 지금 청구 소스로 지원됩니다. 지원되는 플랫폼이 없으면 매출을 사용자 지정 이벤트로 보낼 수 있습니다.
매출은 원시 청구 테이블에서 계산해야 하나요?
아니요. 관리형 뷰가 매출 인식과 통화를 이미 처리하므로, 스킬은 원시 테이블 대신 그것을 씁니다.
어떤 매출 지표를 계산할 수 있나요?
MRR, ARR 같은 반복 매출, 신규, 확장, 이탈 매출, 사용자당 평균 매출, 생애 가치를 다룹니다.
상세 정보
작성자의 원본 설명
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_view views (revenue_item, mrr, customer, subscription, charge, product) fed by Stripe or custom revenue event
repo: PostHog/posthog
인기도
- GitHub 스타
- 41k
- 순위
- #6852
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
depot-ci
41k에이전트가 GitHub Actions 대안인 Depot CI 워크플로를 설정하고 실행하도록 돕습니다. 기존 워크플로 이전과 실행 로그 읽기를 포함합니다.
depot-container-builds
41k에이전트가 Depot 원격 빌더에서 Docker 이미지를 빌드하도록 돕습니다. 다중 플랫폼 이미지, 레지스트리 푸시, 빌드 실패 수정을 포함합니다.
depot-github-runners
41k에이전트가 GitHub Actions 작업을 Depot 관리형 러너로 옮기고, 러너 크기와 라벨을 고르도록 돕습니다.
editing-agents-md
41k에이전트가 규칙을 AGENTS.md나 CLAUDE.md 중 어디에 둘지 정하고, 파일을 키우지 않으면서 잘 지켜지도록 쓰게 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.