Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Uv Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-uv-knowledge-patch-nevaberry-plugins)
---
name: uv-knowledge-patch
description: uv
version: "0.11.32"
license: MIT
metadata:
author: Nevaberry
---
# uv compatibility guidance
Use this skill for uv project and workspace management, dependency resolution,
lockfiles, Python environments, indexes, authentication, builds, and tooling.
Load the reference matching the task for detailed conditions and examples.
Preview features are identified beside their guidance.
## Reference index
| Reference | Topics |
| --- | --- |
| [Dependency resolution and lockfiles](references/dependency-resolution-and-lockfiles.md) | Resolution policies, constraints, hashes, lock validation, PEP 751, platform coverage, wheel variants, exports |
| [Indexes, authentication, and publishing](references/indexes-auth-and-publishing.md) | Index configuration, credentials, certificate trust, transport, attestations, publishing |
| [Projects and workspaces](references/projects-and-workspaces.md) | Initialization, local and Git sources, groups, scripts, workspace metadata, builds |
| [Python, environments, and platforms](references/python-environments-and-platforms.md) | Interpreter selection, managed installs, patch pins, virtual environments, Linux and Windows |
| [Tooling and operations](references/tooling-and-operations.md) | Type checking, formatting, tool execution, auditing, automation, caches, archives, containers, source builds |
## Breaking changes and deprecations
### Environment replacement and initialization
- In 0.10, `uv venv` requires `--clear` or `UV_VENV_CLEAR=1` to remove an
existing environment in both interactive and unattended runs.
- In 0.12.5, `uv init example` creates a packaged application without preview,
using `uv_build`, source in `src/example`, and an `example` entry in
`[project.scripts]`. Use `uv init --no-package example` for the unpackaged layout.
- uv 0.13 defaults to Python 3.15 for unpinned installs and automatic downloads,
while still reusing compatible installed interpreters. Use `uv python pin 3.14`
to keep a project on Python 3.14.
### Index validation and authentication failures
- uv 0.10 accepts at most one index with `default = true`; every index with
`explicit = true` requires a `name` for reference from `[tool.uv.sources]`.
- The default `first-index` strategy stops on HTTP 401 or 403, with a built-in
403 exception for `pytorch.org` indexes. Configure `ignore-error-codes` for an
index whose missing packages return an otherwise terminal status.
- When multiple stored credentials match a URL, uv 0.10 requires a username
to select the account: `uv auth token --username foo example.com`.
### Prerelease policy and certificate settings
- The default `if-necessary` policy tries stable releases first and considers
prereleases when no stable candidate meets active constraints, including
transitive constraints. `if-necessary-or-explicit` is a deprecated alias.
`--prerelease-package` sets a policy for an individual dependency.
- Use `--system-certs` instead of `--native-tls`, or `UV_SYSTEM_CERTS` instead
of `UV_NATIVE_TLS`. Platform verification policy may change accepted chains.
- Empty `SSL_CERT_FILE` values are ignored. Nonempty `SSL_CERT_FILE` or
`SSL_CERT_DIR` overrides remain effective even when unreadable or without
valid certificates; supply valid certificates at the override path.
### Requirements-file syntax and hashes
- Each `--constraint`, `--override`, `--exclude`, or `--build-constraint`
occurrence takes one path, including paths with spaces. Repeat flags, as in
`-c a.txt -c 'b constraints.txt'`, or keep space-separated lists in
`UV_CONSTRAINT`, `UV_OVERRIDE`, `UV_EXCLUDE`, and `UV_BUILD_CONSTRAINT`.
- Constraints included with `-c` reject `-e` entries. Put editable requirements
in a requirements file passed with `-r`, or pass them with `--editable`.
- A `--require-hashes` directive in an included constraints file requires
hashes for the whole installation. `--no-require-hashes` and
`require-hashes = false` still verify supplied hashes.
### Archive, build, and cache compatibility
- Source distributions must use `.tar.gz` or legacy `.zip`, including existing
lockfile references. ZIP entries must use stored, DEFLATE, or zstd compression.
- uv rejects wheel entry points matching reserved interpreter names
case-insensitively and wheel data files that would overwrite an interpreter.
- uv 0.13 stabilizes `tar-codec` with stricter validation and potentially
different sdist bytes and hashes. Set `UV_LEGACY_TAR_BACKEND=1` for archives
requiring the legacy reader. uv 0.13.1 restores sdists with hard links or
full-length tar user or group names.
- `uv build --clear` rejects output directories containing the source project
or input source distribution, including through symlinks. When building from
the project directory, choose a directory such as `dist/` inside the project.
- After upgrading to 0.13, uv may download or rebuild dependencies while
repopulating changed cache entries; multiple uv versions can still share a cache.
### Certificate trust updates
uv 0.13.4 removes the affected eMudhra/emSign root from bundled trust. uv 0.13.5
rejects chains containing the compromised intermediate keys and provides updated
managed CPython builds for 3.11 and later with patched pip and `ensurepip`.
After upgrading uv, run `uv python upgrade`, update patch pins retaining affected
versions, and upgrade pip separately in existing virtual environments.
The upstream pip versions bundled with CPython 3.9 and 3.10 still trust the
affected root.
## Python selection and managed upgrades
- `uv python install` reads `UV_PYTHON` before `.python-version`. Arbitrary
executable names are ignored in that file but accepted by explicit `--python`.
- `uv pip compile` accepts `-p` for `--python` and reads `UV_PYTHON`. An
unavailable numeric version can resolve with another interpreter using the
requested version's tags; an unavailable explicit path or implementation errors.
- `uv python upgrade` and `uv python install --upgrade` are stable in 0.10.
Environments using the managed minor-version directory automatically pick up
newly installed patch releases. A patch pin in `.python-version` disables
transparent patch upgrades for the project environment.
- `uv tool run` and `uv tool install` use the global Python pin without an
explicit request. Installed tools keep their interpreter unless `--reinstall`
or `--python` is supplied; a saved explicit `--python` request wins over the pin.
## Dependency sources, scripts, and workspace groups
Directory path dependencies and workspace members depended on by another member
are built and installed even without `[build-system]`, using
`setuptools.build_meta:__legacy__`. To install only a virtual dependency's
dependencies, set `package = false` on its path source or
`[tool.uv] package = false` in its own `pyproject.toml`.
```toml
[tool.uv.sources]
example-lib = { path = "./example-lib", package = false }
```
- `--no-sources` requires a fresh resolution and conflicts with `--frozen`.
Use `--no-sources-package` to ignore one dependency's configured source while
retaining the other source overrides.
- `uv pip install --requirements script.py` installs dependencies from the
script's PEP 723 metadata. Commands reading scripts as requirements inputs
support extensionless scripts and scripts at HTTP(S) URLs. Remote
`pylock.toml` inputs are also supported.
- Inline-script `--locked` and `--frozen` require an existing script lockfile.
- When syncing or exporting a selected workspace member, request root groups
explicitly to include them. Frozen sync uses each selected member's recorded
default groups.
## Lock validation, PEP 751, and exports
- `uv lock --check` and `uv sync --check` return `1` for stale state and `2`
for an error. In preview, canonical-format differences also cause
`uv lock --check` and commands using `--locked` to reject a lockfile;
`uv --preview lock --refresh` rewrites it.
- uv validates dependency requirements against locked versions and reports
missing package entries. A `--locked` rejection explains why updating is needed.
- Use `pylock.toml` or `pylock.<name>.toml` for PEP 751; the name has only one
nonempty segment between `pylock` and `toml`. `uv export` and `uv pip compile`
infer the format from the output filename.
```sh
uv pip compile requirements.in -o pylock.app.toml
uv pip sync pylock.app.toml
```
PEP 751 installation prefers a local artifact when both a local path and URL
exist, enforces `--require-hashes`, and checks `packages.requires-python`.
Exported environment restrictions are enforced by `uv pip install` and
`uv pip sync`. In preview, exports generate missing artifact hashes required by
PEP 751 and write local paths relative to the output file.
Enable preview `frozen-lockfile` to use `uv sync`, `uv export`, `uv tree`, and
`uv workspace metadata` with `--frozen` and only `uv.lock`. This enables
dependency-only container layers before copying project sources:
```sh
uv sync --preview-features frozen-lockfile --frozen --no-install-local
```
## Build dependencies and validation
`extra-build-dependencies` is stable in 0.10. `match-runtime = true` selects the
runtime-resolved version for an isolated build and requires static package
metadata. An object entry with its own version specifier must explicitly set
`match-runtime = false`.
uv installs packages using isolated builds before packages selected to build
without isolation. Preview `build-dependency-check` validates requirements for
`uv build --no-build-isolation`; `--skip-dependency-check` bypasses validation.
Preview `--require-build-hashes` requires hashes for direct and transitive build
requirements.
## Preview workspace inspection, type checking, and auditing
- `uv workspace metadata` is read-only by default; `--sync` allows changes.
`--quiet` preserves JSON on standard output while suppressing diagnostics.
Use `--output-version` to select the schema expected by a consumer.
- `uv check` runs ty and uses its locked version when available. It honors
`--python` and `UV_PYTHON`; `--script` is required for script checking.
`--no-sync` still allows lockfile updates. `--fix` applies automatic fixes,
and `--no-install-project` installs dependencies without building or installing
the project. Set `TY` or `RUFF` to override the check or format binary.
- `uv audit` checks dependencies against OSV, supports JSON and SARIF, and
selects dependencies by extras and groups. `--no-default-groups` excludes
default groups. `uv tool audit` audits one or all installed tools.
Both audit commands error offline; aliased OSV records form one vulnerability.
## Automation and subprocesses
`uv pip install --check` and `uv pip sync --check` report planned changes without
modifying the environment. Both support JSON with `--check` and `--dry-run`:
```sh
uv pip sync --check --output-format json requirements.txt
```
- Package operations return `1` for expected failures and `2` for recognized
operational and internal failures. `--show-settings` prints settings and exits.
- uv sets `UV` to its executable path in launched subprocesses, replacing any
caller-supplied value. Read it to invoke the same uv executable.
- Use `UV_NO_SYSTEM_CONFIG=1` to skip system configuration or `UV_NO_PROJECT=1`
to skip project discovery. `UV_NO_INSTALL_PROJECT`, `UV_NO_INSTALL_WORKSPACE`,
and `UV_NO_INSTALL_LOCAL` expose sync installation exclusions.
- `UV_NO_CACHE=false`, `UV_OFFLINE=false`, and `UV_SYSTEM_CERTS=false` override
corresponding `true` configuration values.