Skip to content

archibate/dotfiles-opencode / skills/uv

Use this skill when using UV (Python package manager), needs to set up Python virtual environments, install/manage Python CLI tools, migrate from pip/pipx to UV, Python version management, or troubleshoot UV-related issues.

examples/virtual-environments.md

View on GitHub
# Virtual Environment Workflows

## Overview

Virtual environment management patterns and best practices with UV.

## Basic Project Setup

```bash
# Create new project directory
mkdir my-project
cd my-project

# Create virtual environment
python -m venv .venv

# Activate (Windows Git Bash)
. .venv/Scripts/activate

# Activate (Linux/Mac)
source .venv/bin/activate

# Install dependencies with UV
uv pip install requests pandas numpy

# Freeze dependencies
uv pip freeze > requirements.txt

# Deactivate when done
deactivate
```

## Existing Project Migration

```bash
# Clone existing project
git clone https://github.com/user/project.git
cd project

# Create virtual environment
python -m venv .venv

# Activate
. .venv/Scripts/activate  # Windows Git Bash
source .venv/bin/activate  # Linux/Mac

# Install from requirements with UV (much faster than pip)
uv pip install -r requirements.txt

# Verify installation
python -c "import requests; print('Success!')"
```

## Multi-Environment Project

```bash
# Development environment
python -m venv .venv-dev
. .venv-dev/Scripts/activate
uv pip install -r requirements-dev.txt
deactivate

# Production environment
python -m venv .venv-prod
. .venv-prod/Scripts/activate
uv pip install -r requirements.txt
deactivate

# Testing environment
python -m venv .venv-test
. .venv-test/Scripts/activate
uv pip install -r requirements.txt pytest coverage
deactivate

# Use specific environment
. .venv-test/Scripts/activate
pytest tests/
```

## Related Documentation

- [Python Environment Management Reference](../references/python-environment.md)
- [Installation and Setup](../references/installation-and-setup.md)
- [Tool Management](../references/tool-management.md)
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 467kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 319kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 319kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 319kUpdated Claude CodeCodexVerifiedInstall