single-file-uv-scripter

Create self-contained Python scripts with inline PEP 723 dependencies for uv run.

31|6|Updated Dec 13, 2025
One-click install
npx skills add https://github.com/MatiasComercio/agentic-config --skill single-file-uv-scripter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: single-file-uv-scripter
Source: https://github.com/MatiasComercio/agentic-config/tree/main/core/skills/single-file-uv-scripter
Command: npx skills add https://github.com/MatiasComercio/agentic-config --skill single-file-uv-scripter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates Python environment setup headaches by embedding dependencies directly in script headers.

Quick Start

Create a Python script that uses the requests library to fetch data from an API.

Core Features & Use Cases

  • Standalone Scripts: Generate executable Python files with inline PEP 723 metadata that run instantly with uv run.

Frequently Asked Questions about single-file-uv-scripter

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

FAQPage Schema
How do I create a Python script that runs without setting up a virtual environment?

PEP 723 metadata blocks embedded in Python scripts let you declare dependencies directly in the file header. uv run executes the script, automatically resolving and installing those dependencies without manual environment setup, eliminating configuration overhead.

What is PEP 723 and why use it for Python scripts?

PEP 723 defines a standard format for embedding dependency metadata in single Python files. It enables zero-config execution: scripts become self-contained and portable, running instantly with `uv run` across different machines without virtual environment management.

Can I use uv run to execute scripts with inline dependencies instead of requirements.txt?

Yes. uv run supports PEP 723 metadata blocks in script headers as an alternative to requirements.txt. Declare dependencies, optional Python version constraints, and UV extensions (like exclude-newer and index) directly in the file, and uv handles dependency resolution automatically during execution.

How do I add dependencies to a single-file Python script with uv?

Add a PEP 723 metadata block at the top of your script containing a dependencies array listing required packages. You can also specify requires-python for version constraints and UV extensions. Run `uv run scriptname.py` and uv automatically installs and executes with those dependencies.

What types of Python projects work well with inline PEP 723 dependencies?

CLI applications, HTTP clients, and data processing workflows that fit in a single file benefit most from PEP 723 metadata. These use cases avoid complex package structures, making inline dependencies practical and keeping scripts portable and executable with zero prior setup.