跳到正文
Skillpedia
数据库41k · #6857

auditing-endpoints

它能做什么

本技能检查 PostHog 项目中的所有端点,并给出按优先级排列的清理报告。适合管理大量端点、希望减少杂乱和成本的人。

适用场景

  • ✓当你想知道哪些端点可以删除或清理时。
  • ✓当你接手一个 PostHog 项目,想查看它已有哪些端点的时候。
  • ✓当端点已长期运行,你想进行定期检查的时候。

技能链接

https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/auditing-endpoints/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/auditing-endpoints/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请审计我的 PostHog 端点,告诉我哪些可以清理。”

每周 5 个新技能,1 分钟读完。

工作原理

它使用端点工具查找候选项,例如物化失败的端点和未使用的物化版本,然后将它们归类到报告中。它不会更改任何内容。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Auditing endpoints

This skill produces a project-wide audit of the Endpoints product. Use it when the user wants to find what to clean up — unused endpoints, failing materialisations, materialised versions that nobody calls any more. It does not modify anything; it reports.

The deeper investigation per endpoint is diagnosing-endpoint-performance. The audit's job is to find candidates and hand off.

When to use this skill

  • "Audit my endpoints" / "What endpoints can I clean up?"
  • The user is taking over a project and wants to know what they've inherited
  • A periodic review (monthly / quarterly) of endpoint sprawl
  • The user is over a materialisation cost budget and wants to know what to disable

The dedicated tools give a fast endpoint-level view. For call frequency, recency, and cost over time, query the query_log table with execute-sql (endpoint-level). Per-version recency comes from endpoint-versions — each version carries its own last_executed_at.

Available tools

Tool What it's for
execute-sql (HogQL) Primary read path. Query system.data_modeling_endpoints for metadata (name, is_active, current_version, derived_from_insight, last_executed_at) and query_log for endpoint-level usage (call counts, recency, duration, bytes)
endpoint-materialization-status Per endpoint: is materialisation eligible, current status, last run, last error (not in the system tables — use this tool)
endpoint-versions All versions for one endpoint, latest first, with each version's query, materialisation state, and last_executed_at
endpoint-update Write path — disable (is_active: false) or unmaterialise (is_materialized: false) after the user confirms
agent-feedback Tell the PostHog team what's missing or confusing in this flow so the product and skill improve

Prefer reading from the system tables over the endpoints-get-all / endpoint-get tools — one SQL query returns the whole inventory and lets you join metadata to usage in query_log.

What counts as an issue

Category Trigger Typical action
Never called No rows in query_log for the endpoint (personal-API-key calls only) Confirm with the user, then disable
Stale query_log shows the last call more than 30 days ago Confirm with the user; often safe to disable
Inactive is_active = 0 in system.data_modeling_endpoints Verify intent; if abandoned, delete
Failing materialisation endpoint-materialization-status returns Failed with an error Hand off to diagnosing-endpoint-performance
Unused materialised version A materialised version whose last_executed_at (from endpoint-versions) is null or long stale Unmaterialise that version, or roll to a newer one
Drifted versions Many versions exist (query
常见问题

这项技能会删除任何端点吗?

不会。它只报告发现的问题,由你决定删除哪些。

什么是物化端点版本?

它是端点结果的已存储副本,即使无人调用,也可能产生存储和计算费用。

我如何查看端点被调用的频率?

本技能建议查询查询日志,以了解调用频率和最近时间,因为每个版本都会显示其最后一次运行时间。

详情

作者的原始描述

Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks "what endpoints can I clean up?", "are any of my endpoints broken?", "which materialised versions are still being called?", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.

repo: PostHog/posthog

热度

GitHub 星标
41k
排名
#6857
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能