modeling-warehouse-foundations

modeling-warehouse-foundations is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 231 tokens per session (1,786 once invoked), scanned A, original, MIT.

A foundation guide for turning metric definitions into reusable data models. A model is a named, queryable object that stores a definition once so dashboards, analyses, and other models can reuse it.

In plain words
What is it for?
Use it to plan and build saved or materialized PostHog queries, or dbt models with staging, marts, and schema tests.
Why use it?
It prevents teams from calculating the same metric in slightly different ways. It also helps choose between PostHog views and dbt models based on where the data and existing workflows live.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to plan and build saved or materialized PostHog queries, or dbt models with staging, marts, and schema tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/modeling-warehouse-foundations
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PostHog/posthog-foss --skill modeling-warehouse-foundations
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for modeling-warehouse-foundations

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/modeling-warehouse-foundations/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/modeling-warehouse-foundations)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/modeling-warehouse-foundations"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/modeling-warehouse-foundations/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for modeling-warehouse-foundations

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/modeling-warehouse-foundations"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/modeling-warehouse-foundations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 231 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,786 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Prompt Injection · line 25
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 86
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00231 $0.01786
Opus 5 $0.00115 $0.00893
Sonnet 5 $0.00046 $0.00357
Haiku 4.5 $0.00023 $0.00179

Measured 7d ago against content hash e16d7f6c790d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

modeling-warehouse-foundations scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

products/data_modeling/skills/modeling-warehouse-foundations/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Modeling warehouse foundations

Everything the domain modeling skills (revenue, conversion, activation, product usage, dimension tables) share: how to turn a metric definition into a durable, reusable model on one of two stacks. Read the relevant reference on demand — this entry point is a map, not the whole story.

A "model" here is a named, queryable object that encodes a metric or dimension once so every insight, dashboard, and downstream model reuses the same definition instead of re-deriving it. Two ways to build one:

Stack What a model is Build with Best when
PostHog-native A saved query (view), optionally materialized into a physical table posthog:view-createposthog:view-materialize (HogQL) Data already lives in PostHog (events, persons, or a connected warehouse source); you want it usable in insights/dashboards/SQL with no extra infra.
dbt / external A dbt model (.sql) in staging/marts/, tested via schema.yml dbt, run in the user's own scheduler/CI The team already runs dbt, needs multi-step lineage/tests/CI, or models data that lives outside PostHog.

Pick one per model; you can run both stacks side by side across a project. Details: references/posthog-views.md and references/dbt-project.md.

Rules before you model (these bite hardest)

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 101 lines · 231 tokens per session scan A e16d7f6c790d

Subscribe to this mod's changes

modeling-warehouse-foundations is a skill published in the GitHub repository PostHog/posthog-foss (715 stars, last pushed today), licensed MIT. It adds 231 tokens to every session and 1,786 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

create-pr

Creates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative description for prisma-next. Use when the user wants to create a pull request, open a PR, or submit changes for review.

prisma/orm · 47 tokens

schema-exploration

Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.

langchain-ai/deepagents · 57 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

supabase

Supabase / PostgREST Row-Level-Security playbook — pull the anon (or leaked servicerole) key out of the frontend JS, map tables from the auto-generated OpenAPI spec, test anonymous RLS READ disclosures (PII/secret leaks), and anonymous RLS WRITE abuse (insert/update/delete — e.g. forging…

PentesterFlow/agent · 120 tokens

nornicdb-cypher-queries

Pick fast, predictable Cypher query shapes in NornicDB — point lookups, batch retrieval, pagination, search, traversal, batched UNWIND/MERGE writes, cleanup, multi-tenant isolation. Use when writing or reviewing Cypher whose latency or throughput matters; maps user intent to the executor's hot-path query templates.

orneryd/NornicDB · 79 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…

awslabs/agent-plugins · 229 tokens