← LeaderboardThe Skill Leaderboard

stata-lint

Run static analysis on a Stata .do or .ado file and report style and best-practice issues.

Published by brycewang-stanford ↗brycewang-stanford/Auto-Empirical-Research-Skills

Try your first task

stata-lint

Start a fresh conversation. Replace the highlighted placeholders.

Use stata-lint to lint the Stata file at [absolute .do or .ado path] and report findings by severity, including line numbers and modern alternatives.

Required inputs

  • [absolute .do or .ado path]

User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗

SKILL.md

name: stata-lintdescription: Run static analysis on a Stata .do or .ado file and report style and best-practice issues.

The argument is the absolute path to a .do or .ado file.

  1. Call stata_inspect_data(action="lint", path=<argument>).

  2. Display the lint results, grouping issues by severity or type:

    • Line number and issue description for each finding
    • Common issues: use of cd, preserve/restore, #delimit, hardcoded paths, long lines, missing version statement
  3. For each category of issue found, briefly explain the modern alternative (refer to the stata-modernize skill for details).

  4. If the file is clean, confirm: "No issues found in <filename>."

  5. If the path argument is missing, tell the user to provide an absolute path to a .do or .ado file.

stata-lint by brycewang-stanford · The Skill Leaderboard