Agent skill

dbt Model Builder

by AltimateAI in AltimateAI/data-engineering-skills

Creates or modifies dbt models in line with a project's own conventions, then runs dbt build and dbt show to check the output instead of stopping at compile.

MITAuto-check passedData & Analytics

Install dbt Model Builder

skills CLI
$ npx skills add AltimateAI/data-engineering-skills --skill creating-dbt-models -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AltimateAI/data-engineering-skills creating-dbt-models --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AltimateAI/data-engineering-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dbt/creating-dbt-models .claude/skills/creating-dbt-models && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
creating-dbt-models
GitHub stars
127
Token cost
~890 tokens
SKILL.md length
319 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Creates or modifies dbt models in line with a project's own conventions, then runs dbt build and dbt show to check the output instead of stopping at compile.

  • Works in 10 steps: Understand the Task Requirements → Discover Project Conventions → Find Similar Models → …
  • Creating a new dbt model in any layer of a project
  • SKILL.md covers Critical Rules, Workflow and Anti-Patterns
  • Calls dbt

What it does

This skill walks an agent through writing a dbt model. It first pins down the required columns, the grain of the table and any calculations, then reads dbt_project.yml and a few existing models to learn naming, config and SQL patterns, and looks for similar models to copy join types, aggregation patterns and NULL handling. It can preview upstream data with dbt show, writes the model to match the discovered conventions and the required columns exactly, and uses dbt compile as a syntax check.

Running dbt build on the model is mandatory, because compile alone is not enough. If the build fails three or more times, the agent stops and reassesses its whole approach. After a successful build it checks the result with dbt show for column names, row counts, plausible values and unexpected NULLs, and for calculated columns it verifies a sample row by hand against the source values. Finally it re-reads the original request to confirm it built what was asked, with exact column names and correct logic.

When your agent uses it

  • Creating a new dbt model in any layer of a project
  • Changing the logic, columns or joins of an existing model
  • Implementing a model from schema.yml specs or expected output

Example prompts

  • “Create a fct_orders model with one row per order and total_revenue as quantity times price.”
  • “Add a customer_lifetime_value column to the dim_customers model and verify it.”
  • “Build the model described in schema.yml for monthly_active_users and check its output.”

Requirements

  • A dbt project where dbt build and dbt show can run

Workflow steps

10 steps, taken from the step headings in SKILL.md.

  1. Understand the Task Requirements
  2. Discover Project Conventions
  3. Find Similar Models
  4. Check Upstream Data
  5. Write the Model
  6. Compile (Syntax Check)
  7. BUILD - MANDATORY
  8. Verify Output (CRITICAL)
  9. Verify Calculations Against Sample Data
  10. Re-review Against Requirements

What it can do on your machine

Read from SKILL.md and the folder at commit 705c68b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dbt

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

dbt Model Builder loads about 890 tokens when it runs. Until then it costs about 133 tokens; SKILL.md has 319 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~133
When it runs · the whole SKILL.md, loaded when a task matches
~890

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from AltimateAI/data-engineering-skills at commit 705c68b, republished under its MIT licence (© AltimateAI). 319 words, ~890 tokens.

