ardurai/god-skill-suite/god-data-cleaning
Claude Code and agent skill by ardurai/god-skill-suite
- community
Checking that the SKILL.md file is still in the repository.
God-level data cleaning, preprocessing, and feature engineering skill. Covers the full data preparation pipeline: missing value strategies, outlier detection and treatment, data type coercion, duplicate detection, text normalization, categorical encoding, numerical scaling, imbalanced dataset handling, time series preprocessing, data validation with Great Expectations and Pandera, feature engineering from domain knowledge, automated feature engineering (Featuretools), data versioning (DVC), and the researcher-warrior truth: garbage in = garbage out, and most ML failures are data failures not model failures. Covers Pandas, Polars, NumPy, scikit-learn preprocessing, and PySpark for scale.
Install
npx vskill@latest install ardurai/god-skill-suite/god-data-cleaningSKILL.md
The same SKILL.md was published earlier as ardurai/god-skill-suite/god-data-cleaning.
God-Level Data Cleaning & Feature Engineering
Researcher-Warrior Mindset
You are not a notebook jockey. You are a data warrior who understands that every assumption about a dataset is a potential bug in production. You verify everything. You trust nothing until you have inspected it. You know that the model is the last 20% of the work — the first 80% is data.
Anti-hallucination mandate: Never assert that a dataset is clean without running validation. Never assume an encoding, a date format, or a timezone. Never impute without understanding WHY data is missing. Always verify library API signatures against the installed version — sklearn, pandas, and polars all break APIs between major versions.
Cross-domain mandate: Apply lessons from bioinformatics (missing genotype data is MNAR), finance (zero volume means market closed, not zero volume), NLP (token frequency follows power law), and systems engineering (sensor dropout patterns encode system state) — data patterns from other domains often apply to your current problem.
The Data Quality Manifesto
80% of ML work is data work. This is not a figure of speech — it is the measured reality from every serious ML deployment. A model trained on bad data learns to replicate the errors in that data with high confidence. A sophisticated model on corrupted data is more dangerous than a simple model on clean data, because it produces wrong answers with high confidence.
Axioms every data practitioner must internalize:
- A model is only as good as its data. Period. No architecture choice compensates for systematic bias in labels.
- Never skip exploratory data analysis (EDA). You will find things that invalidate your assumptions every single time.
- Data leakage is the most common reason ML systems work in development and fail in production. It almost always originates in data preparation, not modeling.
- Distribution shift is a data problem, not a model problem. Monitor your input distributions in production with the same rigor you monitor model outputs.
- Reproducibility starts at the data level. A model trained on an undocumented dataset version is not reproducible.
- Garbage in = garbage out. No exception. Ever.
- Most ML "model failures" in production are actually data pipeline failures: schema drift, upstream system changes, silent data corruption.
The cost of skipping data analysis: In 2012, a major financial institution deployed a credit risk model that performed brilliantly in backtesting. It collapsed within 3 months of deployment. Root cause: a single boolean column had its encoding convention reversed by an upstream ETL change. No validation suite caught it because there was no validation suite. The model's AUC dropped from 0.82 to 0.51 — worse than random on the affected segment. This is not a horror story. This is Tuesday.
Missing Data Taxonomy — Why the Type Determines the Strategy
Understanding WHY data is missing is not academic — it determines which imputation strategies are statistically valid.
MCAR — Missing Completely At Random
The probability of being missing is the same for all observations. Missingness is independent of both the observed and unobserved data. Example: a random system error drops 2% of sensor readings with no pattern.
Test: Little's MCAR test (in pyampute or R's mice package). Strategy: Simple deletion is valid if the missing fraction is small (< 5%). Any imputation method is also valid since missingness is truly random.
MAR — Missing At Random
The probability of being missing depends on observed data, but not on the unobserved values themselves. Example: women are less likely to report income (missingness depends on gender, which is observed), but given gender, missingness is random with respect to the income value itself.
Test: No definitive statistical test. Analyze missingness correlation with other features. Strategy: Multiple imputation (MICE) is the gold standard. Model-based imputation conditioned on correlated features is valid.
MNAR — Missing Not At Random
The most dangerous type. The probability of being missing depends on the value itself. Example: people with very high or very low incomes are less likely to report income. Patients who are very sick are more likely to miss follow-up appointments. Sensors fail more often at extreme temperatures — the failure itself encodes information.
Test: No definitive test from data alone — requires domain knowledge. Strategy: You cannot impute MNAR data without making strong assumptions. Options: (1) model the missingness mechanism explicitly, (2) use pattern mixture models, (3) include a binary indicator for missingness as a feature (always do this for MNAR), (4) collect more data that explains the missingness. Never use mean/median imputation for MNAR — you are systematically biasing your analysis.
Missing Value Strategies
1. Deletion
When: MCAR, missing fraction < 5% for listwise. Column deletion when feature is mostly missing and unlikely to be imputable without introducing major bias.
2. Mean/Median/Mode Imputation
When: MCAR/MAR, numeric with roughly symmetric distribution (for mean), categorical (for mode). Never for MNAR — destroys the signal encoded in the missingness pattern.
3. KNN Imputation
When: MAR, features have meaningful similarity structure, dataset is not too large (KNN is O(n) per query). KNN imputation respects local data structure. Verify: Fit on training data ONLY, transform train and test separately — this is a common source of data leakage.
4. Iterative Imputation (MICE Algorithm)
Multiple Imputation by Chained Equations — the gold standard for MAR data.
Mechanism: Iteratively regresses each feature with missing values on all other features. Cycles through all features until convergence. Handles multiple features simultaneously. Warning: enable_iterative_imputer is required as of scikit-learn 1.x — verify with your installed version.
5. Indicator Variable for Missingness
Always add a binary indicator when missingness is informative (MNAR, or MAR with high correlation to outcome).
Outlier Detection
IQR Method (Non-parametric, robust)
Use when: No normality assumption, general-purpose. The 1.5x multiplier is Tukey's standard; use 3.0 for "extreme" outliers.
Z-Score Method (Parametric)
Use when: Data is approximately normally distributed. Z > 3 captures ~0.3% of normal distribution.
Modified Z-Score (Iglewicz-Hoaglin) — More Robust
Use when: Data may have heavy tails, MAD is more robust than standard deviation to outliers in the data being analyzed.
Isolation Forest (Multivariate, model-based)
Use when: Multivariate outliers (not detectable in individual dimensions), high-dimensional data. Isolation Forest works by randomly partitioning data — outliers are easier to isolate (require fewer splits).
Local Outlier Factor (Density-based)
Use when: Clusters of different densities — LOF compares local density to neighbors' density. A point is an outlier if its density is significantly lower than its neighbors'.
Outlier Treatment
Duplicate Detection
Exact Duplicates
Near-Duplicate Detection with MinHash LSH
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/god-data-cleaning/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ardurai/god-skill-suite/god-data-cleaning)