python-uv

Standardize Python script execution using uv with PEP 723 templates.

2|Updated Jun 29, 2021
One-click install
npx skills add https://github.com/pypeaday/dotfiles --skill python-uv-pypeaday
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-uv
Source: https://github.com/pypeaday/dotfiles/tree/main/opencode/.config/opencode/skill/python-uv
Command: npx skills add https://github.com/pypeaday/dotfiles --skill python-uv-pypeaday

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes Python script execution by using uv as the default runtime for Python scripts, reducing setup friction and ensuring consistent run semantics across projects.

Core Features & Use Cases

  • UV-first execution: Use uv as the launcher for Python scripts, installations, and tooling.
  • PEP 723 template guidance: Scripts should declare metadata and dependencies in a standard header and be runnable via uv run.
  • Use Case: Teams migrating from direct python invocations to uv-based workflows to ensure reproducible environments.

Quick Start

  • Create a PEP 723 compliant script with a main() entry point following the template in the SKILL.md.
  • Run it with uv run path/to/script.py
  • Example: uv run path/to/script.py

Frequently Asked Questions about python-uv

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

FAQPage Schema
How do I run Python scripts with uv using PEP 723 metadata?

To run Python scripts with uv, define a PEP 723 compliant header with metadata and optional dependencies, include an executable main() entry point, and launch it using the command uv run path/to/script.py.

What is the best way to standardize Python script execution across different development environments?

Standardizing Python script execution is achieved by adopting uv as the default runtime and enforcing PEP 723 compliant templates, which ensures consistent run semantics and reproducible environments across projects.

Why should I use uv run instead of direct python path/to/script.py invocations?

Using uv run instead of direct python invocations reduces environment setup friction and ensures dependencies declared in the PEP 723 header are resolved automatically, enforcing reproducible script execution.

Do I need to follow a specific template structure for PEP 723 scripts to work with uv?

Yes, scripts must follow a PEP 723 template that includes a standard metadata header for dependencies and an executable main() function to serve as the runnable entry point for uv run.

Can I migrate existing Python workflows to uv-based execution without changing script logic?

Migrating to uv-based execution requires wrapping existing logic in a main() function and adding a PEP 723 metadata header, but the core script logic remains unchanged while gaining reproducible run semantics.