
Adding Dbt Unit Test
This handles the YAML scaffolding for dbt unit tests, mocking upstream inputs and defining expected outputs for your models. It's designed for test-driven development workflows where you want to validate SQL logic before materializing anything in production. The skill comes directly from dbt Labs and includes comprehensive reference docs for different warehouse-specific quirks (BigQuery, Snowflake, Redshift, etc.) plus guidance on testing incremental models and ephemeral dependencies. One thing to note: you'll need upstream models to exist in your warehouse before running unit tests standalone, though the docs explain how to use the empty flag to create schema-only versions cheaply. Best suited for testing complex SQL logic like window functions, date math, or gnarly case statements where you want confidence before deploying.
- skills.sh installs
- 1.1K
- GitHub stars
- 759
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dbt-labs/dbt-agent-skills --skill adding-dbt-unit-test --agent claude-codeInstalls into .claude/skills of the current project.
Files
Sponsors
Details
- Repository
- github.com/dbt-labs/dbt-agent-skills
- Categories
- Testing & QA, AI & Agent Building
- First seen
- Jun 3, 2026
More from dbt-labs/dbt-agent-skills
All 13- Running Dbt Commands1.1K
- 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