modeling-warehouse-foundations
Skill by PostHog
Guides an assistant to build reusable data models in PostHog, either as PostHog-native views or as an external dbt project. Written for teams deciding between the two stacks and modeling metrics and dimensions.
Install modeling-warehouse-foundations
Built from the published package, never by AI.
git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.claude/skills && cp -r /tmp/posthog/products/data_modeling/skills/modeling-warehouse-foundations ~/.claude/skills/modeling-warehouse-foundationsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install modeling-warehouse-foundations in Claude Code
git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/posthog/products/data_modeling/skills/modeling-warehouse-foundations ~/.gemini/antigravity-cli/skills/modeling-warehouse-foundationsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install modeling-warehouse-foundations in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
modeling-warehouse-foundations is an agent skill from PostHog for turning a metric definition into a durable, reusable model. It covers two stacks: PostHog-native data-warehouse views and materialized views built with HogQL through the view-* MCP tools, and an external dbt project with sources.yml, staging and marts models, and schema tests.
The skill sets shared rules before modeling. These include aliasing every column in a view, choosing a person or group aggregation unit, and checking the semantic layer for an existing definition. It also covers joins, star-schema dimensions, convertCurrency() for money, and registering models in the data catalog. It is shared groundwork for the domain modeling skills on revenue, conversion, activation, product usage, and dimension tables.
Written from the project's SKILL.md and checked against it.
What it can do
- posthog:view-createCreates a PostHog saved query (view) from HogQL. Columns must be aliased.
- posthog:view-materializeMaterializes a view into a physical table with a sync schedule.
- Stack choiceHelps decide between a PostHog-native view and an external dbt model for each model.
- dbt project skeletonProvides starter files: dbt_project.yml, sources.yml, a staging model, a mart, and schema.yml.
- Joins and currencyExplains saved joins, person joins, and convertCurrency() for converting money amounts.
- Data catalog registrationCovers checking and annotating models so other models can find and reuse them.
What you need
- Access to the PostHog view-* MCP tools
- A data source in PostHog or a connected warehouse
- Your own scheduler or CI to run dbt, for the dbt path
Try asking
- Should I build this metric as a PostHog view or a dbt model?
- Create a materialized view of monthly active users by plan.
- Set up a dbt project skeleton with sources.yml and a staging model.
Good to know
- dbt is not integrated into PostHog. dbt runs externally.
- Views reject SELECT * and unaliased columns.
- PostHog's standalone Revenue analytics dashboard is being retired, around 2026-06-30.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: products/data_modeling/skills/modeling-warehouse-foundations/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
references/dbt-project.md4 KB -
references/dbt-skeleton/dbt_project.yml741 B -
references/dbt-skeleton/models/marts/fct_daily_active_users.sql396 B -
references/dbt-skeleton/models/marts/schema.yml981 B
Show all 10 files
-
references/dbt-skeleton/models/staging/_sources.yml1 KB -
references/dbt-skeleton/models/staging/stg_events.sql637 B -
references/governance.md3 KB -
references/joins-and-dimensions.md3 KB -
references/posthog-views.md6 KB
Alternatives to modeling-warehouse-foundations
All alternatives →Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.
Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.
Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.
Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.
Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.
Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.
Compare with kaggle-cli, bigquery-bigframes or data-loading
modeling-warehouse-foundations: common questions
Should I use a PostHog view or dbt?
The skill says to pick one stack per model. PostHog-native views suit data already in PostHog, while dbt suits teams that already run dbt or need multi-step lineage and tests.
Does PostHog have a native dbt connector?
No. The source says there is no PostHog dbt connector, so dbt runs outside PostHog.
Why does my PostHog view fail to create?
The most common cause is SELECT * or an unaliased column. Alias each column, for example SELECT toStartOfMonth(timestamp) AS month.
How do I install modeling-warehouse-foundations?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is modeling-warehouse-foundations free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is modeling-warehouse-foundations safe to use?
It scores 88 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to modeling-warehouse-foundations?
Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.
