Skip to main content
skill Claude Code CX Codex Cursor

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.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install data-engineering@claude-code-workflows
Open on GitHub

What 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-workflows

This installs the whole data-engineering plugin with all its skills

2Skills CLI (Vercel)

npx skills add wshobson/agents --skill dbt-transformation-patterns -a claude-code

3Manually: put the files in place

~/.claude/skills/dbt-transformation-patterns/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/dbt-transformation-patterns/

From the same set213

The whole set →
typescript-advanced-types Seth Hobson Guides an agent through advanced TypeScript types, from generics to conditional and mapped types. Use it for typed libraries, API clients, or strict configuration objects. Claude Code CX Codex Cursor 92,169installs tailwind-design-system Seth Hobson Helps build design systems with Tailwind CSS v4, from theme tokens to component variants. Use it when a project needs shared UI patterns. Claude Code CX Codex Cursor 70,180installs brand-landingpage Travis D. Elliott This skill interviews you about the product and its visual direction, then builds a landing page through Stitch. Use it when there’s no established design yet. Claude Code CX Codex Cursor 39,476installs python-testing-patterns Seth Hobson This skill guides Python testing with pytest, fixtures and mocks. Use it when building a test suite or tracking down failing checks. Claude Code CX Codex Cursor 36,943installs python-performance-optimization Seth Hobson This skill profiles Python code to locate CPU and memory bottlenecks. Use it when an application responds slowly or consumes too many resources. Claude Code CX Codex Cursor 35,675installs nextjs-app-router-patterns Seth Hobson This skill covers Next.js App Router patterns for rendering, routing, and data fetching. Use it when starting an App Router project or moving from Pages Router. Claude Code CX Codex Cursor 32,529installs api-design-principles Seth Hobson Use this skill to plan or review REST and GraphQL APIs. It helps when writing a specification or setting API conventions for a team. Claude Code CX Codex Cursor 30,348installs code-review-excellence Seth Hobson This skill guides pull request reviews, catches logic and security issues, and helps teams give specific feedback. Use it for review standards or developer mentoring. Claude Code CX Codex Cursor 30,193installs

Similar

scvi-tools official anthropics A skill providing deep learning workflows for single-cell genomics with scvi-tools. It guides model selection, batch correction, and AnnData processing pipelines. Claude Code CX Codex Cursor +1 2,400installs single-cell-rna-qc official anthropics Runs QC for single-cell RNA-seq data, filters cells with MAD-based rules, and creates plots. Use it for initial checks of .h5ad or .h5 files. Claude Code CX Codex Cursor +1 2,400installs managed-airflow-dag-troubleshooting official google Troubleshoots failed DAG runs and task instances in Managed Service for Apache Airflow using logs, task state, and DAG source code. Claude Code Gemini CLI CX Codex 3,500installs n8n-workflow-patterns czlonkowski Provides six architectural patterns for n8n workflows: webhook, API, database, AI agent, scheduled tasks, batch processing. Guides pattern selection and required nodes. Claude Code CX Codex Cursor +1 11,700installs prisma-client-api prisma Complete Prisma Client API reference for database queries, CRUD operations, and filtering. Triggers on findMany, create, update, delete, and $transaction. Claude Code CX Codex Cursor +1 389,500installs prisma-database-setup prisma A deprecated compatibility name for prisma-orm-setup, which handles Prisma setup and database connection repair. Claude Code CX Codex Cursor +1 388,400installs xlsx official anthropics Creates, reads, edits, and converts spreadsheet files. Use it when the requested deliverable is an Excel workbook or another tabular file. Claude Code Claude.ai 187,223installs google-agents-cli-observability official Google This skill guides you through tracing and monitoring AI agents, including ADK agents. Use it when you need to inspect agent execution or monitor a deployed agent. Claude Code CX Codex Cursor +1 509,900installs

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

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor