use-modern-python
Write modern, idiomatic Python that uses every language and stdlib feature available up to the project's minimum supported Python version, and nothing newer. Detects the target version from pyproject.toml (requires-python, Poetry), setup.cfg, setup.py, or .python-version. Use this skill whenever writing, refactoring, reviewing, or modernizing Python code in a repository, including small edits, new modules, tests, and scripts, even if the user doesn't say "modern". Also use when the user asks which Python features they can use, wants to upgrade old idioms, or mentions match statements, type hints, generics, typing, or Python version compatibility.
Pinned to revision c7ab12679998, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/use-modern-python/SKILL.md
- skills/use-modern-python/agents/openai.yaml
- skills/use-modern-python/scripts/detect_python_version.py
Every link opens the file at its source, pinned to the revision this page describes.