- Home
- Skills
- Dmitriiweb
- Extract Emails
- Uv Package Management Assistant
uv-package-management-assistant_skill
- Python
106
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill dmitriiweb/extract-emails --skill uv-package-management-assistant- SKILL.md1.5 KB
Overview
This skill helps Python projects use the uv package manager for all dependency and script runtime tasks. It provides concrete commands and workflow guidance to add, remove, sync, and run packages and script-specific dependencies. It enforces a single-tool workflow to keep environments reproducible and lockfile-driven.
How this skill works
The assistant inspects intended dependency operations and maps them to uv commands: add/upgrade with uv add, remove with uv remove, and resync from the lockfile with uv sync. It also handles script-scoped dependencies and runtime invocation via uv run and uv add/remove --script. It recommends using uv sync flags when extras or script metadata are required.
When to use it
- Adding or upgrading project dependencies in a reproducible way
- Removing packages from the project environment
- Resynchronizing the environment from the lockfile (including extras)
- Running scripts while ensuring their declared dependencies are available
- Managing script-only dependencies without polluting the main project deps
Best practices
- Always use uv for dependency changes; avoid pip, pip-tools, and poetry to prevent divergence
- Use uv add <package> to add or upgrade and uv remove <package> to delete packages
- Keep the lockfile authoritative: use uv sync to recreate environments from the lockfile
- When a script has special deps, declare them inline or use uv add/remove --script to scope them
- Use uv sync --all-extras to include optional development extras when needed
Example use cases
- Add a new library to the project: uv add requests
- Remove an obsolete package: uv remove django
- Recreate a developer environment from lockfile: uv sync --all-extras
- Run a script with guaranteed deps: uv run scripts/analyze.py
- Add a dependency only for a script: uv add --script scripts/etl.py pandas
FAQ
Stop making new changes with those tools. Reconcile by migrating requirements into the uv-managed lockfile and then use uv sync to rebuild the environment.
How do I install dependencies only for a single script?
Use uv add --script <script.py> <package> to record script-scoped deps. Reinstall them with uv sync --script <script.py>.
When should I use uv sync --all-extras?
Use it when you need optional extras (dev/test tooling or optional features) installed from the lockfile for development or CI environments.