modern-python

Configures Python projects with uv, ruff, and ty tooling.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/marumo333/atrox --skill modern-python-marumo333
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modern-python
Source: https://github.com/marumo333/atrox/tree/main/.claude/skills/trailofbits/plugins/modern-python/skills/modern-python
Command: npx skills add https://github.com/marumo333/atrox --skill modern-python-marumo333

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Python projects often rely on fragmented legacy tooling like pip, virtualenv, black, flake8, and mypy, leading to slow workflows and inconsistent configuration. This Skill standardizes project setup and migration around the modern Astral toolchain. ## Core Features & Use Cases - Project Bootstrapping: Create new packages or applications with uv, src/ layout, pyproject.toml, dependency groups, and Makefile targets. - Tool Migration: Migrate existing projects from requirements.txt, setup.py, Poetry, flake8/black/isort, and mypy/pyright to uv, ruff, and ty. - Standalone Scripts: Write single-file scripts with PEP 723 inline metadata so dependencies install automatically at run time. - Use Case: When asked to start a new Python CLI tool, the Skill scaffolds the project with uv init --package, adds typer and rich via uv add, configures ruff and ty, and sets up pytest with 80% coverage enforcement. ## Quick Start Ask the AI to set up a new Python project using modern tooling with uv, ruff, and ty.

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 new Python project with uv?▼

Run uv init --package myproject to create a distributable package with src/ layout, then use uv add for dependencies and uv add --group dev for tools like ruff, ty, and pytest. Install everything with uv sync --all-groups and run commands via uv run.

How to migrate a Python project from pip and requirements.txt to uv?▼

Run uv init --bare in the existing project, then add each dependency with uv add or loop over requirements.txt entries. Delete requirements.txt and old virtual environments, commit uv.lock, and use uv sync and uv run for all subsequent work.

What is the difference between ruff and black or flake8?▼

Ruff is a Rust-based linter and formatter that replaces flake8, black, isort, pyupgrade, and pydocstyle in one tool. Configure it in pyproject.toml with select = ["ALL"] and explicit ignores, then run uv run ruff check and ruff format.

Can I run a Python script with dependencies without a project?▼

Yes, use PEP 723 inline metadata to embed dependencies directly in the script's comment block, then run it with uv run script.py. uv installs the declared dependencies automatically without a pyproject.toml or virtualenv setup.

Should I use ty or mypy for Python type checking?▼

ty is the recommended type checker from Astral, offering significantly faster checking than mypy or pyright. Add it with uv add --group dev ty, configure [tool.ty.environment] python-version in pyproject.toml, and run uv run ty check src/.

When should I not use uv and the modern Python toolchain?▼

Avoid it when the user explicitly wants to keep legacy tooling, when Python versions below 3.11 are required, or in non-Python codebases. These tools target modern Python and assume uv-based dependency management.