modern-python

Standardize Python project configuration with uv, ruff, ty, and pytest.

Updated May 2, 2026
One-click install
npx skills add https://github.com/ayehiaa/my-travel-assistant --skill modern-python-ayehiaa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modern-python
Source: https://github.com/ayehiaa/my-travel-assistant/tree/main/.agents/skills/modern-python
Command: npx skills add https://github.com/ayehiaa/my-travel-assistant --skill modern-python-ayehiaa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the problem of slow, inconsistent, and error-prone Python project setup by standardizing modern tooling, dependency management, formatting/linting, typing, testing, and migration practices into a clear, repeatable workflow.

Core Features & Use Cases

  • Reproducible dependency management with uv: add/remove dependencies, install grouped dev/test/docs deps, and run commands inside the managed environment (no manual venv activation).
  • Unified code quality with ruff: replace multiple linters/formatters (flake8/black/isort/etc.) using ruff check and ruff format with consistent configuration.
  • Fast type checking with ty: use ty as the modern, faster alternative to mypy/pyright for type validation and migration.
  • Testing + coverage with pytest: configure pytest and coverage thresholds to keep quality from regressing.
  • Security hardening for project workflows: pre-commit security hooks, CI auditing, dependency vulnerability scanning, and automated updates via Dependabot.
  • Migration guidance from legacy toolchains: move from requirements.txt/Poetry/mypy/black/flake8 to the modern uv/ruff/ty setup, including cleanup steps and anti-pattern avoidance.

Use Case Example: You have a new service to build and want a robust baseline quickly—run with Python >= 3.11, manage dependencies with uv, lint/format with ruff, type-check with ty, test with pytest/coverage, and add security scanning and auto-updates without spending days wiring everything manually.

Quick Start

Configure your new project for modern Python by initializing with uv, adding runtime dependencies with uv add, and installing dev tooling using uv add --group dev before running uv run ruff check and uv run ty check.

Frequently Asked Questions about modern-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a Python project from Poetry to uv and ruff?

Migrating from Poetry to uv and ruff involves replacing dependency operations with uv add/remove/sync and substituting flake8/black with ruff check and ruff format. The process includes cleanup steps and migration guardrails to avoid anti-patterns.

What is the best way to set up a new Python project with reproducible dependencies?

The best way to set up reproducible dependencies is using uv for environment management. You initialize with uv init, add runtime dependencies with uv add, and install dev tooling using PEP 735 dependency groups before running commands via uv run.

Can I use ruff to replace black, isort, and flake8 for Python linting and formatting?

Yes, ruff replaces multiple linters and formatters like black, isort, and flake8. You use ruff check for linting and ruff format for formatting, providing unified code quality configuration across multi-file codebases.

Does this Python toolchain migration approach support mypy or do I need a different type checker?

This approach uses ty for type checking instead of mypy. Ty is positioned as a modern, faster alternative to mypy and pyright for type validation and migration in Python 3.11+ projects.

How do you configure pytest coverage thresholds and security scanning in a Python project?

You configure pytest with coverage thresholds to prevent quality regression and add security hardening via pre-commit hooks and CI auditing. This includes dependency vulnerability scanning and automated updates using Dependabot.

When should I use PEP 735 dependency groups instead of standard requirements files?

You use PEP 735 dependency groups when managing grouped dev, test, and docs dependencies with uv. This modern approach replaces standard requirements.txt files, providing reproducible installs without manual venv activation.