# Build Reliable dbt Transformation Projects

dbt projects can become inconsistent as models, tests, and incremental logic grow. This skill provides practical patterns for organized, documented, and efficient transformations.

## Install

```bash
npx skillstore add sickn33/dbt-transformation-patterns
```

## Metadata

- Status: approved
- Slug: sickn33-dbt-transformation-patterns
- Skillstore revision: r2
- Version status: missing
- Tree hash: a2d9f15c8ab3669417c8e22dc08473c6470017792b09b5f3bca503765a56fe89
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/dbt-transformation-patterns
- Ref: f9e2c34b4f19c7f3e6b0a1e93227b5f77cc12526
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-dbt-transformation-patterns
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-dbt-transformation-patterns/manifest

## Capabilities

- Organizes dbt models into staging, intermediate, and marts layers with consistent naming.
- Provides source definitions with freshness, uniqueness, null, and relationship tests.
- Demonstrates dimension and fact models using dbt references and warehouse SQL.
- Compares incremental strategies for merge, delete and insert, and partition overwrite workflows.
- Shows reusable macros, development data limits, selectors, testing commands, and documentation commands.
- Documents practical conventions for materializations, schemas, model ownership, and data quality.

## Use Cases

- Structure a New Analytics Project: Create clear model layers, naming rules, source definitions, and materialization defaults for a new dbt repository.
- Improve Data Quality Coverage: Add model documentation, source freshness checks, key constraints, relationship tests, and accepted-value tests.
- Scale Large Warehouse Models: Select incremental strategies, define reliable keys, handle late data, and limit development scans.

## Prompt Templates

### Plan a dbt Project

```
Design a dbt project structure for [business domain] using sources, staging, intermediate, and marts layers. Explain naming and materialization choices.
```

### Add Tests and Documentation

```
Review these dbt model and source definitions: [details]. Propose descriptions, freshness rules, and suitable uniqueness, null, relationship, and accepted-value tests.
```

### Choose an Incremental Strategy

```
Recommend an incremental design for [model] on [warehouse]. Consider volume, unique keys, late records, updates, partitions, schema changes, and full refreshes.
```

### Review a Production dbt Architecture

```
Audit this dbt project structure and model flow: [details]. Identify layering, duplication, testing, freshness, documentation, performance, and deployment risks. Prioritize improvements.
```

## Limitations

- Examples require adaptation for each warehouse adapter, schema, and business definition.
- The skill does not inspect data, execute dbt, or verify generated transformations.
- Some examples require the dbt-utils package and warehouse-specific SQL functions.
- It does not configure credentials, deployment platforms, or orchestration services.

## Best Practices

- Adapt every example to the warehouse adapter and validate compiled SQL before deployment.
- Define model grain, ownership, keys, tests, and documentation together.
- Test incremental models against full-refresh results and late-arriving records.

## Anti Patterns

- Do not copy sample schemas or business rules without checking source semantics.
- Do not use incremental materialization without a stable key and recovery plan.
- Do not bypass staging by embedding repeated source cleanup in marts.

## Security Audit

- Audited at: 2026-07-23T22:52:47.863\+00:00
- Summary: All 14 static findings are false positives. Twelve matches are ordinary SQL or YAML identifiers, while two matches are Markdown path formatting, not shell execution. No prompt injection, exfiltration intent, or unsafe command behavior was found.

## Stats

- Views: 100
- Downloads: 11
- Favorites: 0
- Popularity score: 0
