dbt-transformation-patterns
What it does
This tool helps organize and test data for analysis. It teaches how to structure your data in layers (like 'staging', 'intermediate', 'marts') and name your files consistently for easier understanding.
When to use it
- βWhen you are starting to organize your data for analysis.
- βWhen creating final tables for reports.
- βIf you have a lot of data and want to process it more efficiently.
Skill link
https://github.com/wshobson/agents/blob/main/plugins/data-engineering/skills/dbt-transformation-patterns/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHow can I organize my data using the Medallion architecture?β
5 new skills a week. 1 minute to read.
How it works
The tool suggests a folder structure with specific names for each layer (staging, intermediate, marts). It also shows examples of how to name your data files so everyone understands what each one represents.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
dbt Transformation Patterns
Production-ready patterns for dbt (data build tool) including model organization, testing strategies, documentation, and incremental processing.
When to Use This Skill
- Building data transformation pipelines with dbt
- Organizing models into staging, intermediate, and marts layers
- Implementing data quality tests
- Creating incremental models for large datasets
- Documenting data models and lineage
- Setting up dbt project structure
Core Concepts
1. Model Layers (Medallion Architecture)
sources/ Raw data definitions
β
staging/ 1:1 with source, light cleaning
β
intermediate/ Business logic, joins, aggregations
β
marts/ Final analytics tables
2. Naming Conventions
| Layer | Prefix | Example |
|---|---|---|
| Staging | stg_ |
stg_stripe__payments |
| Intermediate | int_ |
int_payments_pivoted |
| Marts | dim_, fct_ |
dim_customers, fct_orders |
Quick Start
# dbt_project.yml
name: "analytics"
version: "1.0.0"
profile: "analytics"
model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
vars:
start_date: "2020-01-01"
models:
analytics:
staging:
+materialized: view
+schema: staging
intermediate:
+materialized: ephemeral
marts:
+materialized: table
+schema: analytics
# Project structure
models/
βββ staging/
β βββ stripe/
β β βββ _stripe__sources.yml
β β βββ _stripe__models.yml
β β βββ stg_stripe__customers.sql
β β βββ stg_stripe__payments.sql
β βββ shopify/
β βββ _shopify__sources.yml
β βββ stg_shopify__orders.sql
βββ intermediate/
β βββ finance/
β βββ int_payments_pivoted.sql
βββ marts/
βββ core/
β βββ _core__models.yml
β βββ dim_customers.sql
β βββ fct_orders.sql
βββ finance/
βββ fct_revenue.sql
Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
Do's
- Use staging layer - Clean data once, use everywhere
- Test aggressively - Not null, unique, relationships
- Document everything - Column descriptions, model descriptions
- Use incremental - For tables > 1M rows
- Version control - dbt project in Git
Don'ts
- Don't skip staging - Raw β mart is tech debt
- Don't hardcode dates - Use
{{ var('start_date') }} - Don't repeat logic - Extract to macros
- Don't test in prod - Use dev target
- Don't ignore freshness - Monitor source data
FAQ
What are the 'staging', 'intermediate', and 'marts' layers?
They are like organization steps. 'Staging' is for initial cleaning, 'intermediate' is where business logic is applied, and 'marts' are the final tables ready for analysis.
Why is it important to test data?
Testing ensures your data is correct and complete, preventing errors in future reports and analyses.
What does 'incremental' mean?
It means that instead of processing all data every time, you only process new or changed data, which is much faster for large volumes.
Details
Original description by the author
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
repo: wshobson/agents
Popularity
- GitHub stars
- 41k
- Ranking position
- #6671
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
screen-reader-testing
41kHas your agent test websites using screen readers to ensure they are accessible.
wcag-audit-patterns
41kHelps your agent audit websites for accessibility and fix issues according to WCAG guidelines.
multi-reviewer-patterns
41kEnables your agent to coordinate parallel code reviews, deduplicating findings and consolidating reports.
parallel-debugging
41kAllows the agent to debug complex issues with parallel investigations and root cause analysis.
Similar skills
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
slacrawl
394kLets your agent search and count messages in a local Slack archive, check how fresh that archive is, and refresh it when needed.
goplaces
394kHelps your agent search for places, get their details and reviews, and resolve place names using Google Places, with JSON output for scripts.