Main Site ↗

astral-uv

by benchflow-ai897173GitHub

Fast Python package and project management using Astral's uv. Use when installing packages, managing virtual environments, running Python scripts, or initializing Python projects. Triggers on: pyproject.toml, requirements.txt, Python dependency discussions, virtual environment setup.

Unlock Deep Analysis

Use AI to visualize the workflow and generate a realistic output preview for this skill.

Powered by Fastest LLM

Development
Compatible Agents
Claude Code
Claude Code
~/.claude/skills/
Codex CLI
Codex CLI
~/.codex/skills/
Gemini CLI
Gemini CLI
~/.gemini/skills/
O
OpenCode
~/.opencode/skills/
O
OpenClaw
~/.openclaw/skills/
GitHub Copilot
GitHub Copilot
~/.copilot/skills/
Cursor
Cursor
~/.cursor/skills/
W
Windsurf
~/.codeium/windsurf/skills/
C
Cline
~/.cline/skills/
R
Roo Code
~/.roo/skills/
K
Kiro
~/.kiro/skills/
J
Junie
~/.junie/skills/
A
Augment Code
~/.augment/skills/
W
Warp
~/.warp/skills/
G
Goose
~/.config/goose/skills/
SKILL.md

Astral UV

UV is an extremely fast Python package installer and resolver written in Rust.

Quick Reference

TaskCommand
Create venvuv venv
Install packageuv pip install <pkg>
Add dependencyuv add <pkg>
Run scriptuv run <script.py>
Sync dependenciesuv sync
Init projectuv init

Project Management

Initialize a new project:

uv init my-project
cd my-project

Add dependencies (updates pyproject.toml automatically):

uv add requests httpx
uv add --dev pytest ruff

Sync environment with lockfile:

uv sync

Running Code

Run scripts without manual venv activation:

uv run python script.py
uv run pytest
uv run ruff check .

Run with inline dependencies:

uv run --with requests script.py

Virtual Environments

uv venv                    # Create .venv
uv venv --python 3.12      # Specific Python version

pip Interface

Drop-in pip replacement (10-100x faster):

uv pip install requests
uv pip install -r requirements.txt
uv pip compile requirements.in -o requirements.txt

Python Version Management

uv python install 3.12     # Install Python version
uv python list             # Show available versions
uv python pin 3.12         # Pin version for project

Best Practices

  1. Prefer uv add over uv pip install for project dependencies
  2. Use uv run instead of activating venvs manually
  3. Commit uv.lock to version control
  4. Use uv sync --frozen in CI for reproducible builds
  5. Add dev dependencies with uv add --dev

Source: https://github.com/benchflow-ai/SkillsBench#registry-terminal_bench_2.0-full_batch_reviewed-terminal_bench_2_0_modernize-scientific-stack-environment-skills-astral-uv

Content curated from original sources, copyright belongs to authors

Grade B
-AI Score
Best Practices
Checking...
Try this Skill

User Rating

USER RATING

0UP
0DOWN
Loading files...

WORKS WITH

Claude Code
Claude
Codex CLI
Codex
Gemini CLI
Gemini
O
OpenCode
O
OpenClaw
GitHub Copilot
Copilot
Cursor
Cursor
W
Windsurf
C
Cline
R
Roo
K
Kiro
J
Junie
A
Augment
W
Warp
G
Goose