modern-python

Automate Python project setup with uv, ruff, ty, and pytest.

6.5k|561|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/trailofbits/skills --skill modern-python-trailofbits
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modern-python
Source: https://github.com/trailofbits/skills/tree/main/plugins/modern-python/skills/modern-python
Command: npx skills add https://github.com/trailofbits/skills --skill modern-python-trailofbits

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Automates the setup of modern Python tooling for new or migrating projects.

Core Features & Use Cases

  • Unified toolchain setup: sets up uv as the project manager, ruff for linting/formatting, ty for type checking, and pytest for testing.
  • Migration guidance: provides a migration path from legacy tools (pip, Poetry, mypy, black) to a modern, integrated workflow.
  • Project templates and setup: offers templates and best-practice configurations to bootstrap new projects and maintain consistency across teams.

Quick Start

Create a new Python project with uv init, configure pyproject.toml, and install linting, typing, and testing tooling.

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 toolchain with uv and ruff for a new project?

Setting up modern Python tooling involves configuring uv as the project manager, ruff for linting and formatting, ty for type checking, and pytest for testing via a pyproject.toml file. This automates standardizing your development environment.

Can I migrate an existing Python project from Poetry and mypy to uv and ruff?

Yes, you can migrate legacy Python tooling from Poetry and mypy to a modern uv and ruff workflow. The process provides a structured migration path to standardize your linting, formatting, and type checking configurations.

What is the best way to configure Python linting and type checking in pyproject.toml?

Configuring Python linting and type checking in pyproject.toml is best handled by using ruff for linting and formatting alongside ty for type checking. This unified setup standardizes your project configuration without needing separate configuration files.

Does this modern Python workflow integrate with pre-commit workflows?

Yes, the modern Python workflow integrates with pre-commit workflows via prek. This ensures your ruff linting, ty type checking, and pytest testing configurations run automatically before changes are committed to version control.

Do I need uv to manage Python project packaging and testing environments?

Yes, uv is required as the project manager to set up modern Python tooling. It standardizes your development environment and handles packaging alongside ruff, ty, and pytest configurations defined in your pyproject.toml.