# Modern Python

> Use when writing, reviewing, or refactoring Python to ensure adherence to modern best practices (type syntax, `uv` instead of `python`, linting, formatting, etc.)

- Skill: `tomevault-io/modern-python-3` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/modern-python-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/modern-python-3/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/modern-python-3

---


- Never use `python`. Use `uv` instead of `python`
  - `uv add package-name`
  - `uv run script.py`
- Don't use `from __future__ import annotations`
- Use modern type syntax (`list[str], str | None`)
- Format with `uvx ruff format .`
- Lint with `uvx ruff check .` and `uvx ty check`
- Look before you leap (check conditions before acting)
- Don't keep backwards compatibility
- Declare variables close to use

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/davidgasquez) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

