managing-python-dependencies

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

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Yashyasik/zexca-api --skill managing-python-dependencies-yashyasik
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: managing-python-dependencies
Source: https://github.com/Yashyasik/zexca-api/tree/main/.gemini/skills/managing-python-dependencies
Command: npx skills add https://github.com/Yashyasik/zexca-api --skill managing-python-dependencies-yashyasik

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents broken Python environments caused by running global pip install or mixing dependency managers, ensuring every package is installed through the tooling the project already uses. ## Core Features & Use Cases - Dependency Manager Detection: Scans the workspace for signal files like uv.lock, pyproject.toml, Pipfile, environment.yml, and requirements.txt to identify the correct tool in priority order. - Tool-Specific Install 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 pip freeze > requirements.txt when no manager is found. - Use Case: When you ask an AI to add requests to a Poetry-based project, it runs poetry add requests instead of a global pip install, keeping the lockfile consistent. ## Quick Start Ask the AI to add a new 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 a Python package without breaking my project's dependency manager?▼

First detect the project's tooling by checking for signal files like uv.lock, pyproject.toml, Pipfile, or environment.yml. Then use the matching command, such as `uv add`, `poetry add`, or `pipenv install`, instead of a global `pip install`.

Which Python dependency manager should I use: uv, Poetry, Pipenv, or Conda?▼

Use whichever manager the project already declares. The detection order is uv first, then Poetry, Pipenv, Conda, and finally plain requirements.txt with venv. Never override an existing manager with a different one.

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

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

Why is running global pip install discouraged in Python projects?▼

Global pip installs pollute the system interpreter, cause version conflicts across projects, and bypass lockfiles maintained by tools like uv or Poetry. Always install into the project's managed environment or an isolated .venv.

How do I set up an existing Python project that uses requirements.txt?▼

Create a virtual environment with `python3 -m venv .venv`, then install dependencies using `.venv/bin/pip install -r requirements.txt`. Always invoke pip through the explicit .venv path so the global interpreter stays untouched.