adding-dbt-unit-test

adding-dbt-unit-test is a skill for Claude Code from Kilo-Org/kilo-marketplace. It costs 44 tokens per session (3,831 once invoked), scanned A, a copy of adding-dbt-unit-test, Apache-2.0.

A guide to writing dbt unit tests, which check a data model’s SQL against fixed example inputs and expected outputs. TDD, or test-driven development, means using tests to define and check intended behavior while building.

In plain words
What is it for?
Use it to create unit-test YAML files for normal cases, edge cases, incremental models, and models with upstream dependencies.
Why use it?
It catches errors in model logic before the model is built with production data.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it to create unit-test YAML files for normal cases, edge cases, incremental models, and models with upstream dependencies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kilo-org/kilo-marketplace/adding-dbt-unit-test
Install

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.

Any agent
npx skills add Kilo-Org/kilo-marketplace --skill adding-dbt-unit-test
Clone the repo
git clone --depth 1 https://github.com/Kilo-Org/kilo-marketplace

Made for: Claude Code.

Wrote 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.

agentmods badge for adding-dbt-unit-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/kilo-org/kilo-marketplace/adding-dbt-unit-test/github.svg)](https://agentmods.dev/skills/kilo-org/kilo-marketplace/adding-dbt-unit-test)
Your own site
<a href="https://agentmods.dev/skills/kilo-org/kilo-marketplace/adding-dbt-unit-test"><img src="https://agentmods.dev/badge/skills/kilo-org/kilo-marketplace/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.

agentmods 80×15 button for adding-dbt-unit-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/kilo-org/kilo-marketplace/adding-dbt-unit-test"><img src="https://agentmods.dev/badge/skills/kilo-org/kilo-marketplace/adding-dbt-unit-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,831 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 91% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.03831
Opus 5 $0.00022 $0.01916
Sonnet 5 $0.00009 $0.00766
Haiku 4.5 $0.00004 $0.00383

Measured 6d ago against content hash db4c0abb2fb3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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 6d 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.

Origin

This is a copy

91% identical to adding-dbt-unit-test — 64 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/dbt/skills/adding-dbt-unit-test/SKILL.md · 362 lines

How it starts

The opening of the file, as written. The whole thing — 362 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

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 when statements when there are many whens
    • 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).

Read the full file on GitHub · 362 lines

Changes

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.

  1. 6d ago First seen · 362 lines · 44 tokens per session scan A db4c0abb2fb3

Subscribe to this mod's changes

adding-dbt-unit-test is a skill published in the GitHub repository Kilo-Org/kilo-marketplace (174 stars, last pushed 19d ago), licensed Apache-2.0. It adds 44 tokens to every session and 3,831 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to adding-dbt-unit-test, differing in 64 lines, and is treated as a copy.