# Stata Modernize

> Stata Modernize is an Agent Skill for development published in the brycewang-stanford/Auto-Empirical-Research-Skills repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Improve, modernize, and optimize existing Stata code for performance, portability, and maintainability. Use when legacy patterns such as preserve/restore, cd,

- Skill name: `stata-modernize`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills/blob/HEAD/skills/64-tmonk-mcp-stata/skills/stata-modernize/SKILL.md
- Repository: brycewang-stanford/Auto-Empirical-Research-Skills (2,866 GitHub stars when collected)

## SKILL.md

# Modernize Stata

Use this skill when a user wants stronger Stata code, not just working Stata code.

1. Identify the current anti-patterns.
2. Recommend or implement modern replacements with clear rationale.
3. Favor frames, `reghdfe`, `gtools`, portable paths, and explicit state handling.

Read `references/patterns.md` for common replacements and examples.

---

Source: https://www.openparable.com/skill/development/stata-modernize (OpenParable). Cite the canonical URL above.
