data-eng-testing-patterns

A guide to testing data pipelines, SQL transformations, dbt models, and the agreements that define data shape and meaning between systems.

In plain words
What is it for?
Use it to write unit tests for SQL, integration tests for pipeline stages, end-to-end workflow tests, dbt tests, data-contract tests, regression tests, and synthetic test data.
Why use it?
It helps catch incorrect rows, schemas, values, and business rules before bad data moves through a pipeline. It also provides ways to isolate failures and debug them with sample data.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/justanesta/claude-code-resources/data-eng-testing-patterns
Any agent
npx skills add justanesta/claude-code-resources --skill data-eng-testing-patterns
Clone the repo
git clone --depth 1 https://github.com/justanesta/claude-code-resources

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,029 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00067 $0.02029
Opus 5 $0.00034 $0.01014
Sonnet 5 $0.00013 $0.00406
Haiku 4.5 $0.00007 $0.00203

Measured 2d ago against content hash 049dd6773650, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

data-eng-testing-patterns 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 2d 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.

skills/data_engineering/data-eng-testing-patterns/SKILL.md · 250 lines

How it starts

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

Data Engineering Testing Patterns

Comprehensive testing strategies for data pipelines, SQL transformations, and data contracts.

Core Principles

  1. Test data, not just code - Validate row counts, schema shapes, value distributions, and business rules alongside logic
  2. Data contracts are boundaries - Every producer/consumer interface needs explicit schema and semantic contracts
  3. Idempotent test fixtures - Tests must create, validate, and tear down their own state without side effects
  4. Test at multiple granularities - Unit test individual transforms, integration test pipeline stages, end-to-end test full workflows
  5. Fail fast with clear diagnostics - Store test failures with sample rows so debugging does not require re-running the full pipeline

Unit Testing SQL Transforms

Use pytest with DuckDB to validate individual transformations in memory

import pytest
import pandas as pd
from sqlalchemy import create_engine, text

@pytest.fixture(scope="module")
def test_engine():
    engine = create_engine("duckdb:///:memory:")
    yield engine
    engine.dispose()

@pytest.fixture
def seed_orders(test_engine):
    df = pd.DataFrame({
        "order_id": [1, 2, 3],
        "customer_id": [101, 101, 102],
        "amount": [50.00, 75.00, 200.00],
        "status": ["completed", "completed", "refunded"],
    })
    df.to_sql("orders", test_engine, if_exists="replace", index=False)
    return df

def test_revenue_excludes_refunds(test_engine, seed_orders):
    result = pd.read_sql(text("""
        SELECT customer_id, SUM(amount) AS total_revenue
        FROM orders WHERE status != 'refunded'
        GROUP BY customer_id
    """), test_engine)
    assert len(result) == 1
    assert result.iloc[0]["total_revenue"] == 125.00

See sql-transform-testing.md for:

  • CTE isolation testing
  • dbt unit test patterns with mock inputs
  • Testing window functions and complex aggregations
  • Snapshot and slowly changing dimension tests

Read the full file on GitHub · 250 lines

Files

What ships with it

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

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. 2d ago First seen · 250 lines · 67 tokens per session scan A 049dd6773650

Subscribe to this mod's changes

data-eng-testing-patterns is a skill published in the GitHub repository justanesta/claude-code-resources (2 stars, last pushed 4mo ago), licensed MIT. It adds 67 tokens to every session and 2,029 once invoked, about $0.0003 per session on Opus 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-31.

Related

Other skills, from other repositories

prisma-upgrade-v7

Complete migration guide from Prisma ORM v6 to v7 covering all breaking changes. Use when upgrading Prisma versions, encountering v7 errors, or migrating existing projects. Triggers on "upgrade to prisma 7", "prisma 7 migration", "prisma-client generator", "driver adapter required".

nitrocloudofficial/nitrostack · 67 tokens

ddia-systems

Design data systems by understanding storage engines, replication, partitioning, transactions, and consistency models. Use when the user mentions "database choice", "which database should I use", "SQL or NoSQL", "replication lag", "partitioning strategy", "consistency vs availability", "stream processing", "ACID…

wondelai/skills · 138 tokens

sqlitecpp-update-sqlite

How to update the bundled SQLite3 amalgamation (sqlite3/sqlite3.c and sqlite3.h), the Meson wrap, README.md, and CHANGELOG.md. Use when upgrading SQLite, refreshing the vendored amalgamation, or bumping the sqlite3 wrap.

SRombauts/SQLiteCpp · 61 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, FK…

awslabs/agent-plugins · 227 tokens

mongodb-natural-language-querying

Generate read-only MongoDB queries (find) or aggregation pipelines using natural language, with collection schema context and sample documents. Use this skill whenever the user asks to write, create, or generate MongoDB queries, wants to filter/query/aggregate data in MongoDB, asks "how do I query...", needs help with…

mongodb/agent-skills · 162 tokens

sql-translate

Translate SQL queries between database dialects (Snowflake, BigQuery, PostgreSQL, MySQL, etc.).

AltimateAI/altimate-code · 26 tokens