一键导入
validate-log
Scan a Stata log file for errors, warnings, suspicious patterns, and silent failures. Cross-check claimed numerical results against log contents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scan a Stata log file for errors, warnings, suspicious patterns, and silent failures. Cross-check claimed numerical results against log contents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | validate-log |
| description | Scan a Stata log file for errors, warnings, suspicious patterns, and silent failures. Cross-check claimed numerical results against log contents. |
| disable-model-invocation | true |
| argument-hint | [path/to/log file] [optional: claim to verify] |
| allowed-tools | ["Bash","Read","Grep","Task"] |
Two modes:
Mode A — log scan: pass only a log path. The skill greps for known error/warning patterns and reports them.
Mode B — claim verification: pass a log path + a numerical claim. The skill delegates to the log-validator agent, which confirms (or denies) the claim against the log.
Resolve log path from $ARGUMENTS (or list logs/*.log if not given and ask).
Run the standard error grep:
grep -nE "^r\(\d+\);" logs/<file>.log # Stata error code lines
grep -nE "invalid syntax|not found|no observations|conformability error" logs/<file>.log
grep -nE "no variables defined|file ... already exists" logs/<file>.log
Check the merge tab (silent dropped rows are a common bug):
grep -A 5 "_merge" logs/<file>.log
Flag any merge where _merge == 1 (master only) or _merge == 2 (using only) is non-zero AND the do-file does not handle it.
Check sample-size funnel (required by econometric-best-practices):
grep -E "Sample N|after restriction" logs/<file>.log
The log should show N at each restriction step.
Check the tail for the most-recent estimation output, sanity-checking magnitude / sign / SE plausibility.
Report findings as a structured list:
If $ARGUMENTS includes a claim (any sentence with a number after the log path):
Delegate to the log-validator agent:
Claim: <quoted claim>
Log: <log path>
Verify per the log-verification-protocol rule.
Report the agent's verdict (VERIFIED / MISMATCH / UNVERIFIED) verbatim.
/validate-log logs/03_analysis_main_regression.log
→ Mode A: scans for errors and reports.
/validate-log logs/03_analysis_main_regression.log "ATT = -1.632 (SE 0.584)"
→ Mode B: confirms the claim is in the log.
/validate-log (no args) → lists logs/*.log and asks which to scan.
stata-coding-conventions..smcl — convert with translate <name>.smcl <name>.log in Stata, or update the do-file to use log using ..., text.capture likely swallowed an error. Check do-file for capture blocks.log-verification-protocol. Use it before any commit that adds numerical claims.log-validator agent (Mode B) refuses to validate fabricated claims — that's the design.Combine saved Stata estimates into publication-ready tables via esttab. Produces both .tex (for paper) and .csv (for audit) with consistent formatting.
Simulate a fresh-clone reproduction of the entire pipeline and diff the new outputs against the committed ones. Catches drift before paper submission or release.
Stage, commit, create PR, and merge to main. Use for the standard commit-PR-merge cycle.
End-to-end Stata analysis workflow — load, explore, clean, estimate, and produce publication-ready tables and figures with full logging.
Run a holistic narrative review on a Quarto report or Markdown document. Checks reader prerequisites, worked examples, notation clarity, structural arc, and pacing.
Render a Quarto report (Stata engine) to HTML / PDF / DOCX. Performs freshness check on included tables/figures, verifies the Stata Quarto engine, and validates numerical claims before rendering.