--- name: uv description: > Uses the uv Python package and project manager correctly for dependencies, venvs, and scripts. Use when creating or modifying Python projects, adding dependencies, running scripts with inline deps, managing virtual environments, pinning Python versions, running CLI tools from PyPI, setting the IDE Python interpreter, or using uv in CI (e.g. GitHub Actions) or Docker containers. Use when the user mentions uv, pyproject.toml, uv.lock, uv run, uv add, uv sync, .venv, Python interpreter, poetry, pipenv, conda, CI, Docker, GitHub Actions, or asks to use uv instead of pip or poetry. --- # uv Package Manager Prefer **uv** over pip/poetry for Python dependency and project management. Use the workflow below and choose the right mode (project, script, or tool). ## Mode Decision ``` User needs to... │ ├─ Repo uses poetry / pipenv / conda (poetry.lock, Pipfile, environment.yml) │ → Ask: "This repo uses [poetry/pipenv/conda]. Do you want to switch to uv?" │ → If yes: prefer the migrate-to-uv tool (uvx migrate-to-uv in project root) to convert metadata and lockfile; then uv sync. Remove legacy files only after user confirms. │ → If no: do not use uv for project management; use the existing tool or uv pip only if appropriate. │ ├─ Repo has requirements.txt (no pyproject.toml) │ → Ask: "This repo uses requirements.txt. Do you want to convert to uv (pyproject.toml + uv.lock)?" │ → If yes: guide conversion (uv init, uv add from requirements, then uv sync) │ → If no: use Pip-Compatible workflow (uv pip) │ ├─ Manage a project (pyproject.toml, lockfile, team repo) │ → Use PROJECT workflow (uv init, uv add, uv sync, uv run) │ ├─ Run a single script with dependencies │ → Use SCRIPT workflow (uv add --script, uv run