mcpField
U
uv

uv

github.com/mitsuhikoDevelopment3.2k241 installsUpdated 5w ago
Repository

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

  1. 01Run scripts with uv
  2. 02Add project dependencies
  3. 03Declare inline script dependencies
  4. 04Configure the uv_build backend

Use cases

  1. 01Run a Python script with ad-hoc dependencies
  2. 02Initialize a script with inline metadata
  3. 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 uv

After installing, type/uvin Claude Code to confirm it loaded.

Bundled filesbuild.mdscripts.md

Details

From the project README

Quick 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