Dbt Transformation Patterns skill for Claude

Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies.

When Claude uses it

Use when building data transformations, creating data models, or implementing analytics engineering best practices.

Dbt Transformation Patterns SKILL.md

The full skill file from wshobson/agents (MIT).

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

How to install Dbt Transformation Patterns

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit wshobson/agents/plugins/data-engineering/skills/dbt-transformation-patterns#main ~/.claude/skills/dbt-transformation-patterns

Codex

npx degit wshobson/agents/plugins/data-engineering/skills/dbt-transformation-patterns#main ~/.codex/skills/dbt-transformation-patterns

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Dbt Transformation Patterns skill do?

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.

+How do I install Dbt Transformation Patterns in Claude Code?

Copy the skill folder into ~/.claude/skills/dbt-transformation-patterns, for example with "npx degit wshobson/agents/plugins/data-engineering/skills/dbt-transformation-patterns#main ~/.claude/skills/dbt-transformation-patterns". Claude Code loads it automatically and uses it when a task matches.

+Does Dbt Transformation Patterns work with ChatGPT or Codex?

Yes. Dbt Transformation Patterns uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/dbt-transformation-patterns. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Dbt Transformation Patterns free?

Dbt Transformation Patterns is published on GitHub by wshobson under the MIT license, which allows free use.

Related data & analytics skills

  1. Analytics

    When the user wants to set up or audit analytics, or asks whether a metric or number is calculated right, what to track, or how to name…

    coreyhaines31/marketingskills★ 61k
  2. Statistical Analysis

    Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives,…

    K-Dense-AI/scientific-agent-skills★ 58k
  3. Dashboard Chat Best Practices

    Apply dashboard-grade chat UX patterns in the Eve chat template.

    thedotmack/claude-mem★ 118k
  4. Eval Harness First

    Build the evaluation harness that gates every fine-tuning run — golden sets, per-failure-mode graders, judge calibration, and base-model…

    wshobson/agents★ 43k
  5. Finetuning Method Selection

    Decide whether to fine-tune at all, and route to the right method (SFT, DPO/ORPO/KTO, GRPO/RLVR, continued pretraining) and base model.

    wshobson/agents★ 43k
  6. Grafana Dashboards

    Create and manage production Grafana dashboards for real-time visualization of system and application metrics.

    wshobson/agents★ 43k
  7. Helm Chart Scaffolding

    Design, organize, and manage Helm charts for templating and packaging Kubernetes applications with reusable configurations.

    wshobson/agents★ 43k
  8. Kpi Dashboard Design

    Design effective KPI dashboards with metrics selection, visualization best practices, and real-time monitoring patterns.

    wshobson/agents★ 43k
  9. Lora Qlora Recipes

    Configure LoRA and QLoRA supervised fine-tuning with current best-practice hyperparameters.

    wshobson/agents★ 43k

See all data & analytics skills →

More skills from wshobson

  1. Debugging Strategies

    Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or…

    wshobson/agents★ 43k
  2. Defi Protocol Templates

    Implement DeFi protocols with production-ready templates for staking, AMMs, governance, and flash loans.

    wshobson/agents★ 43k
  3. Dependency Upgrade

    Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing.

    wshobson/agents★ 43k

All skills by wshobson →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.