dbt

dbt is a skill for Claude Code from alivirgo/Major-AI-Skills. It costs 22 tokens per session (778 once invoked), scanned A, original, MIT.

A guide for dbt, a tool that turns SQL models into managed data-warehouse tables or views. It covers reusable model references, data tests, documentation, and incremental processing of large datasets.

In plain words
What is it for?
Use it to build warehouse models, connect sources and dependent models, test keys and relationships, document datasets, and run changed transformations in continuous integration.
Why use it?
Warehouse SQL becomes difficult to maintain when dependencies, tests, and environment-specific names are handled manually. dbt provides a structured workflow for building and checking those transformations.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Part of the major-ai-skills plugin — 147 skills, 7 plugins shipped together

Good fit Use it to build warehouse models, connect sources and dependent models, test keys and relationships, document datasets, and run changed transformations in continuous integration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alivirgo/major-ai-skills/dbt
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alivirgo/Major-AI-Skills --skill dbt
Clone the repo
git clone --depth 1 https://github.com/alivirgo/Major-AI-Skills

Made for: Claude Code.

Or install major-ai-skills, the plugin that ships this one along with the rest of its 147 skills, 7 plugins.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dbt

README.md
[![agentmods](https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/dbt/github.svg)](https://agentmods.dev/skills/alivirgo/major-ai-skills/dbt)
Your own site
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/dbt"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/dbt/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dbt

Your own site · 80×15
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/dbt"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/dbt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 778 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00778
Opus 5 $0.00011 $0.00389
Sonnet 5 $0.00004 $0.00156
Haiku 4.5 $0.00002 $0.00078

Measured today against content hash f908c2df410d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

dbt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dbt/SKILL.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

dbt Analytics Engineering AI Skill Guide

Overview & Engine Architecture

dbt compiles Jinja-SQL models into warehouse DDL/DML, managed via a DAG of ref() / source() edges. Runs materialize views/tables/incremental models; tests and documentation live beside SQL. Agents keep models thin and tested, prefer incremental strategies for large facts, and never hardcode environment-specific database names inside model bodies.

sources.yml -> staging models -> intermediate -> marts
                     |
              dbt compile/run/test
                     |
              warehouse relations + docs

When to use this skill

  • Versioned SQL transforms in Snowflake/BigQuery/Redshift/DuckDB/etc.
  • Data tests (unique, not_null, relationships, custom)
  • Documenting marts for analysts

Operational directives

  1. Stage raw sources 1:1 (stg_*) before business logic.
  2. Use {{ ref('model') }} and {{ source('src','table') }} - never hardcode prod relations.
  3. Add primary-key and relationship tests on mart grains.
  4. Prefer incremental with a clear unique_key and bounded predicate for large facts.
  5. Run dbt build (run+test) in CI on changed selectors when possible.

Model sketch

-- models/marts/fct_orders.sql
{{ config(materialized='incremental', unique_key='order_id', on_schema_change='append_new_columns') }}

select
  o.order_id,
  o.customer_id,
  o.amount,
  o.created_at
from {{ ref('stg_orders') }} o
{% if is_incremental() %}
where o.created_at > (select coalesce(max(created_at), '1970-01-01') from {{ this }})
{% endif %}

Commands

dbt deps
dbt run --select marts.fct_orders+
dbt test --select fct_orders
dbt build --select state:modified+   # with defer/state artifacts in CI
dbt docs generate && dbt docs serve

Common failures

Symptom Cause Fix
Compilation error bad Jinja/ref dbt compile; check node name
Full-refresh surprise incremental misconfig review unique_key / predicates
Flaky tests late-arriving data warn severity; quarantine models
Slow CI building entire project select ancestors/descendants only

Read the full file on GitHub · 95 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · -2 tokens per session f908c2df410d
  2. 6d ago First seen · 95 lines · 24 tokens per session scan A f5b51ed58499

Subscribe to this mod's changes

dbt is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 778 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

dbt-expert

Expert-level dbt (data build tool), models, tests, documentation, incremental models, macros, and Jinja templating. Use when the user mentions analytics engineering, SQL, data transformation, Jinja, or testing, or when the task involves Project Structure and Configuration, Sources and Staging Models, Intermediate and…

personamanagmentlayer/pcl · 76 tokens

data-science-analytics-engineering

Use this skill when asked about analytics engineering, dbt, data modeling, metrics layer, semantic layer, Cube.js, MetricFlow, dbt metrics, SQL analytics, window functions, CTEs, pivot/unpivot, data modeling for analytics, OBT, dimensional modeling, medallion architecture, bronze/silver/gold, or analytical SQL. This…

j4flmao/agent-skills · 218 tokens

mysql-expert

Design, optimize, and maintain MySQL databases. Covers schema design, indexing strategies, query optimization, replication, and performance tuning.

AtulPurohit/Antigravity-Awesome-Skills · 30 tokens

postgresql-expert

Design, optimize, and administer PostgreSQL databases. Covers advanced indexing, partitioning, full-text search, JSON operations, replication, and performance tuning.

AtulPurohit/Antigravity-Awesome-Skills · 35 tokens

pr-verify

Verify a Docglow change actually works before submitting or merging a PR. Runs the conformance suite, then a behavioral verification pass (flag matrix, artifact-join spot checks, pipeline contract sweep, payload budget). Use when reviewing a PR, self-reviewing a branch before opening a PR, or when asked to "verify…

docglow/docglow · 79 tokens

postgresdb

Use when PostgreSQL engine behaviour decides the answer — schema and type design, index choice, reading EXPLAIN on a slow query, zero-downtime DDL and backfills, or ops (roles, RLS, pooling, vacuum, partitioning, PITR). PG16, ORM-agnostic. NOT portable query logic (that is sql), NOT a managed provider's platform…

ericrisco/rsc-harness · 91 tokens