testing-dbt-models

testing-dbt-models is a skill for Claude Code from AltimateAI/data-engineering-skills. It costs 110 tokens per session (1,096 once invoked), scanned A, original, MIT.

A guide for adding schema tests and data-quality checks to dbt models. These checks verify rules such as required values, unique identifiers, allowed categories, and valid relationships between tables.

In plain words
What is it for?
Use it when adding or changing `schema.yml` tests, or when validating keys, required fields, relationships, and accepted values in dbt models.
Why use it?
Without tests, incorrect or incomplete data can reach downstream reports and applications. The guide helps match the project's existing testing style and identify important columns to check.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the dbt-skills plugin — 7 skills shipped together

Good fit Use it when adding or changing schema.yml tests, or when validating keys, required fields, relationships, and accepted values in dbt models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/altimateai/data-engineering-skills/testing-dbt-models
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 AltimateAI/data-engineering-skills --skill testing-dbt-models
Clone the repo
git clone --depth 1 https://github.com/AltimateAI/data-engineering-skills

Made for: Claude Code.

Or install dbt-skills, the plugin that ships this one along with the rest of its 7 skills.

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 testing-dbt-models

README.md
[![agentmods](https://agentmods.dev/badge/skills/altimateai/data-engineering-skills/testing-dbt-models/github.svg)](https://agentmods.dev/skills/altimateai/data-engineering-skills/testing-dbt-models)
Your own site
<a href="https://agentmods.dev/skills/altimateai/data-engineering-skills/testing-dbt-models"><img src="https://agentmods.dev/badge/skills/altimateai/data-engineering-skills/testing-dbt-models/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 testing-dbt-models

Your own site · 80×15
<a href="https://agentmods.dev/skills/altimateai/data-engineering-skills/testing-dbt-models"><img src="https://agentmods.dev/badge/skills/altimateai/data-engineering-skills/testing-dbt-models.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,096 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 167
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found 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.00110 $0.01096
Opus 5.5 $0.00044 $0.00438
Sonnet 5.5 $0.00022 $0.00219
Haiku 4.5 $0.00011 $0.00110

Measured 1mo ago against content hash ed76fbbbc317, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testing-dbt-models 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/dbt/testing-dbt-models/SKILL.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

dbt Testing

Every model deserves at least one test. Primary keys need unique + not_null.

Workflow

1. Study Existing Test Patterns

CRITICAL: Match the project's existing testing style before adding new tests.

# Find all schema.yml files with tests
find . -name "schema.yml" -exec grep -l "tests:" {} \;

# Read existing tests to learn patterns
cat models/staging/schema.yml | head -100
cat models/marts/schema.yml | head -100

# Check for custom tests or dbt packages
ls tests/
cat packages.yml 2>/dev/null

Extract from existing tests:

  • YAML formatting style (indentation, spacing)
  • Test coverage depth (all columns vs key columns only)
  • Use of custom tests (dbt_utils, dbt_expectations, custom macros)
  • Description style (brief vs detailed)
  • Severity levels used (warn vs error)

2. Read Model SQL

cat models/<path>/<model_name>.sql

Identify: primary keys, foreign keys, categorical columns, date columns, business-critical fields.

3. Check Existing Tests for This Model

cat models/<path>/schema.yml | grep -A 50 "<model_name>"
# or
find . -name "schema.yml" -exec grep -l "<model_name>" {} \;

4. Identify Testable Columns

Column Type Recommended Tests
Primary key unique, not_null
Foreign key not_null, relationships
Categorical accepted_values (ask user for valid values)
Required field not_null
Date/timestamp not_null
Boolean accepted_values: [true, false]

5. Write Tests in schema.yml

Match the existing style from step 1. Example format (adapt to project):

version: 2

models:
  - name: model_name
    description: "Brief description of what this model contains"
    columns:
      - name: primary_key_column
        description: "Unique identifier for this record"
        tests:
          - unique
          - not_null

      - name: foreign_key_column
        description: "Reference to related_model"
        tests:
          - not_null
          - relationships:
              to: ref('related_model')
              field: related_key_column

      - name: status
        description: "Current status of the record"
        tests:
          - not_null
          - accepted_values:
              values: ['pending', 'active', 'completed', 'cancelled']

      - name: created_at
        description: "Timestamp when record was created"
        tests:
          - not_null

Read the full file on GitHub · 175 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. 1mo ago First seen · 175 lines · 110 tokens per session scan A ed76fbbbc317

Subscribe to this mod's changes

testing-dbt-models is a skill published in the GitHub repository AltimateAI/data-engineering-skills (129 stars, last pushed 5d ago), licensed MIT. It adds 110 tokens to every session and 1,096 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

prompt-regression-suite

Design a regression test suite that catches an LLM feature getting worse when the prompt, model, or context changes. Use when asked to stop prompt changes breaking production, set up golden tests or CI gates for an LLM feature, or test a model/prompt upgrade before shipping it. Produces a golden case set, per-case…

mohitagw15856/pm-claude-skills · 102 tokens

test-sqrl

Use when adding or updating tests for a DataSQRL pipeline. Use after implementing features to verify correctness.

DataSQRL/sqrl · 26 tokens

16-ai-llm-security

LLM and AI application security testing — prompt injection, jailbreak resistance, OWASP LLM Top 10 (2025), RAG and agent/tool-use security, model supply chain, and AI red teaming for authorized assessments.

Masriyan/Claude-Code-CyberSecurity-Skill · 51 tokens

eval-code

Write deterministic, code-based evaluator functions for an AI product. Use this skill whenever you need to write evaluators that check structural properties of AI outputs (format, count, presence, schema compliance) without calling another LLM. Also use when auditing existing code-based evaluators for brittleness…

Calibre-Labs/reforge-ai-evals · 68 tokens

eval-llm-judge

Write LLM-as-judge evaluator prompts for AI products. Use this skill whenever you need to evaluate semantic properties of AI outputs that cannot be checked programmatically — output quality, tone, factual accuracy, edge case handling, reference alignment. Also use when auditing existing judge prompts for bias…

Calibre-Labs/reforge-ai-evals · 92 tokens

pr-verify

Verify a Docglow change actually works before submitting or merging a PR. Runs the conformance suite, then a behavioral verification pass (flag matrix, artifact-join spot checks, pipeline contract sweep, payload budget). Use when reviewing a PR, self-reviewing a branch before opening a PR, or when asked to "verify…

docglow/docglow · 79 tokens