modeling-dimension-tables — Claude Code skill: how to install
modeling-dimension-tables builds star-schema dimension tables in PostHog HogQL views or dbt projects so you avoid repetitive joins across your metrics.
no license 174 installs ★ 101 updated 2026-10-24
npx skills add PostHog/ai-plugin --skill modeling-dimension-tables -a claude-codeWhat modeling-dimension-tables does
This skill guides the design of reusable lookup tables such as countries, plans, dates, and regions. The workflow follows three steps: sourcing records from seeds, syncs, or tracked events; structuring an aliased view with strictly one row per entity; and linking it to fact tables or persons via saved joins.
A key requirement in PostHog is relying on the built-in convertCurrency() function instead of generating manual FX rate tables. When pulling dimension values out of HogQL event streams, missing properties must be filtered with isNotNull(...) because empty checks alone leave blank keys that corrupt subsequent joins.
Static lookup views are set to slow materialization intervals like 7 or 30 days. You should review modeling-warehouse-foundations before running this, as downstream models for revenue, conversions, and usage rely directly on these dimensions.
What it helps with
- build reusable star-schema dimension models in PostHog or dbt
- extract entity lookups from event streams without null key leakage
- link descriptive attributes to facts via saved or person joins
- prevent query fan-outs caused by duplicate dimension primary keys
Example prompts for the agent
- Create a
dim_countryview in PostHog derived from event properties with deduplication - Generate a dbt dimension model for subscription plans with unique and not-null tests
- Show how to connect a region lookup to the persons table using a saved join
How to install modeling-dimension-tables
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-dimension-tables -a claude-code2Manually: put the files in place
~/.claude/skills/modeling-dimension-tables/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/modeling-dimension-tables/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-dimension-tables -a codex2Manually: put the files in place
.agents/skills/modeling-dimension-tables/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-dimension-tables -a cursor2Manually: put the files in place
.cursor/skills/modeling-dimension-tables/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install PostHog/ai-plugin skills/modeling-dimension-tables2Manually: put the files in place
.github/skills/modeling-dimension-tables/SKILL.md1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-dimension-tables -a gemini-cli2Platform CLI
gemini skills install https://github.com/PostHog/ai-plugin --path skills/modeling-dimension-tablesManually: put the files in place
.devin/skills/modeling-dimension-tables/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill modeling-dimension-tables -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-dimension-tables
How do I install modeling-dimension-tables in Claude Code?
Run npx skills add PostHog/ai-plugin --skill modeling-dimension-tables -a claude-code.
What does modeling-dimension-tables do?
It creates conformed dimension views for star schemas in PostHog or dbt, letting analytics queries reference descriptive attributes without manual joins.
Should I build a custom currency exchange dimension?
Not in PostHog, because the platform provides historical conversion rates directly through convertCurrency(). Custom currency dimensions are reserved for dbt or unsupported rate providers.