Help us improve
Share bugs, ideas, or general feedback.
From owid-general
We always use `uv` for running python scripts (both standalone and complex python projects) and managing python dependencies. Always use this instead of running system `python`, `python3`, `pip` or `pip3`
npx claudepluginhub owid/owid-claude-plugins --plugin owid-generalHow this skill is triggered — by the user, by Claude, or both
Slash command
/owid-general:uvThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
When running Python code or managing Python dependencies, always use `uv` instead of `pip` or `python` directly.
Runs Python scripts with uv supporting PEP 723 inline dependencies, temporary --with packages, and ephemeral uvx tools. Use for quick script execution without virtualenvs.
Guides uv for Python projects: dependency management with pyproject.toml, virtual environments, Python versions, PEP 723 scripts, tool installs, pip/poetry migrations, CI/CD, Docker.
Share bugs, ideas, or general feedback.
When running Python code or managing Python dependencies, always use uv instead of pip or python directly.
uv should be installed - if it is not, ask the user to brew install uv or similar depending on their OS. Offer to do it on their behalf.
If you are running in sandbox mode, tell the user that you want to add the uv cache directory to the list of allowed paths, by adding the snippet below to the PROJECTDIR/.claude/settings.local.json file. Once this is done, uv will be able to read and write its cache even in sandbox mode.
{
"permissions": {
"allow": [
"Read(~/.cache/uv)",
"Edit(~/.cache/uv)",
// other allowed paths...
],
}
}
The preferred default python version to use and set up for projects is 3.12.
Write code using type hints.
For projects or very complex standalone scripts, set up ruff (linter/formatter) and ty (type checker) as dev dependencies and run both when you make changes to python source code.
For python projects with dependencies, always use uv to manage dependencies (uv init, uv add, uv sync, etc) and run scripts (uv run).
For standalone scripts, use comment headers to specify dependencies like so:
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "requests",
# ]
# ///
# rest of your python script comes below
Instead of:
python script.py
Use:
uv run --script script.py
For one-off tool execution:
uv tool run <tool-name>
# or shorthand
uvx <tool-name>
For complex interactions with uv or to debug uv issues, refer to the online documentation at https://docs.astral.sh/uv/llms.txt and the pages linked from there. This is not necessary to just run scripts, add dependencies etc.