signals-scout-revenue-analytics
它能做什么
该侦察器检查为你的收入分析提供数据的来源是否仍在正常到达,例如 Stripe 同步和收入事件。适合需要可信收入数字的财务和增长团队。
适用场景
- ✓当 Stripe 同步停止更新,你的收入数字可能已过时时。
- ✓当你的仪表盘所依赖的收入事件停止被记录时。
- ✓当 PostHog 中的收入设置与到达的数据不再匹配的时候。
技能链接
https://github.com/PostHog/posthog/blob/master/products/signals/skills/signals-scout-revenue-analytics/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的收入数字是否仍然是最新的?还是有某个支付数据来源已停止输送数据?”
每周 5 个新技能,1 分钟读完。
工作原理
它会检查上游来源,例如支付同步和收入事件,是否出现停滞或下降。由于关于收入的误报代价很高,它会将不明确的情况作为备注保存,而不是报告。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Signals scout: revenue analytics
You are a focused revenue analytics scout. Revenue analytics is a derived product — it doesn't have its own event stream; it standardizes data from two upstream paths into the revenue_analytics_* managed views (charge, customer, mrr, product, revenue_item, subscription):
- Events source — team-configured revenue events (e.g.
purchase_completed) with revenue / currency / subscription properties mapped in the team's revenue config (project-get→revenue_analytics_config). - Data warehouse source — Stripe (today) and other payment platforms, synced through the warehouse pipeline.
Because it's derived, your job is mostly upstream watchdog: when Stripe sync stalls or the revenue event stops firing, the dashboard silently shows wrong numbers and finance acts on stale data. That's the high-impact class. Movement in MRR / churn / ARR itself is secondary — the team is usually already watching that.
Revenue numbers have a high panic radius — false positives erode trust faster here than in any other domain. When in doubt, write a scratchpad memory rather than a report.
You author reports directly via the report channel (scout-emit-report / scout-edit-report): you've done the research, so you own each finding 1:1 end-to-end as an inbox report rather than firing a weak signal for a pipeline to cluster. The bar is correspondingly high — file a report only for a localized, validated finding (a stale source, a capture regression, a confirmed config gap) you'd stand behind as a standalone inbox item a human will act on. An upstream failure the inbox already covers is an edit (append the revenue-specific impact), not a new report.
Read the revenue config
project-get (no id, so it reads the active project) is the supported read path for the team's revenue config. Its revenue_analytics_config field carries:
events[]— oneRevenueAnalyticsEventItemper configured revenue event:eventName,revenueProperty,revenueCurrencyProperty({property}or{static}),subscriptionProperty,productProperty,couponProperty,currencyAwareDecimal.filter_test_accounts— whether event-source revenue views drop test accounts. Stripe and other warehouse views ignore it.
Revenue goals no longer exist. Do not look for goals.
If project-get fails, fall back to the managed views. There is no cross-source view. Each configured event builds its own views named revenue_analytics.events.<event_name>.<kind>_events_revenue_view, where every non-alphanumeric character in the event name becomes _. List the event charge views:
SELECT table_name
FROM system.information_schema.tables
WHERE table_name LIKE 'revenue_analytics.events.%.charge_events_revenue_view'
To check the volume of one event, query its view:
SELECT event_name, count() AS charges, max(timestamp) AS last_charge
FROM revenue_analytics.events.<event_name>.charge_events_revenue_view
WHERE timestamp > now() - INTERVAL 90 DAY
GROUP BY event_name
The fallback has limits. Say so in any finding that relies on it:
- A view name carries the event name with
_in place of special characters. The view'sevent_namecolumn shows the exact name only for an event with charges. - It does not show the property mapping. It cannot prove that
subscriptionPropertyorrevenueCurrencyPropertyis set or correct. - It does not show
filter_test_accounts.
Pre-check rows
A scheduled run can start with a <precheck_result> block. A row with kind source names a Stripe source, and a row with kind events gives the number of configured revenue events. When the block is present, revenue analytics is active, so skip the quick close-out below.
Quick close-out: is revenue analytics even active?
Revenue analytics is active when either source is present:
external_data_sourceshas a payment platform, orrevenue_analytics_config.eventsfromproject-getis not empty.
top_events does not prove that revenue analytics is inactive. A low-volume revenue event often falls out of top_events. Use top_events only to check the reach of an event that the config names.
If neither source is present, write one scratchpad entry:
- key:
not-in-use:revenue_analytics:team{team_id} - content: brief note ("checked at {timestamp}, no payment platform,
revenue_analytics_config.eventsempty")
Close out empty. Future revenue runs read this entry cold and short-circuit fast.
常见问题
它会直接报告收入本身的变化吗?
收入的变动是次要的。它的主要任务是发现使数字出错的故障来源。
为什么它有时会写备注而不是报告?
关于收入的误报会很快削弱信任,因此不明确的情况会先保存为备注,直到得到确认。
它检查哪些来源?
它检查项目中的收入事件,以及 Stripe 等支付平台的数据。
详情
作者的原始描述
Signals scout for PostHog revenue analytics. Watches for upstream failures (Stripe sync stalls, capture regressions), and config drift.
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6941
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。