auditing-endpoints
Skill này làm gì
Skill này kiểm tra mọi endpoint trong một dự án PostHog và đưa ra báo cáo ưu tiên về những gì cần dọn dẹp. Nó dành cho người quản lý nhiều endpoint và muốn giảm sự lộn xộn cũng như chi phí.
Khi nào nên dùng
- ✓Khi bạn muốn biết endpoint nào có thể xóa hoặc dọn dẹp.
- ✓Khi bạn tiếp nhận một dự án PostHog và muốn xem những endpoint nào đã có sẵn.
- ✓Khi các endpoint đã chạy lâu và bạn muốn rà soát định kỳ.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/auditing-endpoints/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm toán các endpoint PostHog của tôi và cho tôi biết cái nào tôi có thể dọn dẹp.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill dùng các công cụ endpoint để tìm các ứng viên, như những lần materialize lỗi và các phiên bản materialized không dùng, rồi nhóm chúng thành báo cáo. Skill không thay đổi gì.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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 |
Câu hỏi thường gặp
Skill này có xóa endpoint nào không?
Không. Nó chỉ báo cáo những gì tìm thấy, nên bạn quyết định cái nào sẽ bị xóa.
Phiên bản endpoint materialized là gì?
Đó là một bản sao được lưu trữ kết quả của endpoint, có thể tốn bộ nhớ và tài nguyên tính toán ngay cả khi không ai gọi nó.
Làm sao để xem endpoint được gọi thường xuyên đến mức nào?
Skill gợi ý truy vấn nhật ký truy vấn để xem tần suất và độ mới gần đây, vì mỗi phiên bản hiển thị thời điểm chạy cuối cùng.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6857
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
depot-ci
41kGiúp agent của bạn thiết lập và chạy quy trình Depot CI, một lựa chọn thay thế GitHub Actions, gồm chuyển các quy trình hiện có và đọc nhật ký chạy.
depot-container-builds
41kGiúp agent của bạn build image Docker trên các builder từ xa của Depot, gồm image đa nền tảng, đẩy lên registry và sửa lỗi build.
depot-github-runners
41kGiúp agent của bạn chuyển các job GitHub Actions sang runner do Depot quản lý, chọn kích thước và nhãn runner, và xử lý lỗi thiết lập runner.
editing-agents-md
41kGiúp agent của bạn quyết định một quy tắc nên nằm trong file AGENTS.md hay CLAUDE.md, và viết sao cho quy tắc được tuân thủ mà file không bị phình to.
Skill tương tự
discrawl
394kCho phép agent của bạn tìm kiếm và tóm tắt kho lưu trữ tin nhắn Discord trên máy, kiểm tra độ mới của dữ liệu và đọc tin nhắn trực tiếp.
clickhouse-io
280kGiúp agent của bạn tối ưu truy vấn và schema trong ClickHouse theo thực hành tốt nhất cho phân tích dữ liệu hiệu năng cao khi truy vấn chậm.
scientific-db-pubmed-database
280kGiúp agent của bạn tìm bài báo khoa học trong lĩnh vực y sinh. Hữu ích cho nghiên cứu cần thông tin y khoa cụ thể.