
Running Dbt Commands
This handles the messy reality of running dbt commands: picking the right CLI flavor (Core, Fusion, or Cloud), formatting selectors with graph operators, and structuring parameters so they actually work. It defaults to `dbt build` over `dbt run` because testing alongside execution catches issues immediately, always uses `--select` to avoid accidentally running your entire project, and includes `--quiet` with error options to reduce noise while catching selector typos. The Quick Reference section is legitimately useful if you forget the syntax for inline queries or how to pass variables as JSON strings. Built by dbt Labs, so the opinions here (like always using selectors, always building instead of just running) reflect how the tool is meant to be used in practice.
- skills.sh installs
- 1.1K
- GitHub stars
- 759
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dbt-labs/dbt-agent-skills --skill running-dbt-commands --agent claude-codeInstalls into .claude/skills of the current project.
Files
Running dbt Commands
Preferences
- Use MCP tools if available (
dbt_build,dbt_run,dbt_show, etc.) - they handle paths, timeouts, and formatting automatically - Always use
build— even when users say "run" - When a user asks to "run" a model, recommenddbt buildinstead.build=run+testin one step, so it catches data quality issues immediately.dbt runalone is almost never the right answer during development. - Always use
--quietwith--warn-error-options '{"error": ["NoNodesForSelectionCriteria"]}'to reduce output while catching selector typos - Always use
--select- never run the entire project without explicit user approval
Quick Reference
# Standard command pattern
dbt build --select my_model --quiet --warn-error-options '{"error": ["NoNodesForSelectionCriteria"]}'
# Preview model output
dbt show --select my_model --limit 10
# Run inline SQL query
dbt show --inline "select * from {{ ref('orders') }}" --limit 5
# With variables (JSON format for multiple)
dbt build --select my_model --vars '{"key": "value"}'
# Full refresh for incremental models
dbt build --select my_model --full-refresh
Sponsors
Details
- Repository
- github.com/dbt-labs/dbt-agent-skills
- Categories
- Code Review & Quality, AI & Agent Building, CLI & Terminal
- First seen
- Jun 3, 2026
More from dbt-labs/dbt-agent-skills
All 13- Answering Natural Language Questions With Dbt1.1K
- Configuring Dbt Mcp Server1.1K
- Building Dbt Semantic Layer1K
- Troubleshooting Dbt Job Errors1K
- Working With Dbt Mesh892
- Creating Mermaid Dbt Dag530
- Migrating Dbt Project Across Platforms528
- Migrating Dbt Core To Fusion385
- Auditing Skills
- Using Dbt For Analytics Engineering1.2K
- Fetching Dbt Docs1.1K
- Adding Dbt Unit Test1.1K