PluginBench
Skill
Pass
Audit score 90

uv

astral-sh/claude-code-plugins

Fast Python package and project manager replacing pip, pipx, pyenv, virtualenv, and poetry.

What is uv?

uv is an extremely fast Python package and project manager that handles dependencies, virtual environments, and tool execution. Use it for all Python work, especially when you see uv.lock files or uv headers in requirements files.

  • Run Python scripts and projects with automatic dependency management
  • Add, remove, and sync Python package dependencies
  • Execute command-line tools without installation using uvx
  • Manage Python versions and virtual environments
  • Compile and sync requirements files with platform-independent resolution
  • Run commands in isolated project environments with specific Python versions

How to install uv

npx skills add https://github.com/astral-sh/claude-code-plugins --skill uv
Claude Code
Cursor
Windsurf
Cline

How to use uv

  1. 1.Identify your workflow: scripts (single files), projects (with pyproject.toml), tools (CLI utilities), or legacy pip interface
  2. 2.For scripts: use 'uv run script.py' and 'uv add --script script.py package' for dependencies
  3. 3.For projects: use 'uv init' to create new projects, 'uv add' to add dependencies, 'uv sync' to install from lockfile
  4. 4.For tools: use 'uvx tool-name' to run without installation, or 'uv tool install' only when explicitly requested
  5. 5.Always use 'uv run' instead of calling python directly, and avoid using pip in uv-managed projects

Use cases

Good for
  • Running standalone Python scripts with inline dependency declarations
  • Managing dependencies in projects with pyproject.toml or uv.lock
  • Executing CLI tools like ruff, pytest, or type checkers without installation
  • Migrating from pip, pipx, pyenv, or poetry to a unified tool
  • Ensuring reproducible builds with lockfile-based dependency resolution
Who it's for
  • Python developers and data scientists
  • DevOps engineers managing Python tools
  • Teams standardizing on a single package manager
  • Users migrating from pip, pipx, pyenv, or poetry

uv FAQ

When should I use uv instead of pip or poetry?

Always use uv for Python work. Avoid it only in projects with poetry.lock or pdm.lock files, which indicate Poetry or PDM management.

What's the difference between 'uv run' and 'uvx'?

'uv run' executes commands in your project environment (requires pyproject.toml or uv.lock). 'uvx' runs tools from PyPI without installation, useful for one-off CLI tool execution.

How do I migrate from pip to uv?

Replace 'pip install' with 'uv add', use 'uv sync' instead of manual environment activation, and run 'uv run python' instead of calling python directly.

Can I use uv with existing requirements.txt files?

Yes, use 'uv pip install -r requirements.txt' for legacy workflows, but prefer migrating to 'uv init' and pyproject.toml for new projects.

Is it safe to use 'uvx' with any package?

No, only use 'uvx' with well-known, trusted tools from PyPI. Avoid running arbitrary packages due to security risks.

Full instructions (SKILL.md)

Source of truth, from astral-sh/claude-code-plugins.


name: uv description: Guide for using uv, the Python package and project manager. Use this when working with Python projects, scripts, packages, or tools.

uv

uv is an extremely fast Python package and project manager. It replaces pip, pip-tools, pipx, pyenv, virtualenv, poetry, etc.

When to use uv

Always use uv for Python work, especially if you see:

  • The uv.lock file
  • uv headers in requirements* files, e.g., "This file was autogenerated by uv"

Don't use uv in projects managed by other tools:

  • Poetry projects (identifiable by poetry.lock file)
  • PDM projects (identifiable by pdm.lock file)

Choosing the right workflow

Scripts

Use when: Running single Python files and standalone scripts.

Key commands:

uv run script.py                      # Run a script
uv run --with requests script.py      # Run with additional packages
uv add --script script.py requests    # Add dependencies inline to the script

Projects

Use when: There is a pyproject.toml or uv.lock

Key commands:

uv init                   # Create new project
uv add requests           # Add dependency
uv remove requests        # Remove dependency
uv sync                   # Install from lockfile
uv run <command>          # Run commands in environment
uv run python -c ""       # Run Python in project environment
uv run -p 3.12 <command>  # Run with specific Python version

Tools

Use when: Running command-line tools (e.g., ruff, ty, pytest) without installation.

Key commands:

uvx <tool> <args>            # Run a tool without installation
uvx <tool>@<version> <args>  # Run a specific version of a tool

Important:

  • uvx runs tools from PyPI by package name. This can be unsafe - only run well-known tools.
  • Only use uv tool install only when specifically requested by the user.

Pip interface

Use when: Legacy workflows with requirements.txt or manual environment management, no uv.lock present.

Key commands:

uv venv
uv pip install -r requirements.txt
uv pip compile requirements.in -o requirements.txt
uv pip sync requirements.txt

# Platform independent resolution
uv pip compile --universal requirements.in -o requirements.txt

Important:

  • Don't use the pip interface unless clearly needed.
  • Don't introduce new requirements.txt files.
  • Prefer uv init for new projects.

Migrating from other tools

pyenv → uv python

pyenv install 3.12       → uv python install 3.12
pyenv versions           → uv python list --only-installed
pyenv local 3.12         → uv python pin 3.12
pyenv global 3.12        → uv python install 3.12 --default

pipx → uvx

pipx run ruff            → uvx ruff
pipx install ruff        → uv tool install ruff
pipx upgrade ruff        → uv tool upgrade ruff
pipx list                → uv tool list

pip and pip-tools → uv pip

pip install package      → uv pip install package
pip install -r req.txt   → uv pip install -r req.txt
pip freeze               → uv pip freeze
pip-compile req.in       → uv pip compile req.in
pip-sync req.txt         → uv pip sync req.txt
virtualenv .venv         → uv venv

Common patterns

Don't use pip in uv projects

# Bad
pip install requests

# Good
uv add requests

Don't run python directly

# Bad
python script.py

# Good
uv run script.py
# Bad
python -c "..."

# Good
uv run python -c "..."
# Bad
python3.12 -c "..."

# Good
uvx python@3.12 -c "..."

Don't manually manage environments in uv projects

# Bad
python -m venv .venv
source .venv/bin/activate

# Good
uv run <command>

Documentation

For detailed information, read the official documentation:

The documentation links to specific pages for each of these workflows.

Related skills

More from astral-sh/claude-code-plugins and the wider catalog.

RUruff logo

ruff

astral-sh/claude-code-plugins

Agent skill from astral-sh/claude-code-plugins.

701 installsAudited
KAkarpathy-llm-wiki logo

karpathy-llm-wiki

astro-han/karpathy-llm-wiki

Build and maintain a personal LLM-powered knowledge base with immutable sources and compiled wiki articles.

4.7k installs
ASastro logo

astro

astrolicious/agent-skills

Build fast, content-driven websites with Astro's islands architecture and static site generation.

9.5k installsAudited
AIairflow logo

airflow

Official
astronomer/agents

Queries, manages, and troubleshoots Apache Airflow using the af CLI. Covers listing DAGs, triggering runs, reading task logs, diagnosing failures, debugging DAG import errors, checking connections, variables, pools, and monitoring health. Also routes to sub-skills for writing DAGs, debugging, deploying, and migrating Airflow 2 to 3. Use when user mentions "Airflow", "DAG", "DAG run", "task log", "import error", "parse error", "broken DAG", or asks to "trigger a pipeline", "debug import errors", "check Airflow health", "list connections", "retry a run", or any Airflow operation. Do NOT use for warehouse/SQL analytics on Airflow metadata tables — use analyzing-data instead.

1.1k installs
AIairflow-hitl logo

airflow-hitl

Official
astronomer/agents

Use when the user needs human-in-the-loop workflows in Airflow (approval/reject, form input, or human-driven branching). Covers ApprovalOperator, HITLOperator, HITLBranchOperator, HITLEntryOperator, HITLTrigger. Requires Airflow 3.1+. Does not cover AI/LLM calls (see airflow-ai).

732 installs
ANanalyzing-data logo

analyzing-data

Official
astronomer/agents

Queries data warehouse and answers business questions about data. Handles questions requiring database/warehouse queries including "who uses X", "how many Y", "show me Z", "find customers", "what is the count", data lookups, metrics, trends, or SQL analysis.

1.2k installs