Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add dbt-labs/dbt-agent-skills --skill adding-dbt-unit-testgit clone --depth 1 https://github.com/dbt-labs/dbt-agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/dbt-labs/dbt-agent-skills/adding-dbt-unit-test)<a href="https://agentmods.dev/skills/dbt-labs/dbt-agent-skills/adding-dbt-unit-test"><img src="https://agentmods.dev/badge/skills/dbt-labs/dbt-agent-skills/adding-dbt-unit-test/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/dbt-labs/dbt-agent-skills/adding-dbt-unit-test"><img src="https://agentmods.dev/badge/skills/dbt-labs/dbt-agent-skills/adding-dbt-unit-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00044 | $0.04210 |
| Opus 5.5 | $0.00018 | $0.01684 |
| Sonnet 5.5 | $0.00009 | $0.00842 |
| Haiku 4.5 | $0.00004 | $0.00421 |
Grade A, and why
adding-dbt-unit-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- adding-dbt-unit-test — 91% identical, 64 lines differ
How it starts
The opening of the file, as written. The whole thing — 402 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add unit test for a dbt model
Additional Resources
- Spec Reference - All required and optional YAML keys for unit tests
- Examples - Unit test examples across formats (dict, csv, sql)
- Incremental Models - Unit testing incremental models
- Ephemeral Dependencies - Unit testing models depending on ephemeral models
- Special Case Overrides - Introspective macros, project variables, environment variables
- Versioned Models - Unit testing versioned SQL models
- BigQuery Caveats - BigQuery-specific caveats
- BigQuery Data Types - BigQuery data type handling
- Postgres Data Types - Postgres data type handling
- Redshift Caveats - Redshift-specific caveats
- Redshift Data Types - Redshift data type handling
- Snowflake Data Types - Snowflake data type handling
- Spark Data Types - Spark data type handling
What are unit tests in dbt
dbt unit tests validate SQL modeling logic on static inputs before materializing in production. If any unit test for a model fails, dbt will not materialize that model.
When to use
You should unit test a model:
- Adding Model-Input-Output scenarios for the intended functionality of the model as well as edge cases to prevent regressions if the model logic is changed at a later date.
- Verifying that a bug fix solves a bug report for an existing dbt model.
More examples:
- When your SQL contains complex logic:
- Regex
- Date math
- Window functions
case whenstatements when there are manywhens- Truncation
- Complex joins (multiple joins, self-joins, or joins with non-trivial conditions)
- When you're writing custom logic to process input data, similar to creating a function.
- Logic for which you had bugs reported before.
- Edge cases not yet seen in your actual data that you want to be confident you are handling properly.
- Prior to refactoring the transformation logic (especially if the refactor is significant).
- Models with high "criticality" (public, contracted models or models directly upstream of an exposure).
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/examples.md 4.5 KB
- references/spec.md 1.6 KB
- references/special-cases-ephemeral-dependency.md 432 B
- references/special-cases-incremental-model.md 2.6 KB
- references/special-cases-special-case-overrides.md 1.9 KB
- references/special-cases-versioned-model.md 905 B
- references/warehouse-bigquery-caveats.md 149 B
- references/warehouse-bigquery-data-types.md 1.2 KB
- references/warehouse-postgres-data-types.md 750 B
- references/warehouse-redshift-caveats.md 754 B
- references/warehouse-redshift-data-types.md 694 B
- references/warehouse-snowflake-data-types.md 823 B
- references/warehouse-spark-data-types.md 664 B
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 402 lines · 44 tokens per session scan A b185a1ead747
adding-dbt-unit-test is a skill published in the GitHub repository dbt-labs/dbt-agent-skills (746 stars, last pushed 2d ago), licensed Apache-2.0. It adds 44 tokens to every session and 4,210 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
cargo-pgrx
Choose and run cargo-pgrx commands, pgrx tests, pgtest coverage, and pgsys boundary checks.
blueprint-cloudflare-data
Turn the spec's tables into D1 migrations with tests.
jpa-persistence-test
Writes the persistence tests of a use case (UC-XXX) for Spring Data JPA: @DataJpaTest classes against a real database in a Testcontainers container (never H2 unless the project already tests on it), test data from Flyway test migrations, one UC RepositoryTest class per use case with @UseCase annotations. Tests only…
synthetic-seeder
Generate two-sided synthetic data tests (source + Snowflake) for migrated stored procedures and functions. Derives test scenarios from source SQL branch analysis, writes step-based validation YAML artifacts, and enriches them with isolation metadata. Use when generating or refreshing test cases for a migrated object.…
phpunit-migration-test-generation
Use this skill when the user asks to generate, write, or create migration tests for a Shopware 6 migration class — phrases like "generate migration tests", "write a migration test", "create migration test", "test this migration", "test Migration1234Foo". Analyzes the source migration's SQL operations to pick an…
proc-test-gen
Derive source-of-truth functional-equivalence assertions for ONE converted Informatica-to-Snowflake-Scripting mapping procedure (data-flow), independent of the converted SQL. Seeds input, deploys+CALLs the proc in an isolated test schema, and grades its target table against expected contents computed from the source…