One-click install
npx skills add https://github.com/maxwell2732/codex-stata-for-economists --skill run-stata
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: run-stata
Source: https://github.com/maxwell2732/codex-stata-for-economists/tree/main/.claude/skills/run-stata
Command: npx skills add https://github.com/maxwell2732/codex-stata-for-economists --skill run-stata

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

It helps you run a Stata do-file end-to-end reliably and quickly confirm whether the analysis actually succeeded, using the project’s wrapper, logs, and output checks.

Core Features & Use Cases

  • Batch execution via project wrapper: Runs a specified do-file in Stata batch mode from the project root, capturing exit code and producing a consistent log.
  • Safety checks before execution: Resolves the do-file path, confirms the file exists, and validates declared inputs in the do-file header.
  • Post-run validation and output verification: Scans the log for common Stata runtime errors (including r(<n>) patterns and missing observations) and verifies expected artifacts referenced in the do-file’s Outputs header.

Quick Start

Ask Codex to run the Stata analysis by instructing it: “/run-stata dofiles/03_analysis/main_regression.do, then report the log path, any errors found, and which expected tables/figures were created.”

Frequently Asked Questions about run-stata

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a Stata do-file in batch mode and verify the results?▼

To run a Stata do-file in batch mode, execute it through the project wrapper from the repository root. The wrapper captures the exit code, produces a consistent log, scans for r(<n>) runtime errors, and verifies expected output artifacts.

How does log validation work for Stata econometrics workflows?▼

Stata log validation works by scanning the batch execution log for common runtime failure signatures, including r(<n>) error patterns and missing observations, confirming whether your econometric analysis script succeeded.

What is the best way to check for missing outputs after running a Stata do-file?▼

The best way to check for missing outputs is to verify expected artifacts referenced in the do-file's Outputs header after execution, ensuring all declared tables and figures were successfully created.

Do I need to validate declared inputs before executing a Stata do-file?▼

Yes, you need to validate declared inputs before execution. The workflow resolves the do-file path, confirms the file exists, and checks declared inputs in the do-file header to ensure deterministic econometric analysis.

Why does my Stata do-file fail silently without showing runtime errors?▼

Stata do-files can fail silently if logs are not properly parsed for r(<n>) error patterns or missing observations. Using a batch-mode runner that scans logs captures these failure signatures and reports them.