Uv

Use when working with uv — this skill's uv policy and required overrides to Astral's official guidance. Pair with `astral:uv` (if installed) for general usage.

Jamie-BitFlight Updated

File contents

uv — Policy

Precedence: this policy (below) > astral:uv (if installed) / live docs.astral.sh for command syntax, migration tables, and general usage (not duplicated here).

Policy

  • Follow python-engineering:standards-for-python-development for shared architecture, typing, testing, and CLI rules.
  • Use uv add / uv sync / uv run for all Python work — never uv pip install, uv venv, or source .venv/bin/activate. A uv.lock-managed project with PEP 723 scripts never needs the pip-compatible lane Astral documents.
  • PEP 723 script shebang: #!/usr/bin/env -S uv run --quiet --script. Never add --active — it breaks PEP 723 isolation by resolving into an ambient VIRTUAL_ENV instead of an isolated ephemeral one.
  • Use text mode ('r'/'w') with tomlkit, never binary mode ('rb'/'wb') — binary mode returns bytes, which tomlkit cannot parse or write.

External Resources (if astral:uv isn't installed)

Jamie-BitFlight/claude_skills/tree/main/plugins/python-engineering/skills/uv commit 069db6f77d

Frequently asked questions

npx skillmds@latest add jamie-bitflight/uv