ml-data-leakage-guard
Detects and prevents data leakage in machine learning and mathematical modeling. Auto-activates after ML tasks involving: data cleaning, feature engineering, data augmentation, algorithm development, normalization, missing value imputation, dimensionality reduction, feature selection, time series modeling. Checks if features/statistics would be available at prediction time.
npx skills add majiayu000/claude-skill-registry --skill ml-data-leakage-guard --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# ML Data Leakage Guard Skill Automatically detects and prevents data leakage in machine learning workflows by verifying that all preprocessing steps, feature engineering, and statistical computations would be available at prediction time. ## When to Use This Skill **AUTO-ACTIVATES** at the end of responses involving: - Data preprocessing (normalization, standardization, scaling) - Missing value imputation - Feature engineering and feature selection - Dimensionality reduction (PCA, SVD, t-SNE) - Target encoding or label encoding - Time series feature construction - Data augmentation strategies - Algorithm development and optimization - Train-test split procedures - Cross-validation setup ## Not For / Boundaries - Pure theoretical ML discussions without implementation - Model architecture design (without data preprocessing) - Hyperparameter tuning (unless it involves data-dependent operations) ## Core Principle **The Golden Rule**: At the exact moment of prediction in production, can I access this value from the database or compute it using only information available up to that point? If the answer is "no" or "not completely", then data leakage exists. ## Quick Reference ### Critica
- When to Use This Skill
- Not For / Boundaries
- Core Principle
- Quick Reference
- Critical Leakage Patterns
- Leakage Detection Checklist
- The "Prediction Time" Test
- Examples
- Example 1: Detecting Normalization Leakage
- Example 2: Detecting Missing Value Imputation Leakage
- Example 3: Detecting Time Series Leakage
- Example 4: Detecting Target Encoding Leakage
- Example 5: Detecting Post-Event Feature Leakage
- Leakage Severity Levels
What does the ml-data-leakage-guard skill do?
Detects and prevents data leakage in machine learning and mathematical modeling. Auto-activates after ML tasks involving: data cleaning, feature engineering, data augmentation, algorithm development, normalization, missing value imputation, dimensionality reduction, feature selection, time series modeling. Checks if features/statistics would be available at prediction time.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill ml-data-leakage-guard --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
