managing-python-dependencies

Detects project dependency managers and installs Python packages with the correct tooling.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/DingJun1028/esggo-kv --skill managing-python-dependencies-dingjun1028
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: managing-python-dependencies
Source: https://github.com/DingJun1028/esggo-kv/tree/main/.agents/skills/managing-python-dependencies
Command: npx skills add https://github.com/DingJun1028/esggo-kv --skill managing-python-dependencies-dingjun1028

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents broken Python environments caused by running global pip install or mixing dependency managers, by enforcing detection of the project's existing tooling before any package installation. ## Core Features & Use Cases - Dependency Manager Detection: Scans the workspace for signal files (uv.lock, pyproject.toml, Pipfile, environment.yml, requirements.txt) in priority order to identify the correct tool. - Tool-Specific Commands: Maps each detected manager (uv, Poetry, Pipenv, Conda, venv+pip) to its proper install and setup commands. - Safe Default Workflow: Falls back to an isolated .venv with explicit .venv/bin/pip paths and requirements.txt freezing when no manager is found. - Use Case: When asked to add requests to a project containing a uv.lock file, the Skill directs the AI to run uv add requests instead of a global pip install requests. ## Quick Start Ask the AI to add a Python package to this project and it will detect the existing dependency manager and install it with the correct command.

Frequently Asked Questions about managing-python-dependencies

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

FAQPage Schema
How do I install Python packages without breaking my project environment?▼

Detect the project's dependency manager first by checking for signal files like uv.lock, pyproject.toml, Pipfile, or requirements.txt, then use that tool's install command. Never run a global pip install, which can corrupt system or project environments.

How to add a package to a uv-managed Python project?▼

Use `uv add <package>` when the project contains a uv.lock file or a pyproject.toml with a [tool.uv] section. Set up the environment with `uv sync` rather than pip-based commands.

Poetry vs pip vs conda for Python dependency management?▼

The correct choice is whichever tool the project already uses: Poetry if pyproject.toml has [tool.poetry], Conda if environment.yml exists, and venv plus pip if only requirements.txt is present. Mixing managers in one project is prohibited.

What should I do if a Python project has no dependency manager?▼

Default to venv plus pip: create an isolated environment with `python3 -m venv .venv`, install packages via `.venv/bin/pip install <package>`, and preserve state with `.venv/bin/pip freeze > requirements.txt`.

Why is running global pip install dangerous?▼

Global pip installs modify the system Python environment, causing version conflicts and breaking other projects. The Skill prohibits this and requires explicit virtual environment paths like .venv/bin/pip instead.