test-driven-data-science

test-driven-data-science is a skill for Claude Code from zpower426/datapowers. It costs 41 tokens per session (2,475 once invoked), scanned A, original, MIT.

A data-validation process that checks datasets at three levels before model training: schema, business rules, and statistical distribution. TDD here means test-driven development, where checks are written and run before the main work proceeds.

In plain words
What is it for?
Use it before training or retraining after new data or features arrive, to validate structure, domain rules, and distribution stability.
Why use it?
It blocks training when data has wrong types, impossible values, or unexpected distribution changes that could make a model unreliable.

Skill for Claude Code

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

Part of the datapowers plugin — 20 skills, 3 commands, 3 agents, 1 hook shipped together

Good fit Use it before training or retraining after new data or features arrive, to validate structure, domain rules, and distribution stability.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zpower426/datapowers/test-driven-data-science
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 zpower426/datapowers --skill test-driven-data-science
Clone the repo
git clone --depth 1 https://github.com/zpower426/datapowers

Made for: Claude Code.

Or install datapowers, the plugin that ships this one along with the rest of its 20 skills, 3 commands, 3 agents, 1 hook.

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 test-driven-data-science

README.md
[![agentmods](https://agentmods.dev/badge/skills/zpower426/datapowers/test-driven-data-science/github.svg)](https://agentmods.dev/skills/zpower426/datapowers/test-driven-data-science)
Your own site
<a href="https://agentmods.dev/skills/zpower426/datapowers/test-driven-data-science"><img src="https://agentmods.dev/badge/skills/zpower426/datapowers/test-driven-data-science/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 test-driven-data-science

Your own site · 80×15
<a href="https://agentmods.dev/skills/zpower426/datapowers/test-driven-data-science"><img src="https://agentmods.dev/badge/skills/zpower426/datapowers/test-driven-data-science.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,475 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.00041 $0.02475
Opus 5.5 $0.00016 $0.00990
Sonnet 5.5 $0.00008 $0.00495
Haiku 4.5 $0.00004 $0.00248

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

Security

Grade A, and why

test-driven-data-science 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 2mo 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/test-driven-data-science/SKILL.md · 260 lines

How it starts

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

Test-Driven Data Science (TDDS)

Write and run three layers of data assertions before every training step. If any CRITICAL assertion fails, STOP — do not train. Fix the data, then re-run all three layers.

Why three layers: Schema checks catch type errors. Business rule checks catch impossible domain values. Statistical checks catch silent distribution shifts that break trained models. One layer is not enough.

Iron Laws

  • NO TRAINING WITHOUT PASSING ALL THREE ASSERTION LAYERS
  • NO SILENT FAILURES — every failed assertion must be named and reported
  • NEVER skip Statistical layer because "it's the same data source"

When to Use

Data arrives / pipeline produces new features
           ↓
Run Layer 1: Physical (schema)    ← always first
           ↓ pass
Run Layer 2: Logical (business)   ← domain rules
           ↓ pass
Run Layer 3: Statistical (drift)  ← distribution stability
           ↓ pass
Proceed to training

Trigger this skill whenever:

  • New data arrives from an upstream pipeline
  • A feature engineering step produces a new dataset
  • You are about to call model.fit() for the first time or after any data change

Layer 1 — Physical (Schema) Assertions

Check that the DataFrame matches the declared schema. Use Pandera.

import pandera as pa
from pandera import Column, DataFrameSchema, Check
import pandas as pd

def build_physical_schema(expected_columns: dict) -> DataFrameSchema:
    """
    expected_columns: {col_name: {"dtype": pa.Float, "nullable": False, "checks": [...]}}
    """
    return DataFrameSchema(
        columns={
            name: Column(
                spec["dtype"],
                nullable=spec.get("nullable", False),
                checks=spec.get("checks", []),
            )
            for name, spec in expected_columns.items()
        },
        strict=True,  # fail on unexpected columns
    )

# Example schema
schema = build_physical_schema({
    "age":          {"dtype": pa.Float, "nullable": False, "checks": [Check.between(0, 120)]},
    "income":       {"dtype": pa.Float, "nullable": True,  "checks": [Check.greater_than_or_equal_to(0)]},
    "churn_label":  {"dtype": pa.Int,   "nullable": False, "checks": [Check.isin([0, 1])]},
})

def run_physical_layer(df: pd.DataFrame, schema: DataFrameSchema) -> dict:
    try:
        schema.validate(df, lazy=True)
        return {"layer": "physical", "status": "PASS", "failures": []}
    except pa.errors.SchemaErrors as e:
        failures = e.failure_cases[["column", "check", "failure_case"]].to_dict("records")
        return {"layer": "physical", "status": "FAIL", "failures": failures}

Read the full file on GitHub · 260 lines

Files

What ships with it

1 file 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. 2mo ago First seen · 260 lines · 41 tokens per session scan A bc07b920e463

Subscribe to this mod's changes

test-driven-data-science is a skill published in the GitHub repository zpower426/datapowers (1 stars, last pushed 7mo ago), licensed MIT. It adds 41 tokens to every session and 2,475 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-08-31.

Related

test-driven-data-science compared with skills from other repositories

test-driven-data-science next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-driven-data-sciencezpower426/datapowersSkill17mo agoMITA41Claude Code
local-llmTserenTserenov/FMT-exocortex-templateSkill63todayMITA78Claude Code
multimodal-blip-2davila7/claude-code-templatesSkill33ktodayMITA52Claude Code, Codex
post-training-grpo-rl-trainingdavila7/claude-code-templatesSkill33ktodayMITA28Claude Code, Codex
prompt-engineering-instructordavila7/claude-code-templatesSkill33ktodayMITA44Claude Code, Codex
emerging-techniques-long-contextdavila7/claude-code-templatesSkill33ktodayMITA78Claude Code, Codex
emerging-techniques-model-mergingdavila7/claude-code-templatesSkill33ktodayMITA77Claude Code, Codex