Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Venv Manager

BSecurity

Create, manage, and validate Python virtual environments. Use for project isolation and dependency management.

211 stars
0 votes
0 copies
71 views
Added 12/21/2025
devopspythonshellbashgitci/cddocumentation

Security Analysis

B89/100
highPerforms destructive filesystem operations
mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned 2/12/2026

$npx -y skills add jmagly/ai-writing-guide --skill venv-manager --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Venv Manager?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Venv Manager
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/jmagly-venv-manager/badge)](https://www.skillsdirectory.com/skills/jmagly-venv-manager)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: venv-manager
description: Create, manage, and validate Python virtual environments. Use for project isolation and dependency management.
tools: Read, Write, Bash
---

# Virtual Environment Manager Skill

## Purpose

Single responsibility: Create and manage Python virtual environments for project isolation. (BP-4)

## Grounding Checkpoint (Archetype 1 Mitigation)

Before executing, VERIFY:

- [ ] Python interpreter available and version known
- [ ] Target directory exists and is writable
- [ ] No conflicting venv already active
- [ ] requirements.txt or pyproject.toml exists (for install)

**DO NOT create venv without confirming Python version.**

## Uncertainty Escalation (Archetype 2 Mitigation)

ASK USER instead of guessing when:

- Multiple Python versions available - which to use?
- Existing venv found - replace or use?
- requirements.txt vs pyproject.toml both present
- Development vs production dependencies

**NEVER delete existing venv without confirmation.**

## Context Scope (Archetype 3 Mitigation)

| Context Type | Included | Excluded |
|--------------|----------|----------|
| RELEVANT | Python version, project deps, venv path | Application code |
| PERIPHERAL | CI/CD requirements | Test configurations |
| DISTRACTOR | Deployment configs | Other language envs |

## Workflow Steps

### Step 1: Check Python Environment (Grounding)

```bash
# Available Python versions
which python3
python3 --version

# Check for existing venv
ls -la venv/ 2>/dev/null || ls -la .venv/ 2>/dev/null || echo "No venv found"

# Current active environment
echo "VIRTUAL_ENV: $VIRTUAL_ENV"
```

### Step 2: Create Virtual Environment

```bash
# Standard creation
python3 -m venv venv

# With specific Python version
python3.11 -m venv venv

# With system packages access
python3 -m venv venv --system-site-packages

# Verify creation
ls -la venv/bin/python
```

### Step 3: Activate and Install Dependencies

```bash
# Activate
source venv/bin/activate

# Upgrade pip
pip install --upgrade pip

# Install from requirements.txt
pip install -r requirements.txt

# Or from pyproject.toml
pip install -e .

# Development dependencies
pip install -r requirements-dev.txt
```

### Step 4: Validate Environment

```bash
# List installed packages
pip list

# Check for missing deps
pip check

# Export current state
pip freeze > requirements-lock.txt
```

## Recovery Protocol (Archetype 4 Mitigation)

On error:

1. **PAUSE** - Don't delete corrupted venv
2. **DIAGNOSE** - Check error type:
   - `venv creation failed` → Check Python installation
   - `pip install failed` → Check network, package availability
   - `activation failed` → Check shell compatibility
   - `dependency conflict` → Use pip-tools or poetry
3. **ADAPT** - Try alternative approach (rebuild, different Python)
4. **RETRY** - With fresh venv (max 3 attempts)
5. **ESCALATE** - Report with pip debug info

**Rollback command:**
```bash
rm -rf venv && python3 -m venv venv
```

## Checkpoint Support

State saved to: `.aiwg/working/checkpoints/venv-manager/`

```
checkpoints/venv-manager/
├── python_version.txt       # Python used
├── pip_freeze.txt           # Installed packages
├── creation_log.txt         # Creation output
└── validation_status.json   # Health check results
```

## Common Commands

| Command | Purpose |
|---------|---------|
| `python3 -m venv venv` | Create venv |
| `source venv/bin/activate` | Activate (bash/zsh) |
| `venv\Scripts\activate` | Activate (Windows) |
| `deactivate` | Deactivate |
| `pip freeze > requirements.txt` | Export deps |
| `pip install -r requirements.txt` | Install deps |

## Best Practices

1. **Naming**: Use `venv/` or `.venv/` consistently
2. **Git**: Add venv to `.gitignore`
3. **Lock files**: Use `pip freeze` or `pip-tools`
4. **Isolation**: Always create project-specific venvs
5. **Documentation**: Document Python version in README

## References

- Python venv docs: https://docs.python.org/3/library/venv.html
- REF-001: Production-Grade Agentic Workflows (BP-4)
- REF-002: LLM Failure Modes (Archetype 1 grounding)

Attribution

jmaglyjmagly
View sourceSee grades on GitHubMore from jmagly →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Terraform Module Library

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

401991 votes

sematext-otel

Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.

01 votes

Deployment Patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

2699140 votes

Babysit

Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.

971540 votes

V7 Roster

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

953190 votes
View all in devops →