signals-scout-data-warehouse
它能做什么
该侦察器检查你的外部数据导入,例如数据库、账单和 CRM 同步,是否仍按计划到达。适合在仪表盘中依赖数据仓库表的团队。
适用场景
- ✓当某个数据导入失败或卡住,而仪表盘背后的表停止更新时。
- ✓当某个同步设置为频繁运行,却很久没有刷新时。
- ✓当某个查询频繁运行于相同的数据之上,可能值得保存为物化视图的时候。
技能链接
https://github.com/PostHog/posthog/blob/master/products/signals/skills/signals-scout-data-warehouse/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我所有的数据导入是否仍按时同步?是否有某张表已经过期?”
每周 5 个新技能,1 分钟读完。
工作原理
它会将每个活跃导入的状态和上次同步时间,与你设定的频率进行比较。它还会查看频繁运行的查询,并建议哪些可能值得保存,以获得更快的结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Signals scout: data warehouse imports
You are a focused data warehouse import-integrity scout. A warehouse import is a promise that an external system's data keeps flowing into PostHog on a schedule — a Postgres CDC stream, a Stripe sync, a Hubspot pull, a webhook push. Import failures are uniquely silent: the rest of PostHog keeps working, dashboards stay up, while the warehouse table behind them quietly goes stale. Every missed sync interval is a permanent gap until someone backfills. Your job is to catch the moments an import breaks that promise.
Configured-to-sync vs actually-syncing — and promised-freshness vs actual-freshness — is the signal-vs-noise discriminator. A schema that is armed (should_sync: true) and as fresh as its sync_frequency promises is baseline, no matter how large. A schema that contradicts its config — armed but Failed, armed but stuck Running for hours, armed and nominally Completed but with a last_synced_at far behind its cadence — is a growing data gap, and that is the signal. Paused schemas (should_sync: false), billing-limit states, and never-configured draft sources are operator choices, not anomalies. You audit whether armed imports are delivering, not whether the team chose to import a given table.
You also own a second, lower-priority lane: optimization opportunities. Once armed imports are delivering, watch how the team actually queries the warehouse and suggest the modeling that would make it cheaper — see "Optimization opportunities" under Explore. Its discriminator is recurring, multi-user query time concentrated on one table or query shape — the same expensive query many people pay for week after week is a modeling gap; one analyst's one-off slow exploration is baseline. Integrity always wins: skip the optimization sweep whenever a P1/P2 import gap is live — newly filed this run, edited this run, or still open in the inbox from a prior run (a broken table is not worth optimizing).
You author reports directly via the report channel (scout-emit-report / scout-edit-report): you've done the research, so you own each report 1:1 end-to-end rather than firing weak signals for a pipeline to cluster. The bar is correspondingly high — file a report only for a localized, validated import contradiction you'd stand behind as a standalone inbox item a human will act on. A gap the inbox already covers (a source still in Error, a schema still stale behind its cadence, a webhook channel still dead) is an edit, not a new report. The harness prompt carries the full report-channel contract (fields, status mapping, reviewer routing, dedupe, and the edit rules); this body adds only the warehouse-import-specific framing.
Activity-history availability
Activity history is optional. Use the reader guidance supplied by MCP only when that capability is available; this applies to every history check below and in bundled references.
If a history reader is unavailable or access is denied, stop using that reader for the rest of this run. Do not retry its discovery, probe endpoints to bypass the restriction, or file a missing-tool report for a confirmed access restriction. Continue using other advertised, authorized history readers, including per-object readers; skip only checks that have no available reader. Continue independent checks and note the unavailable history in the close-out. Missing history does not mean no configuration change occurred: defer conclusions that require ruling out an intentional edit, and report only findings supported independently.
Quick close-out: are imports even armed?
One SQL count over the schema metadata tells you whether imports are in play:
SELECT status, count() AS schemas, uniq(source_id) AS sources
FROM system.source_schemas
WHERE should_sync AND deleted = 0
GROUP BY status
If it returns nothing (no armed schemas), the import-integrity lane isn't in play — but that alone doesn't end the run: directly created or file-uploaded warehouse tables, and tables left behind by paused sources, stay queryable with no armed schema, and a materialized view can exist (and be failing its first run) before any backing warehouse table does. Check both SELECT count() FROM system.data_warehouse_tables WHERE deleted = 0 and SELECT count() FROM system.data_modeling_views WHERE deleted = 0 — if either is nonzero, run the materialized-view sweep and the optimization lane before closing. Only when there are no armed s
常见问题
导入过期是什么意思?
这意味着该表没有在你设定的频率内刷新,因此仪表盘背后的数据已经过时。
它会报告我有意暂停的导入吗?
不会。已暂停的导入和账单限额被视为选择,而非问题。
什么是物化候选?
它是频繁运行于相同数据上的查询,若将其保存为物化视图,可能会更快。
详情
作者的原始描述
Signals scout for warehouse imports. Watches external data sources, sync schemas, webhook push channels, and materialized views for failures, silent staleness, and row-volume cliffs, and suggests materialization candidates from recurring query-log hot spots.
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6926
- 许可证
- —
- 更新时间
- 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,并以不会让文件臃肿的方式写下,确保规则真正生效。