# Adding dbt Unit Test

Write dbt unit tests with mocked inputs and expected outputs\.

Canonical: https://claudelist.com/listings/skill-dbt-labs-dbt-agent-skills-adding-dbt-unit-test

Category: Skills

Source: vendor · dbt Labs

Source checked: 2026-10-14

Website: https://github.com/dbt-labs/dbt-agent-skills/tree/main/skills/dbt/skills/adding-dbt-unit-test

Creates unit test YAML definitions that mock upstream model inputs and validate expected outputs. Use when adding unit tests for a dbt model or practicing test-driven development (TDD) in dbt.

## Install or set up

1. Review this skill’s `SKILL.md` and any prerequisites at the source.
2. From the project where you use Claude Code, run the command below. It installs only this skill into project scope; add `-g` for your personal scope.
3. Restart Claude Code and invoke `/adding-dbt-unit-test` or ask Claude to use the skill. If it does not appear, check `.claude/skills/` and the source’s setup notes.

```sh
npx skills add https://github.com/dbt-labs/dbt-agent-skills/tree/main/skills/dbt/skills/adding-dbt-unit-test --agent claude-code
```

Installation guide: https://github.com/dbt-labs/dbt-agent-skills/tree/main/skills/dbt/skills/adding-dbt-unit-test
