managing-python-dependencies
/managing-python-dependencies
Ensures proper Python dependency management, avoiding global `pip install` and adhering to project-specific tooling. Use this skill if any of the following are true: 1. Attempting to run `pip install {package_name}`. 2. Python packages or dependencies need to be added or modified. 3. Initiating a new Python project. 4. Installing missing packages inside a notebook or Python project. 5. Generating Python code that includes `import` statements for third-party libraries. 6. Before executing Python scripts via the terminal to ensure the correct virtual environment is active.
- Author
- gemini-cli-extensions ↗
- Repository
- data-agent-kit-starter-pack ↗
- Licence
- Apache-2.0
- Last repository change
- 13.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 13.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Ensures proper Python dependency management, avoiding global `pip install` and adhering to project-specific tooling. Use this skill if any of the following are true: 1. Attempting to run `pip install {package_name}`. 2. Python packages or dependencies need to be added or modified. 3. Initiating a new Python project. 4. Installing missing packages inside a notebook or Python project. 5. Generating Python code that includes `import` statements for third-party libraries. 6. Before executing Python scripts via the terminal to ensure the correct virtual environment is active.
Original author description
Ensures proper Python dependency management, avoiding global `pip install` and adhering to project-specific tooling. Use this skill if any of the following are true: 1. Attempting to run `pip install {package_name}`. 2. Python packages or dependencies need to be added or modified. 3. Initiating a new Python project. 4. Installing missing packages inside a notebook or Python project. 5. Generating Python code that includes `import` statements for third-party libraries. 6. Before executing Python scripts via the terminal to ensure the correct virtual environment is active.
How it works
- Dependency Manager Detection (Only When Installing)
- Default: venv + pip
- Prohibited
SKILL.md preview
---
name: managing-python-dependencies
description: |
Ensures proper Python dependency management, avoiding global `pip install` and
adhering to project-specific tooling.
Use this skill if any of the following are true:
1. Attempting to run `pip install {package_name}`.
2. Python packages or dependencies need to be added or modified.
3. Initiating a new Python project.
4. Installing missing packages inside a notebook or Python project.
5. Generating Python code that includes `import` statements for third-party libraries.
6. Before executing Python scripts via the terminal to ensure the correct virtual environment is active.
license: Apache-2.0
metadata:
version: v3
publisher: google
---
# Python Dependency Management Rule
> [!CAUTION]
>
> **BEFORE any `pip install`**: You MUST first detect the project's existing
> dependency manager and use it correctly. Do NOT override the project's
> established tooling.
> [!NOTE]
>
> **Reactive Environment Check Bundling (Only When Installing)**: Do NOT run
> environment or package availability checks (`importlib.util.find_spec`,
> `pip list`, `ls uv.lock...`) proactively before writing code or creating a
> notebook. Only probe the environment when a package actually needs to be
> installed (for example, on `ModuleNotFoundError` / `ImportError` or an
> explicit user request to install dependencies).
>
> - **In Notebooks**: When a notebook cell execution tool (`execute_cell` /
> `notebook_execute_cell`) is available, check package availability (`import
> <pkg>` or `%pip list`) and install missing packages (`%pip install`)
> **inside notebook cells**, never via `python3 -c` or `pip` in the shell.
> - **In the Shell (Only When Installing)**: When a shell check is required
> before installing a missing package for a local script or project, you MUST
> NOT run multiple sequential 1-line shell check commands. Combine all
> environment and package availability probes into a single composite python
> one-liner or shell check step:
>
> ```bash
> python3 -c "import sys, importlib.util; print(f'Python {sys.version.split()[0]}'); [(print(f'{pkg}: {__import__(pkg).__version__}') if importlib.util.find_spec(pkg) else print(f'{pkg}: not found')) for pkg in ['pyspark', 'google.cloud.bigquery']]"
> ```
>
> This bundling also applies to dependency manager detection; when an install is
> needed, use a single `ls` or `find` command to check for all potential
> dependency manager configuration and lock files at once (e.g. `ls uv.lock
> poetry.lock Pipfile.lock requirements.txt pyproject.toml`).
## Dependency Manager Detection (Only When Installing)
Only run dependency manager detection when a package actually needs to be
installed (e.g., on `ModuleNotFoundError` / `ImportError` or when setting up a
missing local project environment)—never as an upfront pre-flight check before
creating or running a notebook. Before installing ANY Python package, check the
workspace for these files **in priority order**:
1. **Signal:** `uv.lock` or `pyproject.toml` with `[tool.uv]`
* **Tool:** **uv**
* **Install:** `uv add <package>`
* **Setup:** `uv sync`
2. **Signal:** `pyproject.toml` with `[tool.poetry]`
* **Tool:** **Poetry**
* **Install:** `poetry add <package>`
* **Setup:** `poetry install`
3. **Signal:** `Pipfile`
* **Tool:** **Pipenv**
* **Install:** `pipenv install <package>`
* **Setup:** `pipenv install`
4. **Signal:** `environment.yml`
* **Tool:** **Conda**
* **Install:** `conda install <package>`
* **Setup:** `conda env create -f environment.yml`
5. **Signal:** `requirements.txt` only
* **Tool:** **venv + pip**
* **Install:** `.venv/bin/pip install <package>`
* **Setup:** `.venv/bin/pip install -r requirements.txt`
6. **Signal:** None of the above
* **Tool:** **venv + pip** (default)
* **Install:** `.venv/bin/pip install <package>`
* **Setup:** `.venv/bin/pip install -r requirements.txt`
## Default: venv + pip
If no dependency manager is detected, use **venv + pip + requirements.txt** as
the default:
```bash
# Initialize environment
python3 -m venv .venv
# Add dependencies
.venv/bin/pip install <package>
# Preserve state
.venv/bin/pip freeze > requirements.txt
```
**Rules for venv + pip workflow:**
- Always use `.venv/bin/pip` or `.venv/bin/python` (explicit path).
- After installing, run: `.venv/bin/pip freeze > requirements.txt`.
- When setting up: `.venv/bin/pip install -r requirements.txt`.
## Prohibited
- **NEVER** run `pip install` globally
- **NEVER** override an existing dependency manager with a different one
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · gemini-cli-extensions/data-agent-kit-starter-pack | 100 | Apache-2.0 |
| googlecloudplatform/data-agent-kit-plugin | 100 | Apache-2.0 |
| thalesnola/TN-agy-config | 100 | Apache-2.0 |
| 420company/artemis | 95 | MIT |
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 9070e893aab6 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100pip
Expert Python pip package manager assistance covering requirements.txt, wheels, virtual environments, constraints, and pip-tools. Use when installing, locking, and managing Python dependencies. - 100uv
Installs Python packages, creates virtual environments, locks dependencies and manages Python versions with one fast command-line tool that replaces pip, pip-tools, pipx, poetry, pyenv and virtualenv. Use when a user asks to set up a Python project, add or upgrade a dependency,… - 100uv-python-project-setup
Create, repair, and validate uv Python project setup. Use when initializing Python apps or libraries, managing uv dependencies, virtual environments, or CI-ready uv workflows. - 100python-dependency-management
Add, remove, upgrade, sync, or install Python dependencies, and fix dependency problems, in Python >=3.13 projects and multi-project workspaces managed by uv, including dependency groups ([dependency-groups], dev dependencies) and optional extras. Enforces ">=<tested version>"… - 100uv-package-manager
Master the uv package manager for fast Python dependency management, virtual environments, and modern Python project workflows. Use when setting up Python projects, managing dependencies, or optimi... - 100uv-package-manager
Master the uv package manager for fast Python dependency management, virtual environments, and modern Python project workflows. Use when setting up Python projects, managing dependencies, or optimizing Python development workflows with uv.