# Data Modeling

> Data Modeling & Transformation (Router)

- Skill: `methasit-pun/data-modeling` (Agent Skill)
- Install (CLI): `npx skillmds@latest add methasit-pun/data-modeling`
- Raw SKILL.md: https://api.skillmd.com/api/skills/methasit-pun/data-modeling/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Methasit-Pun (https://skillmd.com/u/methasit-pun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/methasit-pun/data-modeling

---


# Data Modeling & Transformation (Router)

This is a **router skill**. It groups the four skills that deal with structuring and transforming data after it lands in the warehouse or a processing job. Diagnose which sub-area(s) the task touches, then **invoke the matching sub-skill(s) with the Skill tool**.

## How to route

| If the task is about… | Invoke sub-skill |
|---|---|
| Modeling business entities: star/snowflake schema, one-big-table, slowly changing dimensions, grain definition, surrogate keys, normalization tradeoffs | `schema-design` |
| Writing/reviewing analytical SQL: window functions, CTEs, ranking, running totals, dedup, query optimization, anti-patterns (BigQuery/Snowflake/Redshift/DuckDB) | `sql-patterns` |
| dbt work: model layers (staging/intermediate/marts), refs, sources, tests, macros, materializations, incremental strategies | `dbt-patterns` |
| Python transforms: pandas/Polars/PySpark idioms, chunked reads, memory-safe transforms, vectorization, performance | `python-data-patterns` |

## Routing rules

- **Start with `schema-design` when the table doesn't exist yet** — decide grain and layout before writing SQL against it. A bad schema is expensive to fix later.
- **SQL running inside dbt** pulls in both `sql-patterns` (the query itself) and `dbt-patterns` (materialization, refs, tests).
- **Transformation in Python vs. SQL undecided?** Warehouse-native transforms → `sql-patterns`/`dbt-patterns`; external/large-file or ML-adjacent processing → `python-data-patterns`.
- **Row-by-row DataFrame iteration or memory errors** → `python-data-patterns` immediately.
- Invoke via the Skill tool by name, e.g. `Skill(skill="dbt-patterns")`. Combine outputs; don't paraphrase from memory.

## Related groups

- Getting data into the warehouse first → [[data-pipelines]]
- Testing/validating the models you build → [[data-reliability]]
- Warehouse cost of these queries → [[cloud-data-infra]]

