managing-python-dependencies

Guidance for managing Python packages within a project. It identifies the project's dependency tool, such as uv, Poetry, Pipenv, Conda, or a virtual environment with pip, before packages are installed.

In plain words
What is it for?
Use it when adding Python dependencies, starting a Python project, or preparing its development environment.
Why use it?
It prevents packages from being installed globally or with the wrong tool, which can leave a project inconsistent or hard to reproduce.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/gemini-cli-extensions/data-agent-kit-starter-pack/managing-python-dependencies
Any agent
npx skills add gemini-cli-extensions/data-agent-kit-starter-pack --skill managing-python-dependencies
Clone the repo
git clone --depth 1 https://github.com/gemini-cli-extensions/data-agent-kit-starter-pack

Made for: Claude Code, Codex.

Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 740 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00138 $0.00740
Opus 5 $0.00069 $0.00370
Sonnet 5 $0.00028 $0.00148
Haiku 4.5 $0.00014 $0.00074

Measured 2d ago against content hash 7ad459a5a818, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

managing-python-dependencies scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/managing-python-dependencies/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Dependency Manager Detection

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:

# 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

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 84 lines · 138 tokens per session scan A 7ad459a5a818

Subscribe to this mod's changes

managing-python-dependencies is a skill published in the GitHub repository gemini-cli-extensions/data-agent-kit-starter-pack (177 stars, last pushed today), licensed Apache-2.0. It adds 138 tokens to every session and 740 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.