uv
Initializes Python projects, manages dependencies, pins Python versions, and runs scripts with uv. Use when adding/removing packages, syncing environments, running tools with uvx, or building distributions.
How do I install this agent skill?
npx skills add https://github.com/knoopx/pi --skill uvIs this agent skill safe to install?
- Gen Agent Trust Hubwarn
The skill utilizes 'uv', a Python package manager, to manage dependencies and run scripts. This involves downloading and executing code from external repositories (like PyPI), which presents risks such as dependency confusion or the execution of malicious code if untrusted packages are specified. It also has a surface for indirect prompt injection via project configuration files.
- Socketpass
No alerts
- Snykwarn
Risk: MEDIUM · No issues
- Runlayerpass
1/1 file flagged
What does this agent skill do?
uv
Fast Python package and project manager — 10-100x faster than pip with built-in virtual environment management.
Project Setup
uv init my-app # App project
uv init my-lib --lib # Library project
uv init --script script.py # Standalone script
uv python pin 3.11 # Pin Python version for the project
Managing Dependencies
uv add requests # Add a dependency
uv add --dev pytest # Add dev dependency
uv add --optional ml scikit-learn # Add optional group
uv remove requests # Remove a dependency
uv lock # Update lockfile only
uv export > requirements.txt # Export to pip format
Commit uv.lock for reproducibility.
Syncing Environments
uv sync # Install all dependencies
uv sync --no-dev # Skip dev dependencies
uv sync --all-extras # Include all optional groups
uv sync --refresh # Recreate venv from scratch
uv sync --locked # Fail if lockfile would change (CI-friendly)
Running Code
uv run python script.py # Run a script with project deps available
uv run -m pytest # Run a module
uv run --with requests script.py # Add a one-off dependency
uv run --extra ml train.py # Use optional dependencies
uv run --env-file .env script.py # Load environment variables
uv run handles virtual environment creation automatically.
Installing Tools
uvx ruff check . # Run a tool once without installing
uv tool install ruff # Install globally for reuse
uv tool list # List installed tools
uv tool upgrade ruff # Upgrade a tool
Tools are isolated from project dependencies.
Building & Publishing
uv build # Build source and wheel distributions
uv publish # Publish to PyPI
Formatting
uv format # Format Python code
uv format --check # Check without changes
Project Versioning
uv version 1.2.3 # Set version
uv version --bump major # Bump major version
Typical CI Workflow
uv sync --locked # Install deps from lockfile
uv run pytest # Run tests
uv run ruff check . # Lint
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/knoopx/pi/uv">View uv on skillZs</a>