stata · franklee16 — Claude Code skill: Stata reference for .do files
A Stata reference that Claude opens while you write, debug or explain .do files, from data cleaning to reghdfe and Mata.
no license ★ 240 updated 2026-09-18
npx skills add franklee16/academic-research-skills --skill stata -a claude-codeWhat stata does
The skill gives Claude a set of Stata reference documents. Ask for a .do file and the matching ones come up: import and cleaning, descriptive statistics, regression, panel and time-series models, logit/probit/tobit, causal effects, Mata, graphics, export to Excel and Word. Community packages have their own sections, reghdfe and estout among them.
SKILL.md is an index with a routing table. 1–3 files per task, not the whole library. The same file spells out the traps: missing values sorting above every number, = where == belongs, an unclosed local macro quote, by on unsorted data, a categorical variable left continuous without i., an uninspected _merge after a merge, and weight types that do not swap.
Routing reads the phrasing of your request. Naming the command and the variables gets the right reference; a broad question does not.
What it helps with
- write a
.dofile that merges and reshapes without breaking variable names - find out why missing values slipped into
if income > 50000 - build a regression table with
esttaband export it to Word - fit a fixed-effects panel model with
reghdfeand run a Hausman test - move a slow loop into Mata
Example prompts for the agent
- Write a
.dofile that loads the panel, runsxtset id yearand fits a fixed-effects model withreghdfe. - Why do missing values show up in
list if age > 60, and how do I exclude them? - Turn these regressions into an
esttabtable and export it to Word.
How to install stata
1Skills CLI (Vercel)
npx skills add franklee16/academic-research-skills --skill stata -a claude-code2Manually: put the files in place
~/.claude/skills/stata/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/stata/
1Skills CLI (Vercel)
npx skills add franklee16/academic-research-skills --skill stata -a codex2Manually: put the files in place
.agents/skills/stata/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add franklee16/academic-research-skills --skill stata -a cursor2Manually: put the files in place
.cursor/skills/stata/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install franklee16/academic-research-skills data-analysis/stata/SKILL.md2Manually: put the files in place
.github/skills/stata/SKILL.md1Skills CLI (Vercel)
npx skills add franklee16/academic-research-skills --skill stata -a gemini-cli2Platform CLI
gemini skills install https://github.com/franklee16/academic-research-skills --path data-analysis/stataManually: put the files in place
.devin/skills/stata/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about stata
How do I install the stata skill in Claude Code?
Run npx skills add franklee16/academic-research-skills --skill stata -a claude-code. The skill lands at ~/.claude/skills/stata/SKILL.md.
What does the stata skill do?
It gives Claude Stata references for data work, econometrics, graphics and Mata, plus sections on community packages such as reghdfe and estout.
Does it load every reference file at once?
No. SKILL.md limits each task to 1–3 files picked from its routing table.
Similar skills
All skills for Science and research →stata by other authors comes first.