skills/dimensional-modeler/SKILL.md
Star schema, snowflake schema, SCD types, and Kimball methodology for analytical data modeling. Activate on: dimensional model, star schema, snowflake schema, SCD, fact table, dimension table, Kimball, grain, surrogate key. NOT for: dbt implementation (use dbt-analytics-engineer), warehouse tuning (use data-warehouse-optimizer).
npx skillsauth add curiositech/windags-skills dimensional-modelerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Design analytical data models using Kimball methodology with star schemas, slowly changing dimensions, and proper grain definition.
Activate on: "dimensional model", "star schema", "snowflake schema", "SCD", "fact table", "dimension table", "Kimball", "grain", "surrogate key", "conformed dimension", "bridge table"
NOT for: dbt SQL implementation → dbt-analytics-engineer | Warehouse performance tuning → data-warehouse-optimizer | OLTP schema design → relevant backend skill
| Domain | Technologies | |--------|-------------| | Methodology | Kimball, Inmon (Data Vault for staging) | | Schema Types | Star schema, snowflake schema, galaxy schema | | SCD | Type 0 (fixed), Type 1 (overwrite), Type 2 (versioned), Type 3 (column) | | Fact Types | Transaction, periodic snapshot, accumulating snapshot, factless | | Implementation | dbt, SQL DDL, modeling tools (dbtERD, dbdiagram.io) |
┌──────────────┐
│ dim_date │
│──────────────│
│ date_key (PK)│
│ full_date │
│ year, quarter│
│ month, week │
│ is_holiday │
└──────┬───────┘
│
┌──────────────┐ ┌──────┴───────┐ ┌──────────────┐
│ dim_customer │ │ fct_orders │ │ dim_product │
│──────────────│ │──────────────│ │──────────────│
│ customer_key │←───│ customer_key │───→│ product_key │
│ customer_id │ │ product_key │ │ product_id │
│ name │ │ date_key │ │ name │
│ segment │ │ store_key │ │ category │
│ region │ │──────────────│ │ brand │
└──────────────┘ │ quantity │ └──────────────┘
│ unit_price │
│ discount_amt │ ┌──────────────┐
│ total_amount │ │ dim_store │
└──────┬───────┘ │──────────────│
│ │ store_key │
└───────────→│ store_name │
│ city, state │
└──────────────┘
Grain: one row per order line item
Facts: quantity, unit_price, discount_amt, total_amount
-- dim_customer with SCD Type 2 (track history)
CREATE TABLE dim_customer (
customer_key BIGINT PRIMARY KEY, -- surrogate key (auto-increment)
customer_id VARCHAR(50), -- natural/business key
name VARCHAR(200),
email VARCHAR(200),
segment VARCHAR(50),
region VARCHAR(50),
-- SCD Type 2 metadata
effective_from TIMESTAMP NOT NULL,
effective_to TIMESTAMP DEFAULT '9999-12-31',
is_current BOOLEAN DEFAULT TRUE
);
-- Merge pattern: close old record, insert new
-- When customer changes segment:
UPDATE dim_customer
SET effective_to = CURRENT_TIMESTAMP, is_current = FALSE
WHERE customer_id = 'CUST-123' AND is_current = TRUE;
INSERT INTO dim_customer (customer_id, name, email, segment, region,
effective_from, is_current)
VALUES ('CUST-123', 'Jane Doe', '[email protected]', 'Enterprise', 'West',
CURRENT_TIMESTAMP, TRUE);
-- Query: joins always use surrogate key + is_current for latest
-- Historical analysis: join on surrogate key with date range overlap
Transaction Fact Periodic Snapshot Accumulating Snapshot
───────────────── ───────────────── ─────────────────────
One row per event One row per period One row per lifecycle
Example: fct_orders Example: fct_daily_ Example: fct_order_
inventory fulfillment
Grain: order line item Grain: product x day Grain: one order
Measures: amount, qty Measures: qty_on_hand, Measures: order_date,
qty_sold, qty_ordered ship_date, deliver_date
Grows: continuously Grows: daily/weekly Updates: as lifecycle
stages complete
fct_ for facts, dim_ for dimensionsdata-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.