← ClaudeAtlas

python-venvlisted

Create a Python virtual environment (.venv) in the current project — set up a venv, install requirements.txt or pyproject.toml deps, gitignore the venv. Prefers uv, falls back to stdlib `python -m venv`.
asynchronos/operator47-plugins · ★ 0 · Code & Development · score 72
Install: claude install-skill asynchronos/operator47-plugins
# Python Virtual Environment Setup Create a Python virtual environment in the current working directory, install any project dependencies that are present, ensure the venv is gitignored, and print activation instructions. The skill is **read-mostly** on the project: it writes exactly two things — the `.venv/` directory and (if needed) a `.venv/` line in `.gitignore`. Nothing else is touched. ## When To Use Invoke this skill when the user wants to: - Spin up a fresh Python environment for a new or untouched project - Install a project's `requirements.txt` or `pyproject.toml` dependencies in isolation - Recover a broken `.venv/` (recreate from scratch) - Add `.venv/` to a project's `.gitignore` Do **not** invoke this skill for: - Conda/mamba environments (different workflow) - System-wide pip installs (this skill always isolates) - Already-active venvs the user just wants to add packages to (use `pip install` directly) ## Procedure Execute these six steps in order. Each step is gated — confirm with the user (via `AskUserQuestion`) at decision points marked **ask**. ### Step 1 — Detect existing venv Look for `.venv/` and `venv/` in the current working directory: ```powershell $existing = @() if (Test-Path '.venv') { $existing += '.venv' } if (Test-Path 'venv') { $existing += 'venv' } ``` If `$existing` is empty, skip to Step 2. If a venv exists, **ask** the user how to proceed: - **Reuse** — keep the existing venv, skip Step 3, jump to Step 4 (install deps into i