🎯

dbt-transformation-patterns

🎯Skill

Practical patterns for dbt, a tool that turns raw data into clean tables for analysis using SQL. It covers project layout, naming, data checks and documentation.

wshobson/agents8,475 Installs27,673Last Updated Jan 19, 2026

Installation

$npx skills add wshobson/agents --skill dbt-transformation-patterns

Run it in a terminal; it asks which AI coding tools to install it for (Claude Code, Codex, Cursor and more).

Uses skills.sh Β· Node.js 22.20+

After installing

Ask for related work and the agent uses it on its own, or call it yourself.

Run it (Claude Code)/dbt-transformation-patterns
Install by hand

Copy the whole skill folder from GitHub to the place below. Copying only SKILL.md can leave out files the skill uses.

Open the skill folder β†’
  • This project .claude/skills/dbt-transformation-patterns/
  • All projects ~/.claude/skills/dbt-transformation-patterns/

These paths are for Claude Code. For other tools, the command above puts it in the right place.

What this skill does

Overview

dbt (data build tool) lets you write SQL steps that clean and combine raw data into tables ready for reports. This skill shares proven patterns for setting up and growing a dbt project. It organizes work into layers, from raw sources to final analytics tables.

Key Features

  • Arrange models into staging, intermediate and marts layers, each with a clear job.
  • Follow naming rules like stg_, int_, dim_ and fct_ so files are easy to find.
  • Start quickly with a sample dbt_project.yml and folder layout.
  • Add data quality tests, such as checking for empty or duplicate values.
  • Use incremental models, which only process new rows, for very large tables.

Who is this for?

This is for analytics engineers and data analysts who build reporting data with dbt. It helps new projects start with a clean structure. Deeper examples are in references/details.md.

Summarized by AI from this skill's SKILL.md. Suggest a better one

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.

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

LayerPrefixExample
Stagingstg_stg_stripe__payments
Intermediateint_int_payments_pivoted
Martsdim_, 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

More from this repository10

🎯
tailwind-design-system🎯Skill

Helps you build a consistent look for your app with Tailwind CSS v4. It sets up shared colors, sizes, dark mode and reusable components so every screen matches.

🎯
typescript-advanced-types🎯Skill

A guide to TypeScript's advanced type features, which describe the shape of your data so mistakes are caught before the code runs. It covers reusable types, types that change based on rules, and built-in helper types, with short examples.

🎯
nodejs-backend-patterns🎯Skill

Guidance for building reliable server-side apps with Node.js, using Express or Fastify. It covers login, error handling, databases, API design and a list of proven best practices.

πŸͺ
wshobson-agentsπŸͺMarketplace

Intelligent automation and multi-agent orchestration for Claude Code

πŸ”Œ
framework-migrationπŸ”ŒPlugin

Claude Code plugin for AI-powered framework migration workflows, coordinating specialized agents to plan and execute transitions between technology stacks as part of the wshobson/agents marketplace.

πŸ”Œ
payment-processingπŸ”ŒPlugin

A Claude Code plugin for payment system integration covering Stripe, PayPal, and billing platforms with checkout flows, subscription management, and webhook handling in the wshobson/agents ecosystem.

πŸ”Œ
developer-essentialsπŸ”ŒPlugin

A Claude Code plugin bundling core development tools and agents for everyday tasks like debugging and code generation, part of the wshobson/agents marketplace with 73 focused plugins.

πŸ”Œ
observability-monitoringπŸ”ŒPlugin

Claude Code plugin for observability and monitoring including logging, metrics, distributed tracing, and alerting, part of the wshobson/agents marketplace with 73 focused plugins.

πŸ”Œ
deployment-strategiesπŸ”ŒPlugin

A Claude Code plugin providing specialized AI agents for deployment strategy planning and execution, covering blue-green deployments, canary releases, rolling updates, and zero-downtime patterns.

πŸ”Œ
jvm-languagesπŸ”ŒPlugin

Claude Code plugin for JVM language development including Java, Kotlin, and Scala with specialized agents for idiomatic patterns, build tools, and runtime optimization in the wshobson/agents marketplace.