Skillsbench setup-env
When given a Python project codebase, this skill helps the agent to set up virtual environments, install dependencies, and run scripts.
install
source · Clone the upstream repo
git clone https://github.com/benchflow-ai/skillsbench
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/benchflow-ai/skillsbench "$T" && mkdir -p ~/.claude/skills && cp -r "$T/tasks/setup-fuzzing-py/environment/skills/setup-env" ~/.claude/skills/benchflow-ai-skillsbench-setup-env && rm -rf "$T"
manifest:
tasks/setup-fuzzing-py/environment/skills/setup-env/SKILL.mdsource content
Skill: Use uv to manage Python environments
Scope
- Create a virtual environment
- Install dependencies
- Run Python scripts/commands
Assume
uv is already available on PATH.
Workflow selection
- If
exists: use project workflow (pyproject.toml
,uv sync
)uv run - Else if
exists: use pip workflow (requirements.txt
,uv venv
,uv pip install -r ...
).venv/bin/python ... - Else: stop with an error ("No pyproject.toml or requirements.txt found.")
Project workflow (pyproject.toml)
Create venv + install dependencies
From the repo root (where
pyproject.toml is):
uv sync
Notes:
- uv maintains a persistent project environment at
and installs deps there..venv
Run scripts / commands (preferred)
Always run within the project environment:
uv run -- python <script.py> [args...]uv run -- python -m <module> [args...]
Notes:
executes inside the project environment and ensures it is up-to-date.uv run
Pip workflow (requirements.txt)
Create venv
From the repo root:
# createsuv venv
by default.venv
Install dependencies
uv pip install -r requirements.txt
Run scripts / commands
Run using the venv interpreter directly (no activation required):
.venv/bin/python <script.py> [args...].venv/bin/python -m <module> [args...]
(uv will also automatically find and use the default
.venv in subsequent invocations when you use uv pip ... commands.)
Minimal sanity checks (optional)
test -x .venv/bin/python
(verify packages installed)uv pip list