Download SKILL.mdSave it as .claude/skills/creating-dbt-models/SKILL.md (or your agent's skills folder).
name
creating-dbt-models
description
Creates dbt models following project conventions. Use when working with dbt models for: (1) Creating new models (any layer - discovers project's naming conventions first) (2) Task mentions "create", "build", "add", "write", "new", or "implement" with model, table, or SQL (3) Modifying existing model logic, columns, joins, or transformations (4) Implementing a model from schema.yml specs or expected output requirements Discovers project conventions before writing. Runs dbt build (not just compile) to verify.

dbt Model Development

Read before you write. Build after you write. Verify your output.

Critical Rules

  1. ALWAYS run dbt build after creating/modifying models - compile is NOT enough
  2. ALWAYS verify output after build using dbt show - don't assume success
  3. If build fails 3+ times, stop and reassess your entire approach

Workflow

1. Understand the Task Requirements
  • What columns are needed? List them explicitly.
  • What is the grain of the table (one row per what)?
  • What calculations or aggregations are required?
2. Discover Project Conventions
bash
cat dbt_project.yml
find models/ -name "*.sql" | head -20

Read 2-3 existing models to learn naming, config, and SQL patterns.

3. Find Similar Models
bash
# Find models with similar purpose
find models/ -name "*agg*.sql" -o -name "*fct_*.sql" | head -5

Learn from existing models: join types, aggregation patterns, NULL handling.

4. Check Upstream Data
bash
# Preview upstream data if needed
dbt show --select <upstream_model> --limit 10
5. Write the Model

Follow discovered conventions. Match the required columns exactly.

6. Compile (Syntax Check)
bash
dbt compile --select <model_name>
7. BUILD - MANDATORY

This step is REQUIRED. Do NOT skip it.

bash
dbt build --select <model_name>

If build fails:

  1. Read the error carefully
  2. Fix the specific issue
  3. Run build again
  4. If fails 3+ times, step back and reassess approach
8. Verify Output (CRITICAL)

Build success does NOT mean correct output.

bash
# Check the table was created and preview data
dbt show --select <model_name> --limit 10

Verify:

  • Column names match requirements exactly
  • Row count is reasonable
  • Data values look correct
  • No unexpected NULLs
9. Verify Calculations Against Sample Data

For models with calculations, verify correctness manually:

bash
# Pick a specific row and verify calculation by hand
dbt show --inline "
  select *
  from {{ ref('model_name') }}
  where <primary_key> = '<known_value>'
" --limit 1

# Cross-check aggregations
dbt show --inline "
  select count(*), sum(<column>)
  from {{ ref('model_name') }}
"

For example, if calculating total_revenue = quantity * price:

  1. Pick one row from output
  2. Look up the source quantity and price
  3. Manually calculate: does it match?
10. Re-review Against Requirements

Before declaring done, re-read the original request:

  • Did you implement what was asked, not what you assumed?
  • Are column names exactly as specified?
  • Is the calculation logic correct per the requirements?
  • Does the grain (one row per what?) match what was requested?

Anti-Patterns

  • Declaring done after compile without running build
  • Not verifying output data after build
  • Getting stuck in compile/build error loops
  • Assuming table exists just because model file exists
  • Writing SQL without checking existing model patterns first

© AltimateAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/dbt/creating-dbt-models of AltimateAI/data-engineering-skills.

Open the folder on GitHubat commit 705c68b

Compare with similar skills

dbt Model Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

dbt Model Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
dbt Model Builder this skillAltimateAI/data-engineering-skills127—~890Automated safety check: PassMIT
Analytics Engineerborghei/Claude-Skills874—~3.4kAutomated safety check: PassMIT
Databricks JobsKilo-Org/kilo-marketplace1891 repos~3.1kAutomated safety check: PassCustom licence
Monte Carlo Validation Notebooksickn33/agentic-awesome-skills47k1 repos~1.1kAutomated safety check: PassMIT
Monte Carlo Preventsickn33/agentic-awesome-skills47k1 repos~3.3kAutomated safety check: PassMIT
Data Quality Checksmohitagw15856/pm-claude-skills1.4k—~919Automated safety check: PassMIT

Similar skills

  • Analytics Engineer

    borghei/Claude-Skills

    Analytics engineering across data modeling, dbt, transformation, and semantic layers.

    874 GitHub stars~3.4k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Databricks Jobs

    Kilo-Org/kilo-marketplace

    Develop and deploy Lakeflow Jobs on Databricks via DABs, Python SDK, or the CLI.

    189 GitHub starsUsed in 1 repo~3.1k tokens
    Data & AnalyticsAuto-check passed
  • Monte Carlo Validation Notebook

    sickn33/agentic-awesome-skills

    Generates SQL validation notebooks for dbt PR changes with before/after comparison queries.

    47k GitHub starsUsed in 1 repo~1.1k tokens
    Data & AnalyticsAuto-check passed
  • Monte Carlo Prevent

    sickn33/agentic-awesome-skills

    Surfaces Monte Carlo data observability context (table health, alerts, lineage, blast radius) before SQL/dbt edits.

    47k GitHub starsUsed in 1 repo~3.3k tokens
    Data & AnalyticsAuto-check passed
  • Data Quality Checks

    mohitagw15856/pm-claude-skills

    Design the data quality checks for a table or pipeline across the standard dimensions.

    1.4k GitHub stars~919 tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Dbt Model Spec

    mohitagw15856/pm-claude-skills

    Spec a dbt model — its grain, sources, transformations, tests, and materialization.

    1.4k GitHub stars~939 tokensUpdated yesterday
    Data & AnalyticsAuto-check passed

More from AltimateAI/data-engineering-skills

All 12 skills in this repo
  • Altimate Data Warehouse Delegate

    AltimateAI/data-engineering-skills

    Delegates dbt and warehouse tasks such as lineage, migrations and cost attribution to the altimate-code CLI agent and relays its answer back.

    127 GitHub stars~1.4k tokensUpdated 5 days ago
    Auto-check passed
  • dbt Error Debugging

    AltimateAI/data-engineering-skills

    Walks through fixing dbt compilation, database and test errors: read the full error, check upstream models, apply a fix, then verify with dbt build and a data preview.

    127 GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check passed
  • dbt Incremental Models

    AltimateAI/data-engineering-skills

    Helps choose an incremental strategy, design a reliable unique_key and debug failing dbt incremental models, and says when a plain table is the better choice.

    127 GitHub stars~2.3k tokensUpdated 5 days ago
    Auto-check passed
  • dbt Model Documentation

    AltimateAI/data-engineering-skills

    Writes model and column descriptions in dbt schema.yml files, matching the project's existing documentation style and recording grain, business rules and caveats.

    127 GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed
  • Expensive Snowflake Query Finder

    AltimateAI/data-engineering-skills

    Ranks the costliest, slowest or heaviest-scanning Snowflake queries from query history and suggests how to optimize them.

    127 GitHub stars~662 tokensUpdated 5 days ago
    Auto-check passed
  • Migrating SQL To Dbt

    AltimateAI/data-engineering-skills

    Converts legacy SQL to modular dbt models. An agent skill from AltimateAI/data-engineering-skills.

    127 GitHub stars~762 tokensUpdated 5 days ago
    Auto-check passed

Works with

Questions about dbt Model Builder

What does dbt Model Builder do?

Creates or modifies dbt models in line with a project's own conventions, then runs dbt build and dbt show to check the output instead of stopping at compile. This skill walks an agent through writing a dbt model.yml and a few existing models to learn naming, config and SQL patterns, and looks for similar models to copy join types, aggregation patterns and NULL handling.

When should I use dbt Model Builder?

dbt Model Builder fits situations like: creating a new dbt model in any layer of a project; changing the logic, columns or joins of an existing model; implementing a model from schema.yml specs or expected output.

How do I install dbt Model Builder in Claude Code?

Run `npx skills add AltimateAI/data-engineering-skills --skill creating-dbt-models -a claude-code`. Or copy the skill folder (skills/dbt/creating-dbt-models in AltimateAI/data-engineering-skills) into .claude/skills/creating-dbt-models in your project. Claude Code loads it when a task matches its description.

How do I install dbt Model Builder in Codex?

Run `npx skills add AltimateAI/data-engineering-skills --skill creating-dbt-models -a codex`. Or copy the skill folder (skills/dbt/creating-dbt-models in AltimateAI/data-engineering-skills) into .agents/skills/creating-dbt-models in your project. Codex loads it when a task matches its description.

Can I use dbt Model Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AltimateAI/data-engineering-skills --skill creating-dbt-models -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/creating-dbt-models, .gemini/skills/creating-dbt-models, .github/skills/creating-dbt-models and .opencode/skills/creating-dbt-models in your project.

What does dbt Model Builder need to run?

Going by SKILL.md and its folder, dbt Model Builder needs the command-line tools its instructions call (dbt). Our summary lists: A dbt project where dbt build and dbt show can run.

Does dbt Model Builder access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is dbt Model Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does dbt Model Builder use?

dbt Model Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does dbt Model Builder use?

About 890 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to dbt Model Builder?

Skills that share tags, products or a category with dbt Model Builder: Analytics Engineer (borghei/Claude-Skills, 874 stars), Databricks Jobs (Kilo-Org/kilo-marketplace, 189 stars), Monte Carlo Validation Notebook (sickn33/agentic-awesome-skills, 47k stars) and Monte Carlo Prevent (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains dbt Model Builder?

AltimateAI (a GitHub organization) maintains it in AltimateAI/data-engineering-skills, which has 127 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 1, 2026.

Source: AltimateAI/data-engineering-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.