Cómo usar
- Copia el comando y revisa el paquete antes de instalarlo en tu entorno de agente.
- Consulta las herramientas, credenciales y entornos necesarios en el documento original.
- Describe las entradas y el resultado deseado; contrasta la salida con las fuentes.
npx skills add https://github.com/legout/skills --skill modern-pythonAntes de empezar
- La instalación no incluye suscripción al modelo, cuota API ni permisos sobre tus archivos.
- Las estrellas e instalaciones reflejan actividad, no una prueba independiente de calidad o seguridad.
Contenido del repositorio de origen con títulos, ejemplos, código, tablas, enlaces e imágenes preservados.
Modern Python
Before changing a project, read its instructions and current configuration, preserve supported Python versions, and run installed CLI help. Do not replace a working toolchain unless the user requests migration and the replacement reaches validation parity.
Route
- Standalone script with dependencies: read PEP 723 scripts.
- New project or package: read pyproject, Ruff config, and testing.
- Existing project migration: read migration checklist before editing.
- uv command detail: read uv commands.
- Security tooling: read security setup, Dependabot, and prek only when requested or already used.
Defaults for new work
- Manage dependencies with
uv add,uv remove, anduv sync; run commands withuv run. - Use dependency groups for development tools.
- Use Ruff for lint and format, ty for type checks, and pytest for tests unless project constraints require otherwise.
- Prefer
uv_buildfor ordinary new packages. - Never manually activate or manage a virtualenv.
Minimal project
uv init myproject
cd myproject
uv add requests
uv add --group dev pytest ruff ty
uv run ruff check .
uv run ty check
uv run pytestFor repository documentation, follow its existing system. If it uses Zensical, validate with uv run zensical build; use uv run zensical serve only for interactive preview.
Verification
Run the project's existing checks plus Ruff, ty, and tests when configured. During migration, compare old and new validation results before deleting legacy configuration. Hand versioning or publication to make-release.
Source
Adapted under CC-BY-SA-4.0 from Trail of Bits' `modern-python` package, pinned to commit d3323cefbcf645678b8dc481de204b02ad3d02dc. See sources.json and THIRD_PARTY_NOTICES.md.

