Stata Log
Documentsstata-logStata Log is an Agent Skill for documents published in the brycewang-stanford/Auto-Empirical-Research-Skills repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Tail, read, or search a Stata log file from a previous command or background task.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills/blob/HEAD/skills/64-tmonk-mcp-stata/skills/stata-log/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/stata-log, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Parse the argument:
- First token: log file path or background task_id
- Second token (optional): search term
If a search term is provided, call:
stata_read_log(path=<first_token>, query=<second_token>, before=2, after=2, regex=False)
Display matching lines with context.
If no search term, call:
stata_read_log(path=<first_token>, tail_lines=50)
Display the last 50 lines of the log.
If the argument looks like a task_id (not a file path), call:
stata_read_log(task_id=<argument>, tail_lines=50)
If no argument is provided, tell the user to supply a log file path or task_id. These are returned by stata_run in the log_path field of the JSON response.
If the log is large and truncated, note the offset for reading more (the response includes the current byte offset).