plugin/skills/stata-run/SKILL.md
Run arbitrary Stata code or a .do file and display the result.
npx skillsauth add tmonk/mcp-stata stata-runInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The argument is the Stata code or absolute path to a .do file to execute.
If the argument ends in .do or .ado, call:
stata_run(code=<argument>, is_file=True, echo=True, as_json=True)
Otherwise call:
stata_run(code=<argument>, echo=True, as_json=True)
If success is true, display the stdout output. Note the output is truncated to 5,000 chars; if the response includes a log_path, offer to tail the full log with /stata-log <log_path>.
If success is false, display the error message and rc code. Suggest using /stata-lint <path> for syntax issues or /stata-help <command> for documentation.
If the command produces graphs, note that /stata-graph can export them.
If using background mode (background=True): you may do other work or fire parallel tasks, but you MUST call stata_task_status(task_id=<id>, wait=True, timeout=<N>, tail_lines=<M>) for every task before returning to the user. Set timeout to match expected runtime; set tail_lines to how much output you want inline vs. reading separately via stata_read_log. Loop on timeout until status is 'done' or 'failed'.
tools
Show mcp-stata identity, connected tools, and status. Use when the user asks if mcp-stata is available, asks about access to the toolkit, or asks what Stata tools are connected.
tools
Activate when users mention Stata commands, .do files, regressions, econometrics, stored results, graphs, dataset inspection, replication, or Stata errors. Route the task through mcp-stata tools and the specialized research skills instead of treating it as plain text coding.
development
Build and review paper-ready regression, balance, and summary tables from Stata outputs. Use when the user needs a clean table for a draft, appendix, or coauthor share-out.
tools
Install, configure, update, or verify mcp-stata across Claude Code, Codex, Gemini CLI, Cursor, Windsurf, and VS Code. Activate when users ask to set up the Stata toolkit or troubleshoot the installation.