Skip to main content
skill CX Codex

uv · mitsuhiko — Claude Code skill: Python without pip and venv

A skill that replaces pip, python, and venv with uv, a fast package manager and Python runtime. Run scripts via uv run, add dependencies with uv add, embed requirements directly in scripts.

Apache-2.0 251 installs ★ 3,224 updated 2026-09-27

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mitsuhiko/agent-stuff --skill uv -a claude-code
Open on GitHub

What uv does

uv substitutes the standard Python toolchain: instead of creating a venv and installing packages manually, you call uv run script.py and the manager handles the environment and dependencies. For one-off packages, use the --with flag—uv run --with requests script.py works immediately. Scripts can include embedded metadata in a # /// script … block declaring Python version and dependencies, making them fully standalone.

Project dependencies go in via uv add requests, which updates pyproject.toml. For building pure Python packages, set uv_build as the build-backend in your config. The skill runs on Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode, with platform-specific installation via npx skills add or the equivalent.

What it helps with

  • run a Python script without manually setting up a virtual environment
  • add a dependency and use it immediately in a script
  • create a standalone script with embedded requirements
  • verify Python syntax without generating __pycache__

Example prompts for the agent

  • Execute a script with uv run data_processing.py
  • Add the requests library to the project using uv add requests
  • Create a standalone script with inline metadata: uv init --script fetch_data.py

How to install uv

1Skills CLI (Vercel)

npx skills add mitsuhiko/agent-stuff --skill uv -a claude-code

2Manually: put the files in place

~/.claude/skills/uv/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/uv/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about uv

How do I install uv on Claude Code?

Run npx skills add mitsuhiko/agent-stuff --skill uv -a claude-code, then check ~/.claude/skills/uv/SKILL.md. Other platforms: Codex uses npx skills add mitsuhiko/agent-stuff --skill uv -a codex, Cursor uses npx skills add mitsuhiko/agent-stuff --skill uv -a cursor, GitHub Copilot uses gh skill install mitsuhiko/agent-stuff uv.

What does uv do?

uv replaces pip, python, and venv. Instead of managing environments manually, you write uv run script.py and the manager fetches Python and dependencies from either inline script metadata or your project's pyproject.toml.

How do I specify dependencies inside a script?

Add a # /// script block at the top with requires-python and dependencies fields. Example: # /// script\n# requires-python = ">=3.12"\n# dependencies = ["requests"]\n# ///. Then uv run will install the specified Python version and packages automatically.

Source text

SKILL.md · Apache-2.0
---
name: uv
description: "Use `uv` instead of pip/python/venv. Run scripts with `uv run script.py`, add deps with `uv add`, use inline script metadata for standalone scripts."
---

## Quick Reference

```bash
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

```python
# /// script
# requires-python = ">=3.12"
# dependencies = ["requests"]
# ///
```

See [scripts.md](scripts.md) for full details on running scripts, locking, and reproducibility.

## Build Backend

Use `uv_build` for pure Python packages:

```toml
[build-system]
requires = ["uv_build>=0.9.28,<0.10.0"]
build-backend = "uv_build"
```

See [build.md](build.md) for project structure, namespaces, and file inclusion.

© mitsuhiko · Apache-2.0 · mitsuhiko/agent-stuff

Similar skills

All skills for Agent setup: memory, context, orchestration →

uv by other authors comes first.

uv astral-sh Skill for Claude Code and Codex guides the assistant in using the uv package manager. Activates when handling Python scripts, dependencies, lockfiles, and tools. CX Codex +1 5,300installs uv harperreed Guides your AI agent through Python workflows using uv: dependency resolution, virtualenvs, PEP 723 scripts, CI, and multistage Docker builds. CX Codex +1 ★ 339repo stars python-uv Mindrally python-uv makes the agent manage Python packages through uv only, no pip or poetry. Useful when the project already runs on uv or when environments keep drifting apart. CX Codex +1 1,000installs python-pro davila7 python-pro — a Claude Code skill that puts the agent into expert mode for modern Python. It covers 3.12+ features, async work, profiling, and the current tooling stack. CX Codex +1 399installs modern-python trailofbits modern-python configures Python projects with a modern tooling stack: uv for dependency management, ruff for linting and formatting, ty for type checking. Use when starting new projects, writing scripts, or migrating from legacy tools. CX Codex +1 9,700installs python-development sammcj The python-development skill sets Python coding rules for Claude Code, covering environments, typing, paths, and script dependencies. Use it on Python projects. CX Codex +1 ★ 173repo stars ruff astral-sh Skill for Claude Code and Codex guides Python linting and formatting workflows. Activates during code cleanup, error fixing, or when pyproject.toml contains Ruff config. CX Codex +1 3,700installs setup-python-env reflex-dev setup-python-env is a Claude Code skill that creates a Python virtual environment and installs Reflex when starting a project or when the agent finds no .venv directory. CX Codex +1 794installs

From the same set16

The whole set →

Project sponsors

Companies that keep this analytics open