modern-python

Enforce Python 3.14+ idioms and typing patterns in code reviews.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/AymanKastali/pydentity --skill modern-python-aymankastali
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modern-python
Source: https://github.com/AymanKastali/pydentity/tree/main/.claude/skills/modern-python
Command: npx skills add https://github.com/AymanKastali/pydentity --skill modern-python-aymankastali

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Write and review Python code that adheres to modern 3.14+ idioms, eliminating legacy patterns and guiding teams through phased gates before implementation is considered complete.

Core Features & Use Cases

  • Enforces up-to-date typing, generics, and data modeling practices consistent with Python 3.14+.
  • Guides code reviews and generation with a repeatable modernization checklist to reduce technical debt.
  • Useful for teams migrating from older Python versions to 3.14+ in large codebases or new projects requiring modern idioms.

Quick Start

Run the modernization gates on a Python codebase to ensure every change passes type-system, data-modeling, and idiom checks.

Frequently Asked Questions about modern-python

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

FAQPage Schema
How do I enforce modern Python 3.14+ idioms in my codebase?▼

Enforce modern Python 3.14+ idioms by running modernization gates that eliminate legacy patterns, ensuring zero Union/Optional usage, built-in generics, PEP 695 type parameters, and @override decorators on overrides.

What Python typing patterns should I replace when migrating to 3.14?▼

When migrating to Python 3.14, replace legacy typing patterns by removing from __future__ annotations, eliminating Union/Optional usage, adopting built-in generics, and defining type aliases with the type statement.

How do I use PEP 695 type parameters and the type statement in Python?▼

Use PEP 695 type parameters and the type statement to define modern Python 3.14+ type aliases and generics natively, eliminating the need for legacy Optional and Union imports in your data modeling workflows.

Can I use this modernization checklist for large codebase migrations?▼

Yes, you can use this modernization checklist for large codebase migrations to guide teams through phased gates, reducing technical debt when upgrading from older Python versions to 3.14+ idioms.

Does refactoring to Python 3.14+ idioms require removing from __future__ annotations?▼

Yes, refactoring to Python 3.14+ idioms requires removing from __future__ annotations, as the gate requirements mandate their removal alongside enforcing built-in generics and PEP 695 type parameters.

What is the best way to review Python code for legacy typing patterns?▼

The best way to review Python code for legacy typing patterns is applying a repeatable modernization checklist that flags missing @override decorators and outdated Union/Optional usage during development.