dbt-transformation-patterns — Claude skill: dbt models, tests, layers
A skill for Claude, Claude and Cursor that tells the agent how to layer dbt models, write data tests and set up incremental marts.
/plugin marketplace add wshobson/agents
/plugin install data-engineering@claude-code-workflowsWhat dbt-transformation-patterns does
The skill lays out dbt conventions: staging, intermediate and marts layers, name prefixes (stg_, int_, dim_, fct_), materialization settings in dbt_project.yml. Your agent picks these up whenever you ask it to build a model or reorganize an existing project.
It ships a models/ layout with Stripe and Shopify examples, testing guidance (not null, unique, relationships), column and model documentation, and incremental processing for large tables. There is also a list of things to avoid: skipping staging, hardcoding dates instead of {{ var('start_date') }}, repeating logic instead of extracting macros, running tests against the prod target.
Worth installing if your analytics stack already runs on dbt and you want the agent to follow the same structure every time. No dbt in the project? Skip it.
What it helps with
- split dbt models into staging, intermediate and marts layers
- add not null, unique and relationships tests to existing models
- move a large table to an incremental materialization
- document columns and models in yml files
- extract repeated logic into macros
Example prompts for the agent
- split my dbt models into staging, intermediate and marts
- add not null and unique tests for fct_orders
- turn stg_stripe__payments into an incremental model
How to install dbt-transformation-patterns
1Plugin marketplace
/plugin marketplace add wshobson/agents/plugin install data-engineering@claude-code-workflowsThis installs the whole data-engineering plugin with all its skills
2Skills CLI (Vercel)
npx skills add wshobson/agents --skill dbt-transformation-patterns -a claude-code3Manually: put the files in place
~/.claude/skills/dbt-transformation-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/dbt-transformation-patterns/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill dbt-transformation-patterns -a codex2Manually: put the files in place
.agents/skills/dbt-transformation-patterns/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill dbt-transformation-patterns -a cursor2Manually: put the files in place
.cursor/skills/dbt-transformation-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshobson/agents dbt-transformation-patterns2Manually: put the files in place
.github/skills/dbt-transformation-patterns/SKILL.mdPlatform CLI
gemini skills install https://github.com/wshobson/agents --path plugins/data-engineering/skills/dbt-transformation-patternsManually: put the files in place
.devin/skills/dbt-transformation-patterns/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set213
The whole set →Similar
Questions about dbt-transformation-patterns
How do I install dbt-transformation-patterns in Claude?
Add the marketplace with /plugin marketplace add wshobson/agents, then run /plugin install data-engineering@claude-code-workflows. You can also use npx skills add wshobson/agents --skill dbt-transformation-patterns -a claude-code.
What does dbt-transformation-patterns do?
It gives the agent dbt project patterns: model layers, naming conventions, tests, documentation and incremental strategies.
Which platforms does it support?
It runs in Claude, Claude and Cursor. For Claude and Cursor, install with npx skills add and the -a codex or -a cursor flag.
Source text
SKILL.md · MIT
---
name: dbt-transformation-patterns
description: 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
| Layer | Prefix | Example |
| ------------ | -------------- | ----------------------------- |
| Staging | `stg_` | `stg_stripe__payments` |
| Intermediate | `int_` | `int_payments_pivoted` |
| Marts | `dim_`, `fct_` | `dim_customers`, `fct_orders` |
## Quick Start
```yaml
# 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
© Seth Hobson · MIT · wshobson/agents