auditing-warehouse-view-health — Claude Code skill: PostHog view audit
auditing-warehouse-view-health runs a project-wide check on PostHog materialized views: lists the ones that failed to refresh and points at materialized views nobody queries.
no license 204 installs ★ 101 updated 2026-10-24
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a claude-codeWhat auditing-warehouse-view-health does
Point the skill at a PostHog project and it pulls the warehouse data-health endpoint, keeping only entries of type materialized_view. Each failure comes back as a short line: view name, error text, when it broke, plus a link. Nothing broken means the answer is that views are fine, and the skill stops there instead of padding the report.
Most causes sit inside the view definition. A typo in HogQL, a table that no longer exists, a type mismatch. Ask for the trail and it reads view-run-history for that one view. One exception: an error starting with Not published: comes from failed data-quality checks rather than the query, so it belongs to debugging-failed-data-quality-checks.
A wider sweep is opt-in. With warehouse-suggestions-list and view-list the skill surfaces views marked materialized that nobody reads, which keep refreshing and keep costing compute. Nothing changes during the audit itself: unmaterializing through view-unmaterialize or editing a query waits for your explicit go-ahead.
What it helps with
- list every materialized view that failed to refresh
- trace why one view keeps erroring
- find materialized views with no readers still burning compute
- recheck view health after a schema or HogQL edit
- explain a dashboard that errors because its view is stale
Example prompts for the agent
- Which materialized views are broken right now?
- Why does
monthly_revenuekeep failing? Run the audit. - Any views that nobody reads and still cost us compute?
How to install auditing-warehouse-view-health
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a claude-code2Manually: put the files in place
~/.claude/skills/auditing-warehouse-view-health/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/auditing-warehouse-view-health/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a codex2Manually: put the files in place
.agents/skills/auditing-warehouse-view-health/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a cursor2Manually: put the files in place
.cursor/skills/auditing-warehouse-view-health/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install PostHog/ai-plugin skills/auditing-warehouse-view-health2Manually: put the files in place
.github/skills/auditing-warehouse-view-health/SKILL.md1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a gemini-cli2Platform CLI
gemini skills install https://github.com/PostHog/ai-plugin --path skills/auditing-warehouse-view-healthManually: put the files in place
.devin/skills/auditing-warehouse-view-health/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about auditing-warehouse-view-health
How do I install auditing-warehouse-view-health in Claude Code?
Run npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a claude-code. The skill file lands at ~/.claude/skills/auditing-warehouse-view-health/SKILL.md.
What does auditing-warehouse-view-health do?
It audits materialized views across a PostHog project and reports what is failing, with the error and the failure time. On a broader request it also flags views that are materialized but unread.
How does it differ from auditing-warehouse-source-health?
That skill covers sources and syncs; this one covers materialized views. Both sit on the same data-health endpoint, but the problem types and the follow-up steps differ.