uv-env
Skill2 starsChanged 5 months agoMITView on GitHub
Create and manage Python project environments with the uv package manager. Use whenever the user wants to set up a new Python project, create a virtual environment, initialize a pyproject.toml, install/add Python packages, lock or sync dependencies, or pin a Python version — even if they don't explicitly mention "uv". Prefer this skill over raw pip/venv/conda for any Python environment work in a project directory.
- Pipes a download into a shell
- Installs packages
In this repository20 other files it gives its agents.
- codex-paper-figure-skillSkill
- discover-academic-skillsSkill
- drawio-paperSkill
- explain-anything-htmlSkill
- explain-paper-htmlSkill
- filetree-simpleSkill
- human-cognition-cacheSkill
- karpathy-coding-rulesSkill
- map-then-territorySkill
- okf-repo-organizerSkill
- paper-searchSkill
- paper-wiki-managerSkill
- project-dispatchSkill
- research-bibleSkill
- research-project-managerSkill
- sell-research-honestlySkill
- session-handoffSkill
- skill-organizerSkill
- task-file-builderSkill
- writing-great-promptSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Check that uv is installed:
- Distinctive: line 27
If missing, install it (Linux/macOS):
- Very specific: line 39
If the directory has no pyproject.toml, create a minimal one.
- Very specific: line 50
Use >=3.10 as a sensible default unless the user specifies otherwise.
- Very specific: line 52
Avoid uv init when the user already has files in the directory — it can scaffold extra files (README.md, hello.py, .python-version) the …
- Distinctive: line 65
If the user requested a specific Python version, set it first:
- Very specific: line 74
Always use uv add rather than pip install — it updates pyproject.toml and uv.lock together.
- Very specific: line 84
Prefer uv run over manually activating .venv:
- Distinctive: line 93
If the user explicitly wants to activate the venv (e.g., for an interactive shell session), use the traditional approach:
- Very specific: line 100
Prefer uv run for one-off commands and scripts — it's stateless and avoids the "wrong env activated" footgun.
- Very specific: line 117
Commit pyproject.toml and uv.lock.
- Very specific: line 119
If the user runs into a resolution conflict, check whether requires-python is too tight.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
uv-env
Set up and maintain Python project environments using uv. uv is fast, replaces pip + venv + pip-tools, and works from a single pyproject.toml.
When to use
- "Create a Python environment for this project"
- "Set up a
pyproject.toml" - "Install / add the
numpypackage" - "Lock the dependencies"
- "Pin Python to 3.11"
- Any request to bootstrap a Python project where the manager is unspecified — default to uv.
Prerequisites
Check that uv is installed:
uv --versionIf missing, install it (Linux/macOS):
curl -LsSf https://astral.sh/uv/install.sh | shThen ensure it's on PATH (the installer prints the line to source, usually ~/.local/bin).
Core workflow
1. Initialize a project
If the directory has no pyproject.toml, create a minimal one. Keep dependencies empty at start — only add what's needed.
[project]
name = "<project-name>"
version = "0.1.0"
description = "<short description>"
requires-python = ">=3.10"
dependencies = []Use >=3.10 as a sensible default unless the user specifies otherwise. Pick name from the directory name (kebab-case).
Avoid uv init when the user already has files in the directory — it can scaffold extra files (README.md, hello.py, .python-version) the user didn't ask for. Writing the pyproject.toml directly is cleaner.
2. Create the virtual environment
uv syncThis:
- Creates
.venv/in the project root - Resolves dependencies from
pyproject.toml - Writes/updates
uv.lock
If the user requested a specific Python version, set it first:
uv python pin 3.11
uv sync3. Add packages later
Always use uv add rather than pip install — it updates pyproject.toml and uv.lock together.
uv add numpy pandas
uv add --dev pytest ruff # dev-only deps
uv remove <package> # remove4. Run commands inside the environment
Prefer uv run over manually activating .venv:
uv run python script.py
uv run pytestuv run ensures the environment is in sync before executing.
If the user explicitly wants to activate the venv (e.g., for an interactive shell session), use the traditional approach:
source .venv/bin/activate # bash/zsh
deactivate # exitPrefer uv run for one-off commands and scripts — it's stateless and avoids the "wrong env activated" footgun.
Quick reference
| Task | Command |
Create env from pyproject.toml | uv sync |
| Add a package | uv add <pkg> |
| Add a dev package | uv add --dev <pkg> |
| Remove a package | uv remove <pkg> |
| Run a command in the env | uv run <cmd> |
| Pin Python version | uv python pin <version> |
| Update lockfile | uv lock |
| Upgrade all deps | uv sync --upgrade |
Notes
- Commit
pyproject.tomlanduv.lock. Don't commit.venv/. - The skill defaults to a minimal
pyproject.tomland grows it incrementally — don't preinstall packages the user hasn't asked for. This keeps the lockfile small and avoids dragging in transitive deps that might cause version conflicts later. - If the user runs into a resolution conflict, check whether
requires-pythonis too tight; loosening to>=3.10usually fixes it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

