About uv
A skill reference for using uv to run Python scripts, manage dependencies, and configure Python package builds. It includes common commands and guidance on inline script dependencies and the `uv_build` backend.
Key features
- 01Run scripts with uv
- 02Add project dependencies
- 03Declare inline script dependencies
- 04Configure the uv_build backend
Use cases
- 01Run a Python script with ad-hoc dependencies
- 02Initialize a script with inline metadata
- 03Set up a pure Python package build
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ mitsuhiko/ agent-stuff --skill uvAfter installing, type/uvin Claude Code to confirm it loaded.
Bundled filesbuild.mdscripts.md
Details
From the project READMEQuick Reference
uv run script.py # Run a script
uv run --with requests script.py # Run with ad-hoc dependency
uv run python -m ast foo.py >/dev/null # Verify syntax without writing __pycache__
uv add requests # Add dependency to project
uv init --script foo.py # Create script with inline metadata
Inline Script Dependencies
# /// script
# requires-python = ">=3.12"
# dependencies = ["requests"]
# ///
See scripts.md for full details on running scripts, locking, and reproducibility.
Build Backend
Use uv_build for pure Python packages:
[build-system]
requires = ["uv_build>=0.9.28,<0.10.0"]
build-backend = "uv_build"
See build.md for project structure, namespaces, and file inclusion.
Comments
Markdown supported