
managing-environments
Best practices for managing development environments including Python venv and conda. Always check environment status before installations and confirm with user before proceeding.
- Installs
- 81
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/delphine-l/claude_global --skill managing-environments- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads managing-environments automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Managing Development Environments
Guidelines for working with Python virtual environments (venv) and conda environments. This skill ensures safe, organized package installations by always checking and confirming the active environment before proceeding.
Supporting files in this directory:
installation-patterns.md- Installation commands for venv and conda, channel priority, TOS error handlingbest-practices-and-scenarios.md- Common scenarios, best practices, resumable data fetch patternstroubleshooting-and-examples.md- Troubleshooting common issues and worked examples
When to Use This Skill
Activate this skill whenever:
- Installing Python packages or tools
- User requests to install dependencies
- Setting up a new Python project
- Debugging import or package issues
- Working with any Python development
Core Principles
- Always check environment status before any installation
- Always confirm with user which environment to use
- Never install without environment confirmation
- Warn if no environment is active
- Help user choose appropriate environment type
Environment Detection Workflow
Step 1: Check Environment Status
Before ANY installation command, run these checks:
# Check for active venv
echo "Python executable: $(which python)"
echo "Virtual environment: $VIRTUAL_ENV"
# Check for conda environment
echo "Conda environment: $CONDA_DEFAULT_ENV"
conda info --envs 2>/dev/null || echo "Conda not available"
Step 2: Interpret Results
Scenario A: venv is active
Python executable: /path/to/project/.venv/bin/python
Virtual environment: /path/to/project/.venv
Conda environment:
-> Python venv is active
Scenario B: conda environment is active
Python executable: /path/to/miniconda3/envs/myenv/bin/python
Virtual environment:
Conda environment: myenv
-> Conda environment is active
Scenario C: No environment (system Python)
Python executable: /usr/bin/python
Virtual environment:
Conda environment:
-> No environment active! Warn user.
Scenario D: Both detected (rare)
Virtual environment: /path/to/.venv
Conda environment: base
-> Both active, prioritize what which python shows, but confirm with user
Step 3: Confirm with User
Always ask before proceeding:
I've detected the following environment:
- Environment type: [venv/conda/none]
- Location: [path]
- Python version: [version]
Is this the environment you want me to use for installing [package/tool]?
Wait for user confirmation before proceeding.
For installation commands by environment type, see installation-patterns.md.
No Environment Active - Warning & Planning
If no environment is detected, DO NOT PROCEED with installation. Instead:
Step 1: Warn User
WARNING: No Python environment detected!
You're currently using system Python:
- Location: [path to python]
- Version: [version]
Installing packages to system Python can:
- Cause conflicts with system packages
- Require sudo/admin privileges
- Make projects difficult to reproduce
- Break system tools that depend on specific versions
I recommend creating a virtual environment first.
Step 2: Help Choose Environment Type
Decision Tree:
Question: What type of project are you working on?
A. Pure Python project (web dev, scripting, etc.)
-> Recommend: Python venv
-> Fast, lightweight, standard Python tool
B. Data science / Scientific computing
-> Ask: Do you need non-Python dependencies? (R, C libraries, etc.)
B1. Yes (or using packages like numpy, scipy, pandas, etc.)
-> Recommend: Conda
-> Better binary dependency management
B2. No, only Python packages
-> Recommend: Python venv
-> Simpler and faster
C. Bioinformatics / Genomics
-> Recommend: Conda (with bioconda channel)
-> Most tools available via bioconda
-> Manages complex dependencies well
D. Galaxy tool development
-> Recommend: Conda
-> Galaxy uses conda for tool dependencies
-> Direct compatibility
Step 3: Offer to Create Environment
For venv:
python -m venv .venv
source .venv/bin/activate # Linux/Mac
which python
For conda:
conda create -n project-name python=3.11
conda activate project-name
conda info --envs
which python
Environment Selection Guidelines
Use Python venv When:
- Pure Python project
- Simple dependencies (all available on PyPI)
- Standard web development (Django, Flask, FastAPI)
- No compiled extensions or C libraries
- Want fastest environment creation
- Working with Python 3.3+
Advantages: Lightweight, fast, built into Python, works on all platforms. Disadvantages: Harder to manage non-Python dependencies, binary packages may need system libraries.
Use Conda Environment When:
- Data science / machine learning
- Scientific computing (numpy, scipy, pandas)
- Bioinformatics / genomics
- Need specific Python versions
- Cross-language dependencies (R, C++, etc.)
- Galaxy tool development
- Complex binary dependencies
Advantages: Manages binary dependencies, cross-language support, better for scientific packages, can manage Python version. Disadvantages: Slower than venv, larger disk space, requires conda installation.
Quick Reference
Environment Detection Commands
# Check what's active
which python
echo $VIRTUAL_ENV
echo $CONDA_DEFAULT_ENV
# Python version
python --version
# Installed packages
pip list # for pip
conda list # for conda
# Environment location
pip show package-name # shows where package is installed
Activation Commands
# venv
source .venv/bin/activate # Linux/Mac
.venv\Scripts\activate # Windows
# conda
conda activate environment-name
# Deactivation
deactivate # venv
conda deactivate # conda
For common scenarios, best practices, troubleshooting, and worked examples, see the supporting files in this directory.
Summary
Always remember:
- Check environment before any installation
- Show user what environment is active
- Confirm with user before proceeding
- Warn if no environment is active
- Help choose appropriate environment type
- Document environment setup for reproducibility
Never:
- Install without checking environment
- Assume user wants to use system Python
- Install without user confirmation
- Skip warning about base conda environment
This skill ensures clean, reproducible, conflict-free Python environments across all projects.
FAQ
What does the managing-environments skill do?
Best practices for managing development environments including Python venv and conda. Always check environment status before installations and confirm with user before proceeding.
How do I install managing-environments?
Run npx skills add https://github.com/delphine-l/claude_global --skill managing-environments in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/managing-environments/ (personal) or .claude/skills/managing-environments/ (project).
Which AI agents can use managing-environments?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is managing-environments safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains managing-environments?
It is published by delphine-l in delphine-l/claude_global. It has 81 recorded installs.
More from delphine-l/claude_global
token-efficiency
delphine-l/claude_global
Token optimization best practices for cost-effective Claude Code usage. Automatically applies efficient file reading, command execution, and output handling strategies. Includes model selection guidance (Opus for learning, Sonnet for development/debugging). Prefers bash commands over reading files.
bioinformatics-fundamentals
delphine-l/claude_global
Open the skill to read its SKILL.md instructions.
folder-organization
delphine-l/claude_global
Open the skill to read its SKILL.md instructions.
bioinformatics-visualization
delphine-l/claude_global
Open the skill to read its SKILL.md instructions.
obsidian
delphine-l/claude_global
Open the skill to read its SKILL.md instructions.
jupyter-notebook-analysis
delphine-l/claude_global
Open the skill to read its SKILL.md instructions.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.