- Home
- Skills
- Research & Analysis
- ML Dataset Auditor & Leakage Checker
ML Dataset Auditor & Leakage Checker
by Qasim Khan
Profiles and audits any dataset for ML: data quality, leakage risks, the right train/test split, and a prioritized, leakage-safe preprocessing plan.
Free
What it does
- Inspects dataset structure, quality, and missingness with evidence, not assumptions
- Investigates target leakage, train/test contamination, and temporal/group leakage
- Recommends the correct split strategy for the data (random, stratified, time-based, group-aware)
- Designs leakage-safe preprocessing (every transform fit on training data only)
- Prioritizes every finding by severity, likely impact, and effort
- Produces a full dataset audit report ready to hand to a modeling team
Who it's for
Data scientists starting on an unfamiliar dataset
Get a full quality and leakage audit before modeling.
Try asking: “Audit this churn dataset for leakage and recommend a split strategy.”
ML engineers debugging a model that doesn't generalize
Get the leakage investigation that usually finds the bug.
Try asking: “My model works in training but fails in production — check for leakage.”
Students and researchers preparing a dataset for a paper
Get a reproducible preprocessing plan.
Try asking: “Design a preprocessing pipeline for this tabular dataset.”
ML Dataset Auditor & Leakage Checker
Example session with this skill installed
I have a customer churn CSV. Target is churned (0/1), one row per customer-month, and I want to predict churn 30 days ahead for existing customers. Audit missingness, duplicates, temporal leakage, entity leakage, split design, and preprocessing. Don't assume a random split is valid.
- Read your context and instructions
- Compiled the ml dataset auditor
Dataset Audit: Customer Churn
Structure: 1 row per customer-month — the same customer appears multiple times. A random split will leak customer-specific patterns from train into test. Flagged: do not random-split.
Missingness: last_login_days missing in 8% of rows, concentrated in the first month of each customer's history — likely informative (new customers have no login history yet) rather than random. Recommend a missingness indicator, not deletion.
Temporal leakage check: need to confirm support_tickets_30d is computed using only data available before the prediction timestamp. Flagging as a must-resolve question before training.
Duplicates: no exact duplicate rows; 340 customer-months share identical feature values except customer_id — consistent with genuinely similar customers, not a data bug.
Recommended split: group-aware + time-based, not random. Split by customer_id (no customer in both train and test) and by time (train months 1-10, validate 11, test 12) to simulate real deployment.
Preprocessing plan: (1) missingness indicator for last_login_days, (2) one-hot encode low-cardinality categoricals, out-of-fold target encoding for region (47 values) fit only within each training fold, (3) all scalers/encoders wrapped in an sklearn Pipeline, fit after the split.
Priority fixes: (1) resolve the support_tickets_30d timing ambiguity, (2) implement group+time split before further modeling, (3) missingness indicator.
Open question: is last_login_days available at prediction time in production, or only retrospectively?
Connects securely to your tools. The creator never sees your data.
About this skill
The problem it solves
Most leakage bugs (future information in features, duplicate entities crossing train/test, transforms fit before the split) are invisible until the model fails silently in production. This skill is built around strict evidence discipline — it won't claim to have inspected data it hasn't seen, and chases leakage systematically instead of assuming a dataset is clean.
How it works
Establishes the task (target, task type, deployment setting), inspects structure, audits quality (missingness, invalid values, cardinality), examines distributions and class imbalance, investigates leakage and validity, recommends a split strategy matched to the data-generating process, designs preprocessing with pipeline-based leakage prevention, prioritizes a fix list, and produces a reproducible audit report.
Frameworks & tools
Prefers pandas, numpy, and scikit-learn (Pipeline, ColumnTransformer) when code execution is available, with leakage prevention enforced by fitting transforms after the split, not before.
Why this beats prompting it yourself
Has explicit decision rules per task type (classification, regression, time series, grouped observations, high-cardinality categoricals) and refuses to default to a random split for temporal or grouped data without justifying why — the single most common ML mistake it's designed to catch.
Use cases
- First-pass audit of a new dataset before building a model
- Diagnosing why a model performs well in training but fails in production
- Choosing a validation split strategy for time series or grouped data
- Designing a leakage-safe preprocessing pipeline
Known limitations
Can only audit data it can actually inspect — if none is supplied, it asks for the dataset rather than guessing, and never fabricates statistics, sources, or model results.
Pure SKILL.md package. Ships references/analysis-checklist.md, references/split-strategy.md, templates/dataset-audit-report.md (required deliverable), examples/example-request.md (worked churn-prediction example), and tests/quality-tests.md. When Python execution is available, uses pandas/numpy/scikit-learn (df.info(), describe(), missingness summaries, value_counts, Pipeline/ColumnTransformer). For large datasets, uses sampling or chunking and discloses the limitation. No raw sensitive records are printed.
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 today
- Free with an Agensi account
Works without code execution (schema-based audit), but a sandbox tool gives deeper, data-verified findings. Code execution / sandbox tool (for running pandas and scikit-learn directly on the dataset).
Permissions
File Scopes
Reads the dataset file(s) the user supplies to profile and audit them. Optionally runs pandas/scikit-learn code for statistics — no writes, no network.
What's inside
Frequently Asked Questions
New in Research & Analysis
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Research & Analysis.