modern-python

Configure uv-based Python 3.11+ projects with pyproject.toml for ruff, ty, pytest, and prek.

1|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/adamatdevops/forge-works --skill modern-python-adamatdevops
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modern-python
Source: https://github.com/adamatdevops/forge-works/tree/main/.skills/trailofbits/modern-python
Command: npx skills add https://github.com/adamatdevops/forge-works --skill modern-python-adamatdevops

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Modern Python projects often become slow and inconsistent when dependency management, linting, testing, and type checking are handled with a patchwork of older tools and manual steps, which wastes time and increases regressions.

Core Features & Use Cases

  • Modern dependency management with uv: Use uv for adding/removing dependencies and syncing environments without manual virtualenv management.
  • Consistent project configuration via pyproject.toml: Standardize tooling configuration for ruff (lint+format), ty (type checking), pytest (testing + coverage), and prek (fast pre-commit).
  • Migration guidance from legacy stacks: Convert requirements.txt/flake8/black/mypy/Poetry workflows into a unified modern approach, reducing churn while improving safety and maintainability.
  • Use Case: You are starting a new Python 3.11+ codebase and want one consistent setup for deps, formatting, linting, tests with coverage, type checks, pre-commit hooks, and basic security scanning.

Quick Start

Create a new project with uv, add runtime and dev dependencies, and then run the tooling through uv run.

Frequently Asked Questions about modern-python

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

FAQPage Schema
How do I set up a modern Python project with uv and pyproject.toml?▼

Modern Python tooling consolidates dependency management and code-quality workflows into a single pyproject.toml file using uv, ruff, ty, pytest, and prek. This approach eliminates manual venv activation and fragmented configurations.

How do I migrate from requirements.txt, Poetry, or flake8/black to a uv-based workflow?▼

Migrate from legacy stacks like requirements.txt, Poetry, flake8, and black by converting to a unified uv-based workflow. This process specifies safe transformation steps and configuration patterns to reduce churn while improving maintainability.

Does modern Python tooling support replacing separate black and mypy configurations?▼

Yes, modern Python tooling replaces black and mypy by consolidating formatting and linting into ruff, and type checking into ty, all configured within a single pyproject.toml file to ensure consistency.

What is the best way to configure pre-commit hooks for a Python 3.11+ codebase?▼

The best way to configure pre-commit hooks for Python 3.11+ is using prek for fast execution. Define hook configurations directly in pyproject.toml alongside ruff, ty, and pytest settings for a unified workflow.

Why should I use uv for dependency management instead of manual virtualenv activation?▼

You should use uv for dependency management to avoid manual virtualenv activation and direct dependency editing. It handles adding, removing, and syncing environments automatically, creating a reproducible setup.

Can I run pytest with coverage and type checking in a single uv run command?▼

Yes, you can run pytest with coverage and ty type checking through uv run. Standardizing tooling in pyproject.toml allows uv to execute testing and type checking commands without manual environment activation.