uv-scripts

Create self-contained Python scripts with PEP 723 inline metadata.

1|Updated Nov 15, 2025
One-click install
npx skills add https://github.com/racurry/neat-little-package --skill uv-scripts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uv-scripts
Source: https://github.com/racurry/neat-little-package/tree/main/plugins/forge/skills/uv-scripts
Command: npx skills add https://github.com/racurry/neat-little-package --skill uv-scripts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? This Skill eliminates the complexity of managing Python script dependencies and environments by enabling self-contained, executable single-file scripts with inline metadata, saving setup time and ensuring portability.

Core Features & Use Cases:

  • Self-Contained Python Scripts: Create Python scripts where dependencies are declared directly within the file using PEP 723 inline metadata.
  • Automatic Environment Management: UV automatically creates isolated environments and installs dependencies on demand, simplifying execution.
  • Use Case: Develop a Claude Code hook or a standalone utility script that needs specific Python packages. This skill ensures the script is portable and executable anywhere with UV, without requiring a separate requirements.txt or virtual environment setup.

Quick Start: Use the uv-scripts skill to create a new Python script that uses the 'requests' library, ensuring it's self-contained and executable with UV.

Frequently Asked Questions about uv-scripts

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

FAQPage Schema
How do I create self-contained Python scripts with inline dependencies?

Self-contained Python scripts declare dependencies directly in the file using PEP 723 inline metadata format. UV automatically isolates the environment and installs packages on demand when you run the script, eliminating the need for separate requirements files or manual setup.

What's the best way to make a Python script portable across machines without setup overhead?

Use UV scripts with inline dependency metadata to bundle everything the script needs in a single file. UV handles environment isolation automatically, so the script runs anywhere UV is installed without requiring virtual environment configuration or dependency pre-installation.

Can I use UV to execute Python scripts with specific package versions without a requirements.txt?

Yes. UV scripts support declaring specific package versions and Python version requirements in inline metadata at the top of your script file. UV creates an isolated environment and installs those exact versions when you execute the script with `uv run` or a shebang-based entry point.

How do I create a Claude Code hook that includes Python dependencies?

Write a Python script with inline PEP 723 metadata specifying your dependencies, then configure it as a UV script hook. UV automatically manages the isolated environment and package installation when the hook runs, ensuring consistent execution without external dependency management.

Do I need a virtual environment to run Python scripts with UV?

No. UV scripts with inline metadata create and manage isolated environments automatically behind the scenes. You run scripts directly with `uv run` or via shebang, and UV handles all environment setup and dependency installation without manual virtual environment creation.

What are the limitations of inline dependency metadata in UV scripts?

Inline metadata declares dependencies and optional Python version only. Complex workflows requiring multiple interdependent packages, conditional dependencies, or dev-only tools may need a separate pyproject.toml. Single-file scripts prioritize portability and simplicity over advanced dependency management.