auditing-warehouse-view-health
Was er macht
Dieser Skill liefert einen projektweiten Check deiner materialisierten Views. Er zeigt, welche fehlschlagen und welche Kosten verursachen, ohne genutzt zu werden. Er richtet sich an Menschen, die ein PostHog-Data-Warehouse verwalten.
Wann du ihn nutzt
- ✓Wenn du wissen willst, welche deiner materialisierten Views kaputt sind.
- ✓Wenn du vermutest, dass manche Views Speicher oder Rechenleistung nutzen, die niemand braucht.
- ✓Wenn ein Dashboard auf einer materialisierten View veraltet ist oder Fehler zeigt.
Link zum Skill
https://github.com/PostHog/posthog/blob/master/products/data_warehouse/skills/auditing-warehouse-view-health/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Welche meiner materialisierten Views sind kaputt, und verschwenden einige davon Rechenleistung?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill holt eine einzige Liste aller fehlgeschlagenen und beeinträchtigten Elemente über die gesamte Pipeline. Danach prüft er, welche materialisierten Views ungenutzt oder veraltet sind.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Auditing data warehouse view health
This skill produces a project-wide audit of materialized views (materialized saved queries) in the data warehouse — which ones are failing, and which are materialized but unused. Use it when the user wants a summary of view health, not a deep-dive on one failure.
The same underlying endpoint (data-warehouse-data-health-issues-retrieve) also reports source, sync, batch-export,
and transformation issues. Source and sync health is covered by auditing-warehouse-source-health. Destinations
(batch exports) and transformations are owned by other products — surface them if they appear, but route them to the
relevant team rather than diagnosing here.
When to use this skill
- "Which of my views are broken?" / "Why is this materialized view failing?"
- "Are any of my materialized views wasting compute?"
- Reviewing view health after a HogQL or schema change
- Dashboards backed by materialized views are stale or erroring
Available tools
| Tool | Purpose |
|---|---|
data-warehouse-data-health-issues-retrieve |
One-shot: all failed/degraded items across the whole pipeline |
view-list |
All saved queries / materialized views with status and latest_error |
view-run-history |
Run history for a specific materialized view |
warehouse-suggestions-list |
PostHog's open deprecate / materialize / certify suggestions, if any |
Filter the data-health-issues results to the materialized_view type for this audit. Use view-list when you need
more than the active-failure summary (non-failing views, materialization flags, last-queried info) and
view-run-history to see the run trail for a specific view.
What counts as a view "issue"
From the data-health endpoint, this audit cares about one of the five categories:
type |
Trigger | Typical urgency |
|---|---|---|
materialized_view |
DataWarehouseSavedQuery.is_materialized=true, status=Failed |
Medium |
Each entry includes id, name, type, status, error, failed_at, and url.
The other categories the endpoint returns are out of scope for this skill:
source/external_data_sync→auditing-warehouse-source-healthdestination(batch export) → owned by the batch exports / data pipelines producttransformation(HogFunction) → owned by the CDP / ingestion side
Note the data-health endpoint only reports active failures. For views it doesn't flag:
- Non-materialized views with errors (only materialized views are reported)
- Materialized views that are healthy but unused (costing compute every run) — see Step 4
Workflow
Step 1 — One-shot pull
Call data-warehouse-data-health-issues-retrieve and keep the materialized_view entries.
If there are no view issues, tell the user their materialized views are healthy and stop. Don't invent problems.
Step 2 — Triage failures
Materialized view failures are usually independent of sources — a view failure is a HogQL or data issue in the view
itself (syntax error, missing table reference, type mismatch). For each failing view, surface the error and point
at the offending query. Use view-run-history if the user wants the failure trail.
An error that starts with Not published: is not a query problem. The view's data quality checks failed and the
refresh was held back. Hand off to debugging-failed-data-quality-checks.
Step 3 — Present the audit
Render a prioritized report. Don't dump the raw JSON — human-readable:
## Materialized view health — 2 issues
### 🟠 Materialized views (2)
- monthly_revenue — view failed (syntax error in HogQL: 'FORM' instead of 'FROM')
- active_users_30d — view failed (missing table reference)
Both are HogQL issues in the view definitions — independent of your sources. Want me to open one?
Step 4 — Go beyond active failures (when asked)
Start from PostHog's suggestions if the warehouse-suggestions-* tools are available. Call
warehouse-suggestions-list with status=proposed. Pos
Häufige Fragen
Repariert dieser Skill die Views?
Nein. Er erstellt eine Prüfung der fehlschlagenden und ungenutzten Views, damit du entscheiden kannst, was als Nächstes passiert.
Was ist mit Problemen bei der Quellsynchronisation?
Quell- und Synchronisationszustand deckt ein eigener Audit-Skill ab. Dieser Skill konzentriert sich auf materialisierte Views.
Was ist eine materialisierte View?
Eine gespeicherte Abfrage, deren Ergebnisse in einer physischen Tabelle liegen. Das kann schneller zu lesen sein, verbraucht aber Speicher.
Details
Originalbeschreibung des Autors
Audit the health of a PostHog project's materialized views (saved queries) — find every failed materialization and flag unused or stale materialized views that cost storage and compute. Use when the user asks "which of my views are broken?", "why is this materialized view failing?", "are any of my views wasting compute?", or wants a one-shot triage of view health. For source/sync health use `auditing-warehouse-source-health`.
repo: PostHog/posthog
Beliebtheit
- GitHub-Sterne
- 41k
- Platz im Ranking
- #6856
- Lizenz
- —
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
depot-ci
41kBringt deinem Agenten bei, Depot-CI-Workflows einzurichten, bestehende Workflows zu migrieren und Laufprotokolle auszuwerten.
depot-container-builds
41kHilft deinem Agenten, Docker-Images auf Depot-Remote-Buildern zu bauen, mit Multi-Plattform-Images, Registry-Push und Fehlerbehebung.
depot-github-runners
41kLässt deinen Agenten GitHub-Actions-Jobs auf Depot-Runnern laufen, mit passender Runner-Größe und Labels, und hilft bei Einrichtungsfehlern.
editing-agents-md
41kHilft deinem Agenten zu entscheiden, ob eine Regel in AGENTS.md oder CLAUDE.md gehört, und sie so zu formulieren, dass sie hält.
Ähnliche Skills
discrawl
394kLässt deinen Agenten ein gespeichertes lokales Archiv von Discord-Nachrichten durchsuchen und zusammenfassen, dessen Aktualität prüfen und Direktnachrichten lesen.
clickhouse-io
280kHilft deinem Agenten, Abfragen und Schemas in ClickHouse zu optimieren. Nutzt Best Practices für schnelle Analyse-Workloads. Ideal, wenn Auswertungen zu langsam laufen.
scientific-db-pubmed-database
280kHilft deinem Agenten, wissenschaftliche Artikel im biomedizinischen Bereich zu suchen. Nützlich für Recherchen mit speziellen medizinischen Informationen.