modeling-warehouse-foundations — Claude Code skill: setup guide
modeling-warehouse-foundations sets core guidelines for building PostHog data models via native HogQL views or an external dbt setup.
no license 172 installs ★ 101 updated 2026-10-24
npx skills add PostHog/ai-plugin --skill modeling-warehouse-foundations -a claude-codeWhat modeling-warehouse-foundations does
This skill guides the design of reusable analytical models in PostHog. It structures the choice between two paths: native PostHog views managed through HogQL tools (view-create and view-materialize) or an external dbt repository organized into staging and marts layers with schema tests.
Inside the native stack, unaliased fields or SELECT * trigger immediate failures on posthog:view-create. The skill enforces explicit column aliasing, sets rules for choosing between person-level and group-level aggregation, and routes currency calculations through the built-in convertCurrency() function.
PostHog provides no internal dbt runner, so all dbt transformations must execute in an external CI pipeline or orchestrator.
What it helps with
- choose between native HogQL views and an external dbt repository
- author valid
posthog:view-createdefinitions with strict column aliases - set up physical materialization and
sync_frequencyfor heavy queries - handle monetary metrics using the native
convertCurrency()syntax
Example prompts for the agent
- Help me author a materialized view in PostHog for monthly active accounts
- Show me how to organize an external dbt repository targeting PostHog data
- Write a HogQL view query with explicit column aliases and currency conversion
How to install modeling-warehouse-foundations
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-warehouse-foundations -a claude-code2Manually: put the files in place
~/.claude/skills/modeling-warehouse-foundations/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/modeling-warehouse-foundations/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-warehouse-foundations -a codex2Manually: put the files in place
.agents/skills/modeling-warehouse-foundations/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-warehouse-foundations -a cursor2Manually: put the files in place
.cursor/skills/modeling-warehouse-foundations/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install PostHog/ai-plugin skills/modeling-warehouse-foundations2Manually: put the files in place
.github/skills/modeling-warehouse-foundations/SKILL.md1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-warehouse-foundations -a gemini-cli2Platform CLI
gemini skills install https://github.com/PostHog/ai-plugin --path skills/modeling-warehouse-foundationsManually: put the files in place
.devin/skills/modeling-warehouse-foundations/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-warehouse-foundations -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 modeling-warehouse-foundations
How to install modeling-warehouse-foundations in Claude Code?
Run npx skills add PostHog/ai-plugin --skill modeling-warehouse-foundations -a claude-code in your terminal.
What does modeling-warehouse-foundations do?
It provides foundational modeling standards for PostHog, covering HogQL view materialization, column aliasing rules, and dbt project skeletons.
Can dbt run natively inside PostHog?
No. PostHog has no built-in dbt runtime, meaning models must run in your own CI or scheduler against the warehouse.