- Home
- Skills
- Agents & Orchestration
- data leakage detection lab
data leakage detection lab
Inspects ML pipelines to identify and fix data leakage, contaminated features, and accidental hindsight.
$5
Works with the AI tools you already use
data leakage detection lab
Example session with this skill installed
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?
- Read your context and instructions
- Compiled the data leakage detection
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.
Connects securely to your tools. The creator never sees your data.
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
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
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 29 days ago
- Passed all security checks, Safe to install