From dbt-toolkit
Generates dbt models with staging, intermediate, and marts layers, incremental configs, schema documentation, and tests for data transformations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dbt-toolkit:model-builderThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create well-structured dbt models following best practices for staging, intermediate, and mart layers.
Create well-structured dbt models following best practices for staging, intermediate, and mart layers.
Staging models clean and standardize raw data:
-- models/staging/stg_orders.sql
with source as (
select * from {{ source('raw', 'orders') }}
),
renamed as (
select
order_id,
customer_id,
order_date,
order_total,
order_status,
created_at,
updated_at
from source
)
select * from renamed
Add schema file:
# models/staging/schema.yml
version: 2
models:
- name: stg_orders
description: Cleaned and standardized orders from raw data
columns:
- name: order_id
description: Unique order identifier
tests:
- unique
- not_null
- name: customer_id
description: Customer who placed the order
tests:
- not_null
Mart models contain business logic:
-- models/marts/fct_orders.sql
with orders as (
select * from {{ ref('stg_orders') }}
),
customers as (
select * from {{ ref('stg_customers') }}
),
final as (
select
orders.order_id,
orders.customer_id,
customers.customer_name,
orders.order_date,
orders.order_total,
orders.order_status
from orders
left join customers
on orders.customer_id = customers.customer_id
)
select * from final
For large datasets, use incremental models:
-- models/marts/fct_events.sql
{{
config(
materialized='incremental',
unique_key='event_id',
on_schema_change='fail'
)
}}
with events as (
select * from {{ source('raw', 'events') }}
{% if is_incremental() %}
where event_timestamp > (select max(event_timestamp) from {{ this }})
{% endif %}
)
select * from events
# models/marts/schema.yml
version: 2
models:
- name: fct_orders
description: Order facts with customer information
columns:
- name: order_id
description: Unique order identifier
tests:
- unique
- not_null
- name: order_total
description: Total order amount
tests:
- not_null
- dbt_utils.accepted_range:
min_value: 0
Staging (stg_):
Intermediate (int_):
Marts (fct_, dim_):
For detailed information, see:
npx claudepluginhub p/armanzeroeight-dbt-toolkit-plugins-dbt-toolkitProvides dbt patterns for model organization in staging, intermediate, and marts layers, including project structure, sources, configs, SQL examples, and testing setups. Useful for data transformation projects.
Provides production-ready patterns for dbt including model organization, testing, documentation, and incremental processing for analytics engineering.
Creates dbt models following project conventions, discovers naming patterns, runs dbt build to verify, and checks output correctness.