# Data Quality And Contract Testing

> Drives data implementation with contracts, assertions, and validation evidence. Use when adding or changing ingestion logic, transformations, schemas, or published data products.

- **Type:** Skill
- **Install:** `agentstack add skill-vaquarkhan-data-engineering-agent-skills-data-quality-and-contract-testing`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [vaquarkhan](https://agentstack.voostack.com/s/vaquarkhan)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [vaquarkhan](https://github.com/vaquarkhan)
- **Source:** https://github.com/vaquarkhan/data-engineering-agent-skills/tree/main/skills/data-quality-and-contract-testing
- **Website:** https://vaquarkhan.github.io/data-engineering-agent-skills/

## Install

```sh
agentstack add skill-vaquarkhan-data-engineering-agent-skills-data-quality-and-contract-testing
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Data Quality And Contract Testing

## Overview

Data work is not complete when code runs. It is complete when source assumptions, output contracts, and quality checks prove the behavior is correct.

## When to Use

- new source ingestion
- schema changes
- transformation logic updates
- new or changed published tables
- bug fixes involving bad data or broken metrics

Do not use this only as a final cleanup step. It should guide implementation from the start.

## Workflow

1. Define the contract before implementation.
   Capture:
   - required fields
   - key constraints
   - expected types
   - allowed null behavior
   - freshness expectations
   - reconciliation rules

2. Write the validation plan first.
   Common validations:
   - uniqueness
   - non-null thresholds
   - referential integrity
   - accepted values
   - row count deltas
   - source-to-target totals

3. Reproduce data bugs with a failing check.
   If an incident or defect exists, write the failing validation or test before changing the pipeline.

4. Implement the smallest change that satisfies the contract.

5. Run the relevant validations and capture evidence.
   Evidence may include:
   - test output
   - query results
   - sample reconciliation output
   - dry-run logs

## Common Rationalizations

| Rationalization | Reality |
| --- | --- |
| "The warehouse query looks right." | Visual inspection does not scale and misses edge cases. |
| "We will add checks after the model stabilizes." | Unchecked pipelines create low-trust data and harder incident response. |
| "A successful job means the data is valid." | Jobs succeed while still producing incorrect or incomplete data. |

## Red Flags

- no contract exists for a published dataset
- an incident fix ships without a failing reproduction check
- only happy-path sample data is validated
- freshness or completeness expectations are absent

## Verification

- [ ] Contracts are written before or alongside implementation
- [ ] Relevant checks exist for correctness, completeness, and freshness
- [ ] Defects are reproduced with a failing validation before the fix
- [ ] Evidence from validation is captured and reviewable

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [vaquarkhan](https://github.com/vaquarkhan)
- **Source:** [vaquarkhan/data-engineering-agent-skills](https://github.com/vaquarkhan/data-engineering-agent-skills)
- **License:** MIT
- **Homepage:** https://vaquarkhan.github.io/data-engineering-agent-skills/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-vaquarkhan-data-engineering-agent-skills-data-quality-and-contract-testing
- Seller: https://agentstack.voostack.com/s/vaquarkhan
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
