Modern Python teaches the agent a current Python toolchain based on the Trail of Bits cookiecutter-python template. It uses uv for dependencies and environments, ruff for linting and formatting, ty for type checking, pytest with a coverage floor, and prek for pre-commit hooks, plus security tools such as shellcheck, detect-secrets, zizmor and pip-audit.
It covers a minimal project, a full package, standalone scripts with PEP 723 inline metadata, and step-by-step migration from requirements.txt, setup.py, flake8 and isort, and mypy.
What You Get
- A project layout with src/, pyproject.toml, dependency groups and a lock file
- Ruff, ty and pytest configuration with an 80 percent coverage floor
- PEP 723 headers for single-file scripts
- Migration steps from pip, setup.py, flake8, black, isort, mypy and pyright
- Security hooks and CI checks for secrets, workflows and vulnerable dependencies
Common Use Cases
- Starting a new Python package with strict linting and typing
- Writing a one-off script that declares its own dependencies
- Moving a requirements.txt project to uv
- Replacing flake8, black and isort with ruff
What Makes It Unique
It is opinionated and consistent: uv commands manage every dependency and run every tool, so the agent never edits dependency lists by hand or activates a virtual environment. It names the mistakes to avoid, such as putting dev tools in optional-dependencies or setting the ty Python version in the wrong table, and it can offer the Trail of Bits cookiecutter template for a full project.
Under The Hood
The skill is prose with reference files and templates and has no scripts of its own. It leads the agent to run uv, ruff, ty and pytest commands in the shell, install packages from PyPI, write pyproject.toml and a Makefile, and delete legacy files such as requirements.txt and virtual environments during a migration. For a full project it can run uvx cookiecutter against the Trail of Bits template on GitHub, which downloads and executes template code, so it asks you first. Two reference files also list installer one-liners that download a script and pipe it to the shell (for uv and prek) next to Homebrew and other options; they are documentation for you to choose from.