From dbt-pipeline-toolkit
Execute dbt commands (run, test, compile, docs, build, snapshot, seed, source freshness, deps, debug, list, clean) for analytics engineering workflows. Use when running dbt models, testing data quality, generating documentation, managing dbt projects, running snapshots, or implementing Slim CI patterns. Supports advanced model selection, full refresh, state comparison, and parallel execution.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dbt-pipeline-toolkit:dbt-runnerThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Execute dbt commands in the current dbt project to build, test, and document data transformations.
Execute dbt commands in the current dbt project to build, test, and document data transformations.
This skill provides a wrapper for common dbt CLI operations, making it easy to run analytics engineering workflows from Claude Code. It handles command execution, output capture, and error reporting.
The skill is invoked through the Python script located in scripts/run_dbt.py.
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select my_model+
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" test
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" test --select my_model
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" compile
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" docs generate
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" docs serve
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --full-refresh
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" snapshot
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" seed
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" source freshness
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" deps
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" debug
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" build --select my_model+
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" list --select tag:daily
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" clean
Run only modified models and their downstream dependencies for efficient CI/CD:
# Assumes state files exist in target/
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select state:modified+
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" test --select state:modified+
Setup:
dbt run and then dbt docs generate as two separate commands (atomic-only rule)Benefits:
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select stg_*
Issue these as two separate atomic Bash calls — the plugin forbids compound shell expressions (see the Bash command rules in this SKILL.md and in the repo's CLAUDE.md):
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select my_model
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" test --select my_model
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" compile --select my_model
# Check target/compiled/[project]/models/ for compiled SQL
The --select flag supports dbt's powerful selection syntax:
model_name: Specific modelmodel_name+: Model and all downstream dependencies+model_name: Model and all upstream dependencies+model_name+: Model and all dependencies (parents + children)stg_*: Pattern matching for model namespython "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select tag:daily
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select tag:pii
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select path:models/staging/salesforce
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" test --select test_type:generic
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" test --select test_type:singular
# Union (OR) - run both models and their children
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select fct_sales+,dim_customer+
# Intersection (AND) - models that match both criteria
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select fct_sales+,tag:daily
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --exclude tag:deprecated
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" test --exclude test_type:data
# 2 levels of parents
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select 2+fct_sales
# 1 level of children
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --select fct_sales+1
Pass variables at runtime:
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --vars '{"start_date": "2024-01-01", "end_date": "2024-12-31"}'
Force full table rebuild for incremental models:
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --full-refresh --select fct_sales
Stop on first failure:
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" test --fail-fast
Control parallelism:
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --threads 8
Run against specific target environment:
python "${CLAUDE_PLUGIN_ROOT}/skills/dbt-runner/scripts/run_dbt.py" run --target prod
The script assumes:
dbt commandThe script captures dbt output and returns:
This skill is designed to be used by the dbt-developer agent for executing dbt operations. The agent can:
npx claudepluginhub kavasimihaly/ai-plugins --plugin dbt-pipeline-toolkitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.