Works with the AI Agents you already use
train test leakage auditor
by 2592980960
Audit tabular train/test splits for duplicate rows, identifier overlap, and target leakage using data-only checks.
Free
train test leakage auditor
Example session with this skill installed
Audit these files for leakage. Train is 'data/train_v1.csv', test is 'data/test_v1.csv'. The target is 'is_converted' and the id is 'user_uuid'.
- Read your context and instructions
- Compiled the train test leakage
- Generated the data export
I have completed the data-level leakage audit. The check identified one critical overlap between the splits.
Train/Test Leakage Audit Report
Verdict: BLOCK (partial)
Inputs:
- Train:
data/train_v1.csv(10,450 rows) - Test:
data/test_v1.csv(2,500 rows) - Target:
is_converted - ID Column:
user_uuid
| ID | Severity | Check | Evidence |
|---|---|---|---|
| L001 | BLOCK | Identifier Overlap | 42 unique user_uuid values found in both splits. |
| S001 | INFO | Schema Match | All 14 columns match across splits. |
| T002 | INFO | Target Distribution | Train (12.4% positive), Test (N/A - unlabeled). |
Recommended actions
- Resolve ID Overlap: Remove the 42 overlapping users from the training set to prevent memorization.
- Verify Split Logic: Review the sampling script to ensure it is grouped by
user_uuidrather than random row-wise.
Not checked
- Code-level preprocessing (scaling, encoding).
- Temporal leakage (timestamp ordering).
- Data provenance.
Reproduce
python scripts/audit_leakage.py --train data/train_v1.csv --test data/test_v1.csv --target is_converted --id-column user_uuid
Next steps
- Review the list of 42 overlapping UUIDs in the log file.
- Re-run the split using a grouped strategy.
- Re-audit the new files before training.
train_v1.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Data leakage is often the silent killer behind models that look perfect in training but fail in production. This skill audits train and test splits for contamination without needing access to your training pipelines or notebooks.
What it does
- Duplicate Detection identifies exact or near-duplicate rows that straddle the train/test boundary.
- Identifier Overlap flags unique keys or IDs present in both splits, preventing data memorization.
- Schema Validation checks for drift or column mismatches between the two datasets.
- Target Leakage Analysis finds features that proxy the label or encode future information.
- Severity Ranking categorizes findings as BLOCK, WARN, or INFO based on established rubrics.
How it works
- Input Verification confirms file existence, row/column counts, and target column presence.
- Audit Execution runs the
audit_leakage.pyscript against your train and test files. - Severity Calibration matches script outputs against the
severity-rubric.mdfor accurate reporting. - Report Generation produces a structured audit report using the
audit_report_template.md.
Frameworks & tools
This skill uses a Python-based auditor that relies on the standard library for maximum portability. It supports csv, tsv, and delimited text files.
Why this beats prompting it yourself
Generic prompts often miss "proxy" leakage or fail to check row-level overlap systematically across large files. This tool follows a rigid, severity-ranked protocol and provides a reproducible command for every audit it performs.
Use cases
- Validating a new dataset split handed over by a third party or colleague.
- Investigating suspiciously high test metrics (AUC/F1) before deployment.
- Documenting split integrity for technical papers or model documentation.
- Detecting feature drift when regenerating splits from a live data source.
Known limitations
Does not detect code-level leakage like fitting scalers on the full dataset or temporal shuffling errors. Requires a target column for label-based checks.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 15 days ago
- Free with an Agensi account
Permissions
What's inside
Creator
2592980960
Frequently Asked Questions
New in LLM Ops
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.