Skip to content

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
View on GitHub

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, assert checks, labeling, and a codebook
  • Enforces reproducibility practices such as clear all, log files, assert and isid checks, 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 -y

Installs 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:

  1. What is the data source? (survey, administrative, API, etc.)
  2. What is the unit of observation?
  3. What are the key variables needed for analysis?
  4. Are there known data quality issues to address?

Step 2: Generate Cleaning Pipeline

Create a Stata do-file that:

  1. Has a clear header with project info and date
  2. Sets up the environment (clear all, set memory, log)
  3. Loads and inspects raw data
  4. Documents each transformation with comments
  5. 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 9

Similar to Stata Data Cleaning

More Data Science & Analytics