
Stata Data Cleaning
Generates comprehensive Stata do-files for cleaning messy economic data with a strong emphasis on reproducibility. It walks you through understanding your data source and unit of observation, then outputs a full pipeline with proper logging, assertions, and documentation. The template handles the usual suspects: missing value codes, duplicates, outliers, variable labeling. What I like here is the opinionated structure with globals for paths, extensive comments explaining transformations, and validation checks using assert statements. Built by the Awesome Econ AI Community, so it reflects actual empirical workflow practices rather than just syntax examples. If you're tired of writing the same data cleaning boilerplate for every new dataset, this gives you a solid starting point.
- skills.sh installs
- 357
- GitHub stars
- 668
- last updated
- Aug 21, 2026
Install
$ npx -y skills add meleantonio/awesome-econ-ai-stuff --skill stata-data-cleaning --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/meleantonio/awesome-econ-ai-stuff
- Category
- AI & Agent Building
- First seen
- Jun 3, 2026