ワンクリックで
uv
// 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`
// 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`
| name | uv |
| description | 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` |
| globs | ["*.py","pyproject.toml","requirements*.txt"] |
| allowed-tools | ["Bash(uv add:*)","Bash(uv remove:*)","Bash(uv sync:*)","Bash(uv pip:*)","Bash(uv init:*)","Bash(uv tree:*)","Bash(uv pip:*)"] |
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.
Access Our World In Data's published datasets using the owid-catalog Python library. Provides a unified Python API for searching and fetching chart data, catalog tables, and indicators — returning enhanced pandas DataFrames with metadata. Use this as a Python-native alternative to the HTTP-based search-charts and fetch-chart-data skills.
This skill describes how to fetch data for an Our World In Data chart, once the relevant chart URL has been identified. Consult this skill to understand the possible query params to get the best results and to understand the response. Use it you need to fetch data and have already identified the relevant chart URL.
Our World In Data offers thousands of charts and related data on many important topics - from global population data, energy and electricity, economic data like GDP or poverty, health data like causes of death or prevalence of diseases, to data on democracy, violence and war. This skill describes how to effectively search for charts to either show visually or download the data for.
The duckdb cli is installed on this system and is a good choice for ad-hoc data analysis from CSV, parquet or NDJSON files. Use it when the user asks for data values in the context of a specific data file or to join multiple files together.
Create interactive Our World In Data style charts using the owid-grapher-py Python library. Use this skill when the user wants to visualize data as charts (line charts, bar charts, scatter plots, maps, etc.) in a Jupyter notebook, standalone HTML, or export charts to PNG/SVG.
Access Our World In Data's internal datasette instance to query data from our main MySQL database mirror and analytics data store. Use this when you need to look up or explore data from our internal infrastructure. Does not contain any timeseries data i.e. this does not help to answer questions about data like "what is the life expectancy in Nigeria?". Instead, it is useful for questions like "how many published charts do we have?" or "get the title for all views for a multidim".