data-validation-contracts

data-validation-contracts is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 56 tokens per session (1,692 once invoked), scanned A, original, Apache-2.0.

Guidance for checking data whenever it enters code from a file, API, database table, upload, or model. A data contract states required rules such as which values may be missing, which keys must be unique, and which values are allowed.

In plain words
What is it for?
Use it to add checks around data boundaries, joins, cleaning steps, model inputs, and model outputs. It covers tools such as Pandera, Great Expectations, Pydantic, and dbt checks.
Why use it?
Untrusted input can produce incorrect results without causing an obvious error. These checks make bad data stop the process with a clear explanation instead of silently spreading through later steps.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add checks around data boundaries, joins, cleaning steps, model inputs, and model outputs. It covers tools such as Pandera, Great Expectations, Pydantic, and dbt checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/data-validation-contracts
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 makifbaysal/tasktrooper --skill data-validation-contracts
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

Made for: Claude Code, Codex.

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 data-validation-contracts

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/data-validation-contracts/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/data-validation-contracts)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/data-validation-contracts"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/data-validation-contracts/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 data-validation-contracts

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/data-validation-contracts"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/data-validation-contracts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,692 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 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.00056 $0.01692
Opus 5.5 $0.00022 $0.00677
Sonnet 5.5 $0.00011 $0.00338
Haiku 4.5 $0.00006 $0.00169

Measured 4d ago against content hash 23ee3ff364fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

data-validation-contracts 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 4d 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.

catalog/agents/data-scientist/skills/data-validation-contracts/SKILL.md · 150 lines

How it starts

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

Data Validation and Contracts

Overview

Code that trusts its input computes wrong numbers quietly. A contract states what the data must look like at a boundary and stops the pipeline, with a readable message, when it does not. EDA finds the facts (eda-and-data-profiling); contracts keep them true.

Core principle: validate at every boundary, fail loudly with the column and the bad values, and never catch a validation error just to keep going.

1. What to check — the dimensions

Dimension Question Typical check
Completeness Are required values present? not-null on keys and required fields
Uniqueness Is the grain what we think? unique on the (composite) key
Validity Are values in range and in the allowed set? ge/le, isin, regex, dtype
Consistency Do columns agree with each other? shipped_at not null when status == "shipped"
Referential integrity Do foreign keys point at something? relationship test, anti-join count
Timeliness Is the data fresh and the period complete? max timestamp within N hours
Volume Is the batch plausibly sized? row count within a range of recent batches

Check the columns your logic depends on, not every column — a contract nobody can maintain gets disabled.

2. Which tool where — follow the repo

Boundary Tool (if the repo has none yet)
DataFrames inside Python code and tests pandera (import pandera.pandas as pa; pandera.polars for Polars)
Pipeline checkpoints with stored results and docs Great Expectations (GX Core 1.x) — only if the repo already runs it
Single records: API payloads, configs, messages Pydantic 2 models
Warehouse tables built by dbt dbt data tests and model contracts (sql-analytics-and-dbt)

Never add a second validation library beside the one the repository uses (rule stack-choice).

3. pandera schemas as code

import pandas as pd
import pandera.pandas as pa
from pandera.typing import DataFrame, Series

class Orders(pa.DataFrameModel):
    order_id: Series[str] = pa.Field(unique=True)
    customer_id: Series[str]
    amount: Series[float] = pa.Field(ge=0)
    status: Series[str] = pa.Field(isin=["placed", "shipped", "refunded"])
    shipped_at: Series[pd.Timestamp] = pa.Field(nullable=True)

    class Config:
        strict = True
        coerce = True

    @pa.dataframe_check
    def shipped_orders_have_a_date(cls, df: pd.DataFrame) -> pd.Series:
        return ~((df["status"] == "shipped") & df["shipped_at"].isna())

@pa.check_types(lazy=True)
def clean_orders(raw: DataFrame[Orders]) -> DataFrame[Orders]:
    ...

Read the full file on GitHub · 150 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. 4d ago First seen · 150 lines · 56 tokens per session scan A 23ee3ff364fe

Subscribe to this mod's changes

data-validation-contracts is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 56 tokens to every session and 1,692 once invoked, about $0.0002 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-10-09.