Skill Instructions
When managing Python projects, strictly use uv instead of pip, poetry, or conda.
Core Commands to Use
- •Initialization: Use
uv initfor new projects. - •Adding Dependencies: Use
uv add <package>for main dependencies anduv add --dev <package>for development dependencies. - •Removing Dependencies: Use
uv remove <package>. - •Locking: If
pyproject.tomlis manually edited, runuv lockto update the lockfile. - •Execution: Use
uv run <command>to run scripts within the project's virtual environment. - •Environment Setup: Use
uv python installto manage Python versions.
Guidelines
- •Always check for an existing
pyproject.tomlbefore running commands. - •If
uvis not installed on the system, notify the user but do not attempt to usepip. - •Prefer
uvxfor one-off tool executions (e.g.,uvx ruff check .).