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
npx skills add mitsuhiko/agent-stuff --skill uv -a claude-codeWhat 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
requestslibrary to the project usinguv 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-code2Manually: put the files in place
~/.claude/skills/uv/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/uv/
1Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill uv -a codex2Manually: put the files in place
.agents/skills/uv/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill uv -a cursor2Manually: put the files in place
.cursor/skills/uv/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mitsuhiko/agent-stuff skills/uv2Manually: put the files in place
.github/skills/uv/SKILL.md1Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill uv -a gemini-cli2Platform CLI
gemini skills install https://github.com/mitsuhiko/agent-stuff --path skills/uvManually: put the files in place
.devin/skills/uv/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mitsuhiko/agent-stuff --skill uv -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.