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. Creating a new notebook, even if just using BigQuery cells. 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
- 所属仓库
- saski/arnesto
- 最近更新
- 2026-11-12
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- managing-python-dependencies
- license
- Apache-2.0
- metadata
- { "version": "v1", "publisher": "google" }
- 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. Creating a new notebook, even if just using BigQuery cells. 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.
03 SKILL.md 正文
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:
- Signal:
uv.lockorpyproject.tomlwith[tool.uv]- Tool: uv
- Install:
uv add <package> - Setup:
uv sync
- Signal:
pyproject.tomlwith[tool.poetry]- Tool: Poetry
- Install:
poetry add <package> - Setup:
poetry install
- Signal:
Pipfile- Tool: Pipenv
- Install:
pipenv install <package> - Setup:
pipenv install
- Signal:
environment.yml- Tool: Conda
- Install:
conda install <package> - Setup:
conda env create -f environment.yml
- Signal:
requirements.txtonly- Tool: venv + pip
- Install:
.venv/bin/pip install <package> - Setup:
.venv/bin/pip install -r requirements.txt
- 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/pipor.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 installglobally - NEVER override an existing dependency manager with a different one
04 同仓库更多 Skills
visualize
Use /visualize for creating compact charts, diagrams, or other visuals inline as part of the conversation itself. It chooses among Markdown tables, Mermaid, inline HTML, and other supported in-transcript forms. Use Canvas for durable artifacts outside the transcript that users may revisit, refine, or share.
update-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
update-cli-config
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
statusline
Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.
split-to-prs
Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.
shell
Runs the rest of a /shell request as a literal shell command. Use only when the user explicitly invokes /shell and wants the following text executed directly in the terminal.