From python-plugin
Deep guidance for uv as the Python env + dep + tool runner. Use when setting up a venv, declaring dependencies in pyproject.toml, maintaining uv.lock, choosing between `uv run` / `uv tool` / `uvx`, pinning Python versions, debugging resolver conflicts, or migrating from pip / pip-tools / poetry. Pairs with the unified `python` skill.
How this skill is triggered — by the user, by Claude, or both
Slash command
/python-plugin:python-uvThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
uv is the only Python toolchain manager in this workspace. No pyenv, no
uv is the only Python toolchain manager in this workspace. No pyenv, no poetry, no pip-tools, no virtualenv-wrapper.
project/
pyproject.toml # source of truth for deps + tool config
uv.lock # committed, machine-managed
.venv/ # gitignored, recreated on demand
| Goal | Command |
|---|---|
| Create venv with project Python | uv venv |
| Install everything from lock | uv sync |
| Install with dev extras | uv sync --extra dev |
| Add a dependency | uv add httpx |
| Add a dev dependency | uv add --dev pytest |
| Run a script in the venv | uv run python script.py |
| Run a tool ephemerally | uvx ruff check . |
| Install a tool globally | uv tool install ruff |
| Pin Python version | uv python pin 3.12 |
| Re-lock without upgrading | uv lock |
| Re-lock and upgrade everything | uv lock --upgrade |
| Re-lock and upgrade one dep | uv lock --upgrade-package httpx |
| Build wheel + sdist | uv build |
| Publish to PyPI | uv publish |
uv run <cmd> — run from the project's venv. Equivalent to activating
the venv first, but stateless.uvx <cmd> — run an ephemeral isolated tool. Doesn't pollute the
project's deps. Right for one-off ruff, mypy, bumpver.uv tool install — install a tool to the user's global tool dir.
Right for things you call from any cwd: ruff, pre-commit.[project]
dependencies = [
"httpx>=0.27,<1",
"pydantic>=2",
]
[project.optional-dependencies]
dev = ["pytest>=8", "ruff>=0.7", "mypy>=1.11"]
[tool.uv]
dev-dependencies = ["ipython"] # not exposed as an extra
[tool.uv].dev-dependencies is the modern home for dev-only deps. The
older [project.optional-dependencies].dev still works and is more
portable across non-uv tools (pip).
uv.lock. Reproducible installs depend on it.uv lock is non-destructive: it preserves existing pins.pyproject.toml changes (the
posttooluse-uv-lock hook does this automatically).uv sync --frozen to fail on drift.When uv add reports a conflict:
>= rather than ==), or drop the offender.[project].dependencies to override.requires-python = ">=3.11" in [project].uv python install 3.12 to fetch a managed interpreter.uv python pin 3.12 to record the project's default; uv writes
.python-version.uv add each line, delete requirements.txt.uv init --bare, copy [tool.poetry.dependencies] into
[project].dependencies, delete poetry.lock.requirements.in / requirements.txt; use uv.lock.npx claudepluginhub cjhowe-us/marketplace --plugin python-pluginProvides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.