agentleFS
kumaran-iskumaran-is/claude-code-onboarding/.claude/skills/uv-package-manager/SKILL.md

uv-package-manager

Skill36 starsChanged 6 months agoMITView on GitHub

Comprehensive uv workflows for Python 3.14 — virtual environments, lockfiles, Python version pinning, monorepo workspaces, Docker integration, CI/CD caching, and migration from pip/Poetry/pip-tools. Use when working with uv beyond basic uv add/uv init.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use python-code-style and git-workflow.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Aver005Skill

    python-code-style

    Python code style, linting, formatting, naming conventions, and documentation standards. Use when writing new code, reviewing style, configuring linters, writing docstrings, or establishing project standards.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    Also in 3 projects that use this

The file

Files
SKILL.md

Iron Law

ALWAYS USE uv sync --frozen IN CI AND DOCKER — never uv sync without --frozen in reproducible environments; without it, dependency resolution runs fresh and can pick up different versions

uv Package Manager

Deep reference for uv — the ultra-fast Python package manager written in Rust. The workspace uses uv as its primary Python package manager. This skill covers everything beyond the 4 basic commands in python-dev.

When to Use

Load this skill when:

  • Setting up lockfile workflows (uv lock, uv sync --frozen)
  • Managing Python version pinning (uv python pin 3.14)
  • Configuring Docker builds with uv cache mounts
  • Setting up GitHub Actions CI with uv dependency caching
  • Working in a monorepo with multiple Python packages
  • Migrating an existing project from pip, Poetry, or pip-tools
  • Using uv run to execute scripts without environment activation

The python-dev skill covers: uv init, uv add, basic virtual environment setup. Load THIS skill for everything beyond that.

Quick Reference

TaskCommand
Create lockfileuv lock
Install from lockfile (CI)uv sync --frozen
Pin Python versionuv python pin 3.14
Run without activatinguv run python script.py
Run testsuv run pytest
Upgrade all depsuv lock --upgrade
Check outdateduv tree --outdated
Remove packageuv remove <pkg>

Reference File

Load resources/implementation-playbook.md for:

  • 22 patterns covering all uv workflows
  • Virtual environment management (create, activate, uv run)
  • Python version management
  • Lockfile workflows for reproducible builds
  • Monorepo workspace configuration
  • Docker multi-stage builds with uv cache mounts
  • GitHub Actions CI with uv caching
  • Migration guides from pip, Poetry, pip-tools (command-by-command)
  • Performance optimization (global cache, parallel install, offline mode)
  • Pre-commit hooks and VS Code integration

Key Patterns Summary

# New project (from python-dev)
uv init my-service && cd my-service
uv add fastapi uvicorn pydantic pydantic-settings
uv add --dev pytest pytest-asyncio httpx ruff mypy

# Lockfile (add to CI and Docker)
uv lock                          # Generate/update uv.lock
uv sync --frozen                 # Install exact versions from lock

# Python version
uv python pin 3.14               # Write .python-version file
uv python install 3.14           # Install that version

# Run without activating venv
uv run pytest                    # Run pytest
uv run uvicorn src.main:app      # Run server

Docker Pattern (summary — full pattern in playbook)

FROM python:3.14-slim AS builder
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN --mount=type=cache,target=/root/.cache/uv \
    uv sync --frozen --no-dev

CI Pattern (summary — full pattern in playbook)

- uses: astral-sh/setup-uv@v4
  with:
    enable-cache: true
- run: uv sync --frozen

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.