python-execution

Detect Python execution environments and run code with uv, venv, or system Python.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/takemi-ohama/ai-plugins --skill python-execution
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-execution
Source: https://github.com/takemi-ohama/ai-plugins/tree/main/plugins/ndf/skills/python-execution
Command: npx skills add https://github.com/takemi-ohama/ai-plugins --skill python-execution

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Running Python code can fail when the runtime environment is unknown or misconfigured. This skill automatically detects the appropriate Python execution environment (uv, venv, or system Python) and executes code with the correct command, and it provides uv setup guidance when needed.

Core Features & Use Cases

  • Auto-detect Python runtime: uv for project-managed environments, virtual environments (.venv or venv), or system Python.
  • Guided execution: choose the right invocation (uv run python, .venv/bin/python, or python3) and handle common setup steps.
  • Quick start assistance: helpful prompts for first-time project setup and running simple scripts.

Quick Start

Run a Python script with automatic environment detection and execution.

Frequently Asked Questions about python-execution

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

FAQPage Schema
How do I run a Python script with automatic environment detection?

Running a Python script with automatic environment detection involves identifying your project setup and executing code using the correct command. This skill checks for uv, venv, or system Python configurations and handles the invocation automatically.

What is the best way to execute Python code in a project with pyproject.toml?

Executing Python code in a project with pyproject.toml is best handled by using uv run python. This skill detects the pyproject.toml file and automatically selects uv to manage and run the script within the project-managed environment.

Does this Python execution skill work with both uv and venv setups?

Yes, this Python execution skill works with both uv and venv setups. It automatically detects project-managed uv environments, local virtual environments like .venv or venv, and falls back to system Python to execute your code correctly.

Why does my Python script fail to run in an unknown virtual environment?

Python scripts fail to run in an unknown virtual environment due to misconfigured runtime paths. This skill solves the problem by discovering your environment and applying the correct execution command, such as .venv/bin/python or system python3.

Do I need uv installed to run Python scripts with this environment detection?

You do not need uv installed to run Python scripts with this environment detection. The skill prioritizes uv if available but fully supports executing scripts via .venv/bin/python or system Python, providing uv setup guidance only when needed.