Stata Data Cleaning
Reproducible Stata do-file generator for cleaning messy economic datasets, with setup, validation, and documentation.
- CCM score
- 56 of 100
- skills.sh installs
- 362
- GitHub stars
- 684
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the cleaning workflow: data intake questions, a do-file pipeline, variable cleaning, missing-data handling, derived variables, and validation
- Includes a full example do-file with missing-value recoding, outlier capping, categorical and age-group construction,
assertchecks, labeling, and a codebook - Enforces reproducibility practices such as
clear all, log files,assertandisidchecks, and never overwriting raw data - Designed for economists preparing survey or administrative data for regression analysis and replication
Install
$ npx -y skills add meleantonio/awesome-econ-ai-stuff --skill stata-data-cleaning -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Stata Data Cleaning
Purpose
This skill helps economists clean, transform, and prepare datasets for analysis in Stata. It emphasizes reproducibility, proper documentation, and handling common data quality issues found in economic research.
When to Use
- Cleaning raw survey or administrative data
- Merging multiple data sources
- Handling missing values, duplicates, and outliers
- Creating analysis-ready panel datasets
- Documenting data transformations for replication
Instructions
Step 1: Understand the Data
Before generating code, ask the user:
- What is the data source? (survey, administrative, API, etc.)
- What is the unit of observation?
- What are the key variables needed for analysis?
- Are there known data quality issues to address?
Step 2: Generate Cleaning Pipeline
Create a Stata do-file that:
- Has a clear header with project info and date
- Sets up the environment (clear all, set memory, log)
- Loads and inspects raw data
- Documents each transformation with comments
- Creates a codebook for the final dataset
Step 3: Follow Best Practices
Details
- Repository
- github.com/meleantonio/awesome-econ-ai-stuff
- Category
- Data Science & Analytics
- First seen
- Jun 3, 2026
Questions
What does the stata-data-cleaning skill do?
stata-data-cleaning helps economists clean, transform and prepare datasets for analysis in Stata. It emphasizes reproducible workflows, proper documentation and handling common data quality issues such as missing values, duplicates and outliers.
How do I install the stata-data-cleaning skill?
Run npx -y skills add meleantonio/awesome-econ-ai-stuff --skill stata-data-cleaning -y in a project to install stata-data-cleaning. After that, the agent can generate a Stata do-file that sets up the environment, loads and inspects raw data, and creates a codebook for the final dataset.
What does stata-data-cleaning need to run?
stata-data-cleaning needs Stata 15 or newer, since some of its commands require newer versions. It also recommends installing the user-written commands unique, mdesc and labutil from SSC.
Where does stata-data-cleaning stand in its category?
stata-data-cleaning is listed under Data Science & Analytics on Claude Marketplaces, alongside azure-kusto, analyze-project, run-train, explore-run and add-analytics-instrumentation. Its own focus is Stata do-files for economic research data, with logs and value labels for replication.
More from meleantonio/awesome-econ-ai-stuff
All 9Similar to Stata Data Cleaning
More Data Science & Analyticsstata-regressionSkillmeleantonio/awesome-econ-ai-stuff434 installsStructured Stata regression workflow that produces publication-ready tables with esttab and reghdfe support.
r-econometricsSkillmeleantonio/awesome-econ-ai-stuff349 installsGuided R workflow for IV, DiD, and RDD analyses with fixest-based code and built-in diagnostics.
empirical-analysis-stataPluginbrycewang-stanford/Auto-Empirical-Research-Skills5.1K starsExplicit 8-step empirical-analysis pipeline in the traditional Stata ecosystem (reghdfe + ivreg2 + csdid + did_imputation + sdid + rdrobust + synth + psmatch2 +
data-analystSkillailabs-393/ai-labs-claude-skills1.2K installsDataset cleanup pipeline that detects missing values, imputes them, and builds interactive Plotly Dash dashboards.
Data Cleaning PipelineSkillaj-geddes/useful-ai-prompts607 installsReusable Python pipeline that cleans raw tabular data through imputation, outlier handling, deduplication, and validation.