# auditing-warehouse-view-health

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 204 installs · ★ 101 repo stars
- Author: PostHog
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/auditing-warehouse-view-health/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/auditing-warehouse-view-health

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/auditing-warehouse-view-health/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/auditing-warehouse-view-health/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/auditing-warehouse-view-health/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/auditing-warehouse-view-health/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/auditing-warehouse-view-health
```

2. **Manually: put the files in place**
- File: `.github/skills/auditing-warehouse-view-health/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/ai-plugin --path skills/auditing-warehouse-view-health
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/auditing-warehouse-view-health/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill auditing-warehouse-view-health -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/auditing-warehouse-view-health/SKILL.md

## When to use it
- 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
- Which materialized views are broken right now?
- Why does `monthly_revenue` keep failing? Run the audit.
- Any views that nobody reads and still cost us compute?

## Similar
- [setting-up-a-data-warehouse-source](https://affpapa.org/en/nevibecode/skills/setting-up-a-data-warehouse-source.md) — skill · 405 installs
- [diagnosing-failed-warehouse-syncs](https://affpapa.org/en/nevibecode/skills/diagnosing-failed-warehouse-syncs.md) — skill · 401 installs
- [posthog](https://affpapa.org/en/nevibecode/plugins/posthog-inc-posthog.md) — plugin · ★ 8052 repo stars
- [seo-posthog](https://affpapa.org/en/nevibecode/skills/seo-posthog.md) — skill · 141 installs
- [posthog-webhooks-events](https://affpapa.org/en/nevibecode/skills/posthog-webhooks-events.md) — skill · 1 install
- [snowflake-expert](https://affpapa.org/en/nevibecode/skills/snowflake-expert.md) — skill · 239 installs

From the same set: [posthog/ai-plugin](https://affpapa.org/en/nevibecode/by/posthog/ai-plugin.md) — 82 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
