Skip to content
Back to skills

Dbt Modeling

ASecurity

Builds dbt models in staging, intermediate and mart layers with tests and generated docs. Use it when adding or restructuring warehouse transformations.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 15, 2026
ai-agents

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill dbt-modeling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dbt Modeling?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dbt Modeling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-dbt-modeling/badge)](https://www.skillsdirectory.com/skills/workspace-templates-dbt-modeling)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dbt-modeling
description: Builds dbt models in staging, intermediate and mart layers with tests and generated docs. Use it when adding or restructuring warehouse transformations.
---

# dbt modeling

One model, one purpose. Tests and docs ship with the model.

## Steps

1. Read `dbt_project.yml` and two existing models to learn the naming, folder layout and default materializations. Match them.
2. Declare the raw tables in a `sources.yml` with a `loaded_at_field` and a freshness rule where one exists.
3. Staging (`stg_<source>__<table>`): one model per source table, `{{ source() }}` only here. Rename columns to snake case, cast types, convert timestamps to UTC, and do no joins or aggregation. Materialize as view.
4. Intermediate (`int_<entity>__<verb>`): joins, deduplication and reusable logic. Reference upstream models with `{{ ref() }}` only.
5. Marts (`dim_` and `fct_`): one grain per table, stated in the description. Materialize as table, or incremental with a `unique_key` and a lookback filter for large facts.
6. Write the YAML next to each model: a description, and tests on every key (`unique`, `not_null`), foreign keys (`relationships`), and enums (`accepted_values`).
7. Run `dbt build --select +<model>` and read the failures. Fix the model, not the test, unless the test is wrong.
8. Run `dbt docs generate` if the project publishes docs.

## Rules

- No `select *` in marts. List columns.
- Do not hardcode schema names; use refs.
- Keep logic out of YAML tests; put it in singular tests under `tests/`.

## Report

Models created with their layer and grain, tests added, `dbt build` result, and any data problem the tests exposed.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.