Agent skill · Data & Analytics

stata-python-translation

Stata-to-Python translation for data analysis. Maps Stata commands (reghdfe, xtreg, ivregress, margins, esttab, svy:) to Python (polars, pyfixest, statsmodels, svy). Use when user has Stata background or requests Stata-equivalent code comments.

brycew6m878★ · +32/wk · 1 repos on radarProfile →
claude-codeNOASSERTION
Install
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill stata-python-translation --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 11
SKILL.md size: 24 KB
Bundled scripts: none
Path: skills/17-DAAF-Contribution-Community-daaf/dot-claude/skills/stata-python-translation/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 3,244
Language: Stata
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Translates Stata commands and workflows to Python equivalents within the DAAF ecosystem, covering data management, regression modeling, causal inference, surveys, visualization, and workflow tooling. It also provides an annotation protocol for agents to add inline Stata-equivalent comments to Python code, and identifies where Stata concepts diverge from Python.

How it works

The skill maps Stata commands and idioms to Python packages (e.g., polars, pyfixest, statsmodels, linearmodels, marginaleffects, svy, plotnine) across topics like data management, regression modeling, and visualization. It offers reference files in ./references/ that explain paradigm differences, command-by-command translations, and edge cases. It includes a Quick Decision Trees section guiding users on translating specific Stata commands to Python equivalents, and a comprehensive Command Mapping Overview detailing fidelity and differences. It also lists library versions and notes about which packages are unpinned.

How to use

  • For auditing DAAF Python code from a Stata perspective, read paradigm-differences.md and the relevant domain file (e.g., data-management.md, regression-modeling.md).
  • For annotating code with Stata-equivalent comments, follow the Agent Code Annotation Protocol and use the relevant domain file as guidance.
  • For translating a Do-file, consult the reference structure and the Quick Decision Trees to locate the appropriate mapping.

When to use it

Use when a user has a Stata background, requests Stata-equivalent code comments, needs to audit Python code from a Stata perspective, or wants to translate Stata concepts to Python.

What it can touch

The skill references Python packages and workflows including polars, pyfixest, statsmodels, linearmodels, marginaleffects, svy, plotnine, plotly, and the svy package. It presents a mapping table showing which Stata commands map to which Python packages and functions, and notes fidelity levels.

Caveats

The skill is a routing hub with reference files rather than a single executable translation. It notes paradigm differences, and indicates where direct equivalents are absent or differ in API. It references specific Python and Stata packages and versions as of March 2026.

From the SKILL.md

# Stata-to-Python Translation Skill Stata-to-Python translation reference for quantitative social science data analysis. Maps Stata commands and packages (reghdfe, xtreg, ivregress, margins, esttab, svy:, graph twoway) to DAAF Python equivalents (polars, pyfixest, statsmodels, linearmodels, marginaleffects, svy, plotnine). Use when user mentions Stata background, requests Stata-equivalent code com

More from Auto-Empirical-Research-Skills
All skills →
About this skill
What does the stata-python-translation skill do?

Stata-to-Python translation for data analysis. Maps Stata commands (reghdfe, xtreg, ivregress, margins, esttab, svy:) to Python (polars, pyfixest, statsmodels, svy). Use when user has Stata background or requests Stata-equivalent code comments.

How do I install it?

Run `npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill stata-python-translation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From brycewang-stanford/Auto-Empirical-Research-Skills, a repository with 3,244 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going