Skills dbt-transformation-patterns
📊

dbt-transformation-patterns

Safe 🌐 Network access⚙️ External commands

Build dbt models with proven patterns

Building reliable dbt transformations can be slow without a clear structure. This skill provides layered model patterns, tests, and incremental strategies you can apply quickly.

Supports: Claude Codex Code(CC)
📊 69 Adequate
1

Download the skill ZIP

2

Upload in Claude

Go to Settings → Capabilities → Skills → Upload skill

3

Toggle on and start using

Test it

Using "dbt-transformation-patterns". Create a dbt structure for Stripe and Shopify data with staging and marts.

Expected outcome:

  • Set up staging models for Stripe customers and payments with stg_ prefix
  • Add an intermediate model to aggregate payments by customer using int_ prefix
  • Create marts with dim_customers for dimensions and fct_orders for facts
  • Add YAML tests for unique and not_null on primary keys
  • Configure incremental processing for large payment tables

Using "dbt-transformation-patterns". How do I test my dbt models?

Expected outcome:

  • Add not_null and unique tests on all primary key columns
  • Use relationships tests to validate foreign key references
  • Add accepted_values tests for categorical columns like order_status
  • Use dbt_utils.expression_is_true for business rule validation
  • Configure freshness checks on source definitions

Using "dbt-transformation-patterns". What are incremental models and when should I use them?

Expected outcome:

  • Incremental models process only new or changed data since last run
  • Use when tables exceed 1 million rows to reduce runtime
  • Configure with unique_key to identify records and incremental_strategy for update logic
  • Use is_incremental() macro to filter incoming data
  • Supports merge, delete+insert, and insert_overwrite strategies

Security Audit

Safe
v4 • 1/17/2026

Pure documentation skill containing only SQL and YAML examples for dbt patterns. The static analyzer produced false positives: YAML frontmatter markers were flagged as shell backticks, Jinja2 template syntax was flagged as command execution, and normal dbt CLI commands were flagged as reconnaissance. All findings are dismissed. No executable code, network calls, file system access, or external command execution capabilities exist.

2
Files scanned
740
Lines analyzed
2
findings
4
Total audits
Audited by: claude View Audit History →

Quality Score

38
Architecture
100
Maintainability
85
Content
21
Community
100
Security
87
Spec Compliance

What You Can Build

Standardize model layers

Adopt staging, intermediate, and marts patterns with consistent naming and structure.

Improve data quality

Add source and model tests with clear documentation for governance.

Start a dbt project

Set up dbt_project.yml and a clear folder layout for models.

Try These Prompts

Start with layering
Explain a simple staging, intermediate, and marts layout for my dbt project with naming examples.
Add tests and docs
Draft YAML tests and documentation for a customer dimension and orders fact model.
Plan incremental model
Suggest an incremental model config for payments with a safe incremental filter.
Refactor with macros
Show a macro pattern to standardize currency conversion and schema naming in dbt.

Best Practices

  • Use a staging layer to clean sources once and reuse downstream across all models
  • Add not_null and unique tests for every primary key column in your models
  • Document models and columns as you build them with clear descriptions

Avoid

  • Skip staging and join raw data directly into marts creates unmaintainable code
  • Hardcode dates or values instead of using vars for configuration breaks portability
  • Repeat logic across models instead of extracting to reusable macros increases maintenance

Frequently Asked Questions

Is this compatible with my dbt adapter?
Yes for general patterns, but SQL examples may need adapter-specific changes.
Are there limits on model size or count?
No limits are enforced; performance depends on your warehouse and project design.
Can I integrate this with existing dbt projects?
Yes, apply the patterns to current models and update tests and docs incrementally.
Does it access or store my data?
No, it provides guidance only and does not execute dbt or read your data.
What if incremental models produce duplicates?
Review your unique_key and incremental filter and ensure updates are covered.
How does this compare to dbt docs?
It is a concise pattern guide focused on practical structure and examples.

Developer Details

File structure

📄 SKILL.md