reviewing-warehouse-suggestions
它能做什么
这项技能让智能体审阅 PostHog 每天针对数据仓库视图和表提出的建议。适合想决定保存、停用或标记哪些视图为可信视图的人。
适用场景
- ✓当你想了解 PostHog 为你的数据仓库提出了哪些建议的时候。
- ✓当你想弄清楚某个视图为什么应该被保存或停用的时候。
- ✓当你想接受、忽略或分配某条数据仓库建议的时候。
技能链接
https://github.com/PostHog/posthog/blob/master/products/warehouse_suggestions/skills/reviewing-warehouse-suggestions/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“PostHog 今天为我的数据仓库提出了哪些建议?请解释排在前面的几条,并告诉我是否值得接受。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会按优先级列出待处理的建议,并根据 PostHog 背后的数据逐条解释。如果你要求,它还可以更改刷新设置,然后接受、忽略或分配该建议。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Reviewing warehouse suggestions
PostHog computes warehouse suggestions every day from how the project reads its views and tables.
Each suggestion is about one view or table.
Its payload holds everything that accepting it would create or change.
1. Find the suggestions
Call warehouse-suggestions-list with status=proposed.
The results come in priority order, so start at the top.
If the list is empty, call warehouse-suggestions-status: it says whether suggestions are turned off, still collecting read history, or not eligible.
Call warehouse-suggestions-get for a suggestion the user wants to discuss.
Its evidence has the read counts behind it.
2. Explain it with its own numbers
Tell the user what accepting does and what it costs, using the payload fields. Do not invent a score or a confidence level.
- materialize: the view is computed often enough that storing its result saves compute.
- A view that is not stored is computed on every read, and again on every refresh of each materialized view that reads it.
recomputed_by_viewscounts those materialized views. When it is above 0, the saving comes mostly from their refreshes, not from people's reads. saves_seconds_per_monthandsaves_bytes_per_monthare what those computations stop costing.- Materializing adds a recurring refresh cost, which these numbers already subtract.
freshness_today_secondsandfreshness_after_secondssay how old the data can be now and after.refresh_interval_secondsis the proposed interval.refresh_interval_basissays what kept it from being shorter:source_sync(the sources sync no faster),fastest_schedule(PostHog refreshes views no more often),read_rate(people read the view no more often),consumer_refresh(the materialized views that read it refresh no more often) orsavings(a shorter interval costs more than it saves).refresh_modeisincrementalwhen each refresh can read only new rows, byincremental_key, and update rows byunique_key. Otherwise it isfull, and each refresh rebuilds the whole table.
- A view that is not stored is computed on every read, and again on every refresh of each materialized view that reads it.
- unmaterialize: this materialized view is read so rarely that refreshing it costs more than computing it on each read.
refresh_seconds_per_monthandrefresh_bytes_per_monthare what its refreshes cost now.live_seconds_per_monthandlive_bytes_per_monthestimate what its reads would cost if each one computed the view. The estimate uses a full refresh per read, so it leans high.read_secondsis how long one read would take afterwards. Nine in ten of its refreshes finished within this time. Tell the user that reads get slower by about this much, and that each read sees current data instead of the last refresh.- Accepting stops the refreshes and deletes the stored table. The view definition stays, so it can be materialized again later.
- A 409 on accept means the view changed since the suggestion was made, for example another view now reads from it. Explain the reason to the user and do not retry.
- certify: many people read this view or table, from several places. Use the read counts in
evidence. - deprecate: nobody reads this materialized view, but it still refreshes.
refresh_seconds_per_monthandrefresh_bytes_per_monthare that cost. Accepting marks it deprecated in the data catalog, stops its refreshes and deletes its stored table. The view definition stays, so it can be materialized again later. To keep it refreshing, passkeep_materialized: true. After accepting,created_asset.stopped_materializationsays whether the refreshes stopped: they keep running when other views read from it or its refreshes feed person properties, a destination or a workflow.
3. Change a materialize suggestion before accepting
The payload is a starting point. To change it, pass the payload field with the same name to the accept tool. An omitted field keeps the suggested value.
- Another interval: pass
refresh_interval_seconds. - Full instead of incremental, or the reverse: pass
refresh_mode. - Other keys:
- Read the view's query with
view-get. - Call
view-check-incrementalwith that query, plus theincremental_keyandunique_keythe user wants. Without keys it listskey_candidatesandunique_key_candidates. - Accept with those keys only when the check returns
eligible: true. Otherwise explain theblockersto the user.
- Read the view's query with
- Late rows: pass
lookback_secondsso each refresh read
常见问题
智能体会编造评分吗?
不会。它只会根据 PostHog 提供的数字来解释每条建议。
保存视图是什么意思?
保存视图会保留其结果,避免每次都重新计算,这能节省计算资源,但会产生定期刷新的成本。
如果建议列表是空的怎么办?
智能体会检查建议功能是否已关闭,或者是否仍在收集读取历史。
详情
作者的原始描述
Reviews PostHog's warehouse suggestions with a person and acts on them. Explains why a view should be materialized, unmaterialized, certified or deprecated using the numbers in the suggestion, changes a materialize suggestion's refresh mode, keys or interval when the person wants something else, then accepts, dismisses or assigns it. Use when the user asks what PostHog suggests for their data warehouse, whether to materialize a view, why a view should refresh incrementally or every few hours, or wants to accept, change, dismiss or assign a warehouse suggestion.
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6972
- 许可证
- —
- 更新时间
- 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,并以不会让文件臃肿的方式写下,确保规则真正生效。