validate-log

Scans Python and R dataframes and returns structured validation reports.

220|358|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/maxwell2732/codex-stata-for-economists --skill validate-log
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validate-log
Source: https://github.com/maxwell2732/codex-stata-for-economists/tree/main/.claude/skills/validate-log
Command: npx skills add https://github.com/maxwell2732/codex-stata-for-economists --skill validate-log

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents silent Stata run failures by scanning logs for errors, warnings, suspicious patterns, and missing indications that results were actually produced.

Core Features & Use Cases

  • Mode A — Log Scan: Greps a Stata log for known error codes and common failure patterns such as invalid syntax, missing files, no observations, undefined variables, and suspicious merge outcomes.
  • Sample-size funnel checks: Detects whether the log reports sample sizes at restriction steps (e.g., before/after restrictions) to support econometric best practices.
  • Last estimation sanity check: Pulls the most recent estimation output so you can spot implausible magnitudes/signs or problematic SE plausibility.
  • Use Case: Verify that a do-file truly ran end-to-end (including merges and restrictions) and that the reported coefficients exist in the log rather than being accidentally fabricated or produced from an incomplete run.

Quick Start

Ask Codex to validate a completed regression run by scanning a specific log file at logs/03_analysis_main_regression.log for errors, warnings, merge issues, sample-size funnel reporting, and the latest estimation summary.

Frequently Asked Questions about validate-log

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

FAQPage Schema
How do I check a Stata log file for errors and failed commands?

To check a Stata log file for errors, you can scan it using grep-based pattern matching for known error codes, invalid syntax, missing files, and undefined variables. This validates that the do-file executed completely without silent failures.

Can I verify that my Stata regression coefficients actually exist in the log?

Yes, you can verify regression coefficients exist in the log by checking the last estimation output for implausible magnitudes or signs. This prevents relying on accidentally fabricated results from incomplete runs.

How do I detect merge issues in Stata logs?

You detect merge issues in Stata logs by scanning for suspicious merge outcomes and known warning patterns. This catches silent data drops during merges that compromise econometric reproducibility.

What is sample-size funnel reporting in econometrics logs?

Sample-size funnel reporting tracks observation counts before and after restrictions in Stata logs. It supports econometric best practices by ensuring the log documents exactly how the sample was narrowed.

Do I need any special dependencies to validate Stata logs for reproducibility?

No special dependencies are required to validate Stata logs for reproducibility. The process relies on deterministic grep-based checks over a provided log path to find errors, warnings, and missing econometric indicators.

Why does my Stata log show no observations after restrictions?

A Stata log showing no observations after restrictions indicates a failed sample-size funnel step. Scanning the log for this pattern helps identify overly restrictive data filters that silently dropped all records.