data leakage detection lab
by nowrich
Inspects ML pipelines to identify and fix data leakage, contaminated features, and accidental hindsight.
Secure checkout via Stripe
Works with the AI tools you already use
See it in action
You say
Review this pipeline. I am using StandardScaler.fit(X) then train_test_split. My features include a rolling 30-day mean of the target variable. Is there leakage?
Your agent does
Leakage detected. 1) Preprocessing Leak: StandardScaler must be fit only on X_train to avoid test set statistics influencing training. 2) Future Leak: Rolling target means must be lagged or computed cumulatively to ensure future outcomes do not inform past predictions.
What you get
About this skill
The problem
Machine learning models often report suspiciously high performance that collapses in production. This usually stems from data leakage, where information from the future or the test set accidentally contaminates the training process.
What it does
- Identifies future information leakage by auditing feature timestamps against label timestamps.
- Detects preprocessing contamination where scalers, encoders, or imputers are fit on the full dataset before splitting.
- Spots sample and group leakage where duplicate entities or near-duplicate records straddle the train-test boundary.
- Exposes accidental hindsight by flagging features derived from revised, updated, or backfilled data.
- Performs adversarial validation to determine if training and test sets are statistically distinguishable.
Frameworks & tools
Designed for Python-based data science stacks including scikit-learn, pandas, NumPy, and XGBoost/LightGBM. Works with Jupyter notebooks and automated ML pipelines.
Why this beats prompting it yourself
Standard LLMs often miss subtle leakage patterns like target encoding inside cross-validation or group-based dependencies. This skill uses specific diagnostic playbooks and adversarial tests to catch technical debt that manual reviews overlook.
Use cases
- Audit a Jupyter notebook before moving a model to a production environment.
- Debug why a model achieved 0.99 AUC on real-world noisy data.
- Verify that a temporal split correctly handles rolling windows and lag features.
- Ensure multi-user datasets don't leak information via group identity.
Known limitations
Requires access to the data pipeline code and feature engineering logic. It cannot detect leakage in pre-compiled black-box models without seeing the training workflow.
How to install
Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- 30-day refund guarantee
- One-time purchase, yours forever
- Secure checkout via Stripe
Frequently Asked Questions
Popular in Testing & QA

Ironclad — Senior Software Developer
Makes your coding agent work like a senior developer: exact money, configurable rules, real audit trails, honest testing. Any stack, any country.
Prompt Dataset Builder
Build and curate high-quality prompt datasets for fine-tuning and eval — deduped and labeled.
Python Test Generator — Plain-English Test Results for Your Python Code
Paste your Python code and get a plain-English test report — what works, what doesn't, what's unfinished, and exactly what to do next.
verify-before-shipping
Stop guessing and start proving: Force your AI agent to provide verifiable execution logs for every 'done' claim.