auditing-endpoints
What it does
This skill checks all the endpoints in a PostHog project and gives a prioritized report of what to clean up. It is for people who manage many endpoints and want to reduce clutter and cost.
When to use it
- ✓When you want to know which endpoints you can delete or clean up.
- ✓When you are taking over a PostHog project and want to see what endpoints it already has.
- ✓When endpoints have been running for a long time and you want a periodic review.
Skill link
https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/auditing-endpoints/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Audit my PostHog endpoints and tell me which ones I can clean up.”
5 new skills a week. 1 minute to read.
How it works
It uses the endpoint tools to find candidates such as failing materializations and unused materialized versions, then groups them into a report. It does not change anything.
Technical content (original SKILL.md)
Original text by the author, straight from 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 |
FAQ
Does this skill delete any endpoints?
No. It only reports what it finds, so you decide what to remove.
What is a materialized endpoint version?
It is a stored copy of an endpoint's results, which can cost storage and compute even when no one calls it.
How do I see how often an endpoint is called?
The skill suggests querying the query log for call frequency and recency, since each version shows its last run time.
Details
Original description by the author
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
Popularity
- GitHub stars
- 41k
- Ranking position
- #6857
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-container-builds
41kHelps your agent build Docker images on Depot's remote builders, including multi-platform images, pushing to registries, and fixing build failures.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
Similar skills
discrawl
394kLets your agent search and summarize a saved local archive of Discord messages, check how fresh it is, and read direct messages.
clickhouse-io
280kHelps your agent optimize queries and schemas in ClickHouse databases. It applies best practices for high-performance analytical workloads. Use when analytical queries are too slow.
scientific-db-pubmed-database
280kHelps your agent search for scientific articles in the biomedical field. It's useful for research needing specific medical information.