python-dependencies

Manages Python project dependencies using uv lockfiles and pyproject.toml conventions.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/chris-prener/dev-kit --skill python-dependencies-chris-prener
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python-dependencies
Source: https://github.com/chris-prener/dev-kit/tree/main/dev-kit/skills/python-dependencies
Command: npx skills add https://github.com/chris-prener/dev-kit --skill python-dependencies-chris-prener

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Python projects often suffer from inconsistent dependency management: unpinned versions, mixed runtime and dev packages, missing lockfiles, and broken environments after fresh clones. This Skill defines a disciplined uv-based workflow so dependency changes are reproducible, correctly scoped, and consistently committed. ## Core Features & Use Cases - uv lifecycle commands: Covers add, remove, lock, sync, upgrade, and inspect operations with clear guidance on when to use each. - pyproject.toml conventions: Separates runtime dependencies from dev and optional dependency-groups, enforces minimum-version bounds instead of exact pins, and alphabetizes entries. - Lockfile discipline: Specifies what to commit (uv.lock, .python-version), what to exclude (.venv), and commit message conventions for dependency changes. - Troubleshooting and private indexes: Resolves common uv failures and configures alternate package indexes. - Use Case: You need to add polars to a project. The Skill guides you to run uv add polars, verify with uv tree, and commit both pyproject.toml and uv.lock with a conventional message. ## Quick Start Ask the assistant to add a new runtime dependency to your Python project using uv and update the lockfile accordingly.

Frequently Asked Questions about python-dependencies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a dependency with uv in a Python project?▼

Run `uv add <pkg>` for runtime dependencies or `uv add --dev <pkg>` for dev-only packages. This updates pyproject.toml and uv.lock together; verify with `uv tree` and commit both files.

Should I pin exact versions in pyproject.toml dependencies?▼

No. Use minimum bounds like `polars>=1.0` in pyproject.toml so downstream consumers are not constrained. Exact pinning belongs in uv.lock, which uv generates automatically for reproducible installs.

What is the difference between dependencies and dependency-groups in pyproject.toml?▼

The `project.dependencies` field holds packages required at runtime, while `dependency-groups` holds dev-only or purpose-scoped packages like pytest, ruff, or docs tooling. This keeps production installs lean.

Why does uv sync fail to resolve dependencies?▼

Resolution failures usually come from incompatible version constraints. Run `uv lock` to see the explicit conflict, check for incompatible pins, then run `uv sync` again after fixing pyproject.toml.

Can uv install packages from a private package index?▼

Yes. Declare the index under `[[tool.uv.index]]` in pyproject.toml with a name and URL, then install with `uv add --index <name> <package>`. The lockfile records the resolved source.

When should I not use this dependency management workflow?▼

It does not cover initial project scaffolding, CI caching of uv, or publishable-library packaging metadata. Those belong to separate project-scaffold, CI, and packaging workflows.