# Stata Modernize

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

- Skill: `brycewang-stanford/stata-modernize` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds add brycewang-stanford/stata-modernize`
- Raw SKILL.md: https://api.skillmd.com/api/skills/brycewang-stanford/stata-modernize/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: brycewang-stanford (https://skillmd.com/u/brycewang-stanford)
- Updated: 2026-08-19
- Page: https://skillmd.com/skills/brycewang-stanford/stata-modernize

---


# 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.

