
Auto Run Examples
OfficialFreeEffortlessly execute Python examples with logging and rerun capabilities.
Free · Opens the source repo
What Auto Run Examples does
The Auto Run Examples skill simplifies the process of executing Python example scripts in an automated manner. By running the command uv run examples/run_examples.py, users can enable optional dependencies such as litellm, any-llm, and others. The skill is designed for developers who need to test and validate their Python examples quickly while maintaining detailed logs of each execution. The auto mode allows for seamless interaction, automatically handling inputs and approvals, which is particularly useful in environments where manual input would slow down the testing process.
The skill generates logs for each example run, stored in the .tmp/examples-start-logs/ directory, allowing users to track the execution process and outcomes easily. Should any examples fail, the skill can create a rerun list, facilitating quick re-execution of only the failed tests. This feature is beneficial for developers who want to ensure their examples are functioning correctly without having to rerun the entire suite, saving both time and resources.
Additionally, the skill provides a suite of helper commands through the run.sh script, which allows users to start, stop, check status, and view logs of their example runs. The background option keeps the process running independently, ensuring that developers can continue working without interruption. This skill is particularly suited for those working in environments where Python examples are frequently updated or tested, such as during development cycles or in educational settings.
Overall, the Auto Run Examples skill is a valuable tool for developers looking to streamline their testing processes, enhance productivity, and maintain thorough documentation of their example executions.
When to use it
Use this skill when you need to run multiple Python examples quickly and efficiently, especially in an automated testing environment.
When not to use it
Avoid using this skill for isolated examples that do not require extensive logging or where manual input is essential for the testing process.
What you can build with it
Automated Testing
Use the skill to run a suite of Python examples automatically during development to ensure they function correctly.
Logging Outputs
Capture detailed logs of example runs for analysis or debugging purposes.
Efficient Reruns
Quickly rerun only the failed examples from your last execution without needing to restart the entire suite.
How to install Auto Run Examples
View source1. Install with the skills CLI
npx skills add openai/openai-agents-python/examples-auto-run --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by openaiexamples-auto-run
What it does
- Runs
uv run examples/run_examples.pywith:- Optional dependency extras enabled by default:
litellm,any-llm,sqlalchemy,redis,blaxel,modal,runloop, andtemporal. EXAMPLES_INTERACTIVE_MODE=auto(auto-input/auto-approve).- Per-example logs under
.tmp/examples-start-logs/. - Main summary log path passed via
--main-log(also under.tmp/examples-start-logs/). - Generates a rerun list of failures at
.tmp/examples-rerun.txtwhen--write-rerunis set.
- Optional dependency extras enabled by default:
- Provides start/stop/status/logs/tail/collect/rerun helpers via
run.sh. - Background option keeps the process running with a pidfile;
stopcleans it up.
Usage
# Start (auto mode; interactive included by default)
.agents/skills/examples-auto-run/scripts/run.sh start [extra args to run_examples.py]
# Examples:
.agents/skills/examples-auto-run/scripts/run.sh start --filter basic
.agents/skills/examples-auto-run/scripts/run.sh start --include-server --include-audio
# Check status
.agents/skills/examples-auto-run/scripts/run.sh status
# Stop running job
.agents/skills/examples-auto-run/scripts/run.sh stop
# List logs
.agents/skills/examples-auto-run/scripts/run.sh logs
# Tail latest log (or specify one)
.agents/skills/examples-auto-run/scripts/run.sh tail
.agents/skills/examples-auto-run/scripts/run.sh tail main_20260113-123000.log
# Collect rerun list from a main log (defaults to latest main_*.log)
.agents/skills/examples-auto-run/scripts/run.sh collect
# Rerun only failed entries from rerun file (auto mode)
.agents/skills/examples-auto-run/scripts/run.sh rerun
Codex execution environment
- When Codex invokes
startorrerun, run the command outside the Codex sandbox by default (sandbox_permissions=require_escalated). Many examples start nested sandboxes, browsers, npm helpers, or cloud/local service processes; running from inside the Codex sandbox can produce environment-only failures such assandbox-exec: sandbox_apply: Operation not permitted, Playwright cache permission errors, or npm cache permission errors. - Use sandboxed execution only when the user explicitly asks for it or when running a narrow dry-run / log inspection command that does not execute examples.
Defaults (overridable via env)
EXAMPLES_INTERACTIVE_MODE=autoEXAMPLES_INCLUDE_INTERACTIVE=1EXAMPLES_INCLUDE_SERVER=0EXAMPLES_INCLUDE_AUDIO=0EXAMPLES_INCLUDE_EXTERNAL=0EXAMPLES_UV_EXTRAS="litellm any-llm sqlalchemy redis blaxel modal runloop temporal"(set to an empty string to disable extras)- Auto-approvals in auto mode:
APPLY_PATCH_AUTO_APPROVE=1,SHELL_AUTO_APPROVE=1,AUTO_APPROVE_MCP=1
Log locations
- Main logs:
.tmp/examples-start-logs/main_*.log - Per-example logs (from
run_examples.py):.tmp/examples-start-logs/<module_path>.log - Rerun list:
.tmp/examples-rerun.txt - Stdout logs:
.tmp/examples-start-logs/stdout_*.log
Notes
- The runner delegates to
uv run --extra ... examples/run_examples.py, which already writes per-example logs and supports--collect,--rerun-file, and--print-auto-skip. examples/sandbox/extensions/vercel_runner.pyis temporarily excluded from auto runs due to credential issues. Do not force-run it until the credential setup is fixed.startuses--write-rerunso failures are captured automatically.- If
.tmp/examples-rerun.txtexists and is non-empty, invoking the skill with no args runsrerunby default.
Behavioral validation (Codex/LLM responsibility)
The runner does not perform any automated behavioral validation. After every foreground start or rerun, Codex must manually validate all exit-0 entries:
- Read the example source (and comments) to infer intended flow, tools used, and expected key outputs.
- Open the matching per-example log under
.tmp/examples-start-logs/. - Confirm the intended actions/results occurred; flag omissions or divergences.
- Do this for all passed examples, not just a sample.
- Report immediately after the run with concise citations to the exact log lines that justify the validation.
Frequently asked questions about Auto Run Examples
Similar skills
Spring Boot Testing
Master testing techniques for Spring Boot 4 applications.
GitHub Issues
Manage GitHub issues efficiently with MCP tools.
Geofeed Tuner
Optimize your IP geolocation feeds in CSV format.
Batch Files
Master Windows batch scripting for automation and task management.
Adobe Illustrator Scripting
Automate your Illustrator workflows with ExtendScript.
Plugin Structure
Create and organize Claude Code plugins effectively.
