From skill-sommelier
Configure Python projects with modern tooling: uv, ruff, ty. Use when creating new Python projects, setting up pyproject.toml, migrating from pip/Poetry/mypy/black, or writing standalone scripts. Triggers on new Python project, setup Python, pyproject.toml, migrate from pip, migrate from Poetry, replace mypy, replace black, uv init, ruff config.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skill-sommelier:ss-modern-pythonThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reference for modern Python tooling and project setup. Adapted from [trailofbits/modern-python](https://github.com/trailofbits/skills).
Reference for modern Python tooling and project setup. Adapted from trailofbits/modern-python.
| Tool | Purpose | Replaces |
|---|---|---|
| uv | Package/dependency management | pip, virtualenv, pip-tools, pipx, pyenv, Poetry |
| ruff | Linting AND formatting | flake8, black, isort, pyupgrade |
| ty | Type checking | mypy, pyright |
| pytest | Testing | unittest |
| Avoid | Use Instead |
|---|---|
uv pip install | uv add and uv sync |
| Editing pyproject.toml to add deps | uv add <pkg> / uv remove <pkg> |
| Poetry | uv |
| requirements.txt for projects | pyproject.toml + uv.lock |
| requirements.txt for scripts | PEP 723 inline metadata |
| mypy / pyright | ty |
[project.optional-dependencies] for dev tools | [dependency-groups] (PEP 735) |
| Manual virtualenv activation | uv run <cmd> |
serial type aliases | BIGINT GENERATED ALWAYS AS IDENTITY |
uv init myproject
cd myproject
uv add requests rich
uv add --group dev pytest ruff ty
uv run pytest
uv run ruff check .
uv run ty check src/
uv init --package myproject
cd myproject
[project]
name = "myproject"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = []
[dependency-groups]
dev = [{include-group = "lint"}, {include-group = "test"}]
lint = ["ruff", "ty"]
test = ["pytest", "pytest-cov"]
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = ["ALL"]
ignore = ["D", "COM812", "ISC001"]
[tool.pytest.ini_options]
addopts = ["--cov=myproject"]
[tool.ty.environment]
python-version = "3.13"
uv sync --all-groups
uv run ruff check .
uv run ty check src/
uv run pytest
For single-file scripts with dependencies, use inline metadata instead of pyproject.toml:
# /// script
# requires-python = ">=3.13"
# dependencies = ["requests", "rich"]
# ///
import requests
from rich import print
data = requests.get("https://httpbin.org/ip").json()
print(data)
Run with: uv run script.py (uv auto-installs dependencies).
uv init --bare
# Add each dependency
uv add requests rich pandas
# Add dev deps
uv add --group dev pytest ruff ty
uv sync
Then delete requirements.txt, requirements-dev.txt, and any virtualenv directories.
uv init --bare
# Transfer deps from [tool.poetry.dependencies]
uv add requests rich
# Transfer dev deps from [tool.poetry.group.dev.dependencies]
uv add --group dev pytest ruff
uv sync
Then delete poetry.lock and [tool.poetry] sections.
uv remove flake8 black isort (if installed).flake8, [tool.black], [tool.isort] configsuv add --group dev ruffuv run ruff check --fix . && uv run ruff format .uv remove mypy (if installed)mypy.ini or [tool.mypy] sectionuv add --group dev tyuv run ty check src/| Command | Description |
|---|---|
uv init | Create new project |
uv init --package | Create distributable package |
uv add <pkg> | Add dependency |
uv add --group dev <pkg> | Add to dev group |
uv remove <pkg> | Remove dependency |
uv sync | Install dependencies |
uv sync --all-groups | Install all groups |
uv run <cmd> | Run in project venv |
uv run --with <pkg> <cmd> | Run with temporary dep |
uv build | Build package |
uv publish | Publish to PyPI |
npx claudepluginhub jasonlo/skill-sommelierGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.