agentleFS
vaquarkhanvaquarkhan/data-engineering-agent-skills/skills/data-quality-and-contract-testing/SKILL.md

data-quality-and-contract-testing

Skill49 starsChanged 6 months agoMITView on GitHub

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

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not use this only as a final cleanup step.

    line 20
  2. Distinctive:

    Write the validation plan first.

    line 33
  3. Distinctive:

    If an incident or defect exists, write the failing validation or test before changing the pipeline.

    line 43
  4. Distinctive:

    Run the relevant validations and capture evidence.

    line 47
  5. Distinctive:

    no contract exists for a published dataset

    line 64
  6. Distinctive:

    only happy-path sample data is validated

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

RationalizationReality
"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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.