Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add PostHog/ai-plugin --skill modeling-dimension-tables -a claude-code
Open on GitHub

What 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_country view 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-code

2Manually: put the files in place

~/.claude/skills/modeling-dimension-tables/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/modeling-dimension-tables/

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.

Similar skills

All skills for Data and databases →

From the same set82

The whole set →
modeling-conversion-metrics modeling-conversion-metrics builds a reusable conversion model: funnel steps, a conversion window, drop-off and time to convert. Works on PostHog warehouse views in HogQL or in a dbt project. CX Codex +1 178installs writing-streamlit-apps The writing-streamlit-apps skill guides Python code for Streamlit apps that read PostHog data inside a sandbox. Use it when building or debugging dashboards with tables and charts. CX Codex +1 177installs modeling-revenue-metrics modeling-revenue-metrics builds reusable revenue models for MRR, ARR, churn, ARPU and LTV from PostHog views or dbt. Use it for revenue analysis by customer, product or period. CX Codex +1 175installs modeling-product-usage-metrics modeling-product-usage-metrics builds retention, frequency, and lifecycle models using PostHog HogQL views or dbt data marts with built-in tests. CX Codex +1 175installs modeling-warehouse-foundations modeling-warehouse-foundations sets core guidelines for building PostHog data models via native HogQL views or an external dbt setup. CX Codex +1 172installs instrument-metrics The instrument-metrics Claude Code skill adds PostHog metric capture to a codebase. It runs after feature work or PR review, and when a request calls for counters or other metrics. CX Codex +1 154installs debugging-experiments debugging-experiments — a Claude Code skill for investigating PostHog experiment results. It checks uneven or missing exposures against the experiment’s data and known causes. CX Codex +1 150installs context-layer-health-check The context-layer-health-check Claude Code skill checks a context wiki after changes are consolidated. It triages missed entries, conflicting claims, and outdated priorities. CX Codex +1 150installs

Project sponsors

Companies that keep this analytics open