python-type-hints

Convert legacy Python type annotations to PEP 635-compliant syntax.

1|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/wolph/python-type-skills --skill python-type-hints-wolph
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-type-hints
Source: https://github.com/wolph/python-type-skills/tree/main/python-type-hints
Command: npx skills add https://github.com/wolph/python-type-skills --skill python-type-hints-wolph

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps developers upgrade and enforce comprehensive type annotations in Python projects, improving code safety and maintainability.

Core Features & Use Cases

  • Code Modernization: Converts legacy typing syntax to Python 3.12+ standards for cleaner code.
  • Annotation Completion: Adds missing type hints for functions, variables, and attributes to eliminate implicit Any.
  • Design Optimization: Replaces type aliases, TypeVar, and union syntax for precise static analysis.
  • Use Case: A team migrating a large codebase can use this Skill to automate the conversion process, enabling stricter type checking with minimal manual effort.

Quick Start

Use the python-type-hints skill to analyze and update your existing Python source files to adopt modern type syntax.

Frequently Asked Questions about python-type-hints

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

FAQPage Schema
How do I convert legacy Python type annotations to modern syntax?

To convert legacy Python type annotations, the skill analyzes source code and refactors outdated typing imports into PEP 635-compliant syntax for cleaner, modern codebases.

What is the best way to add missing type hints across a large Python codebase?

Adding missing type hints across a large Python codebase is automated by analyzing source files to identify and complete annotations for functions, variables, and attributes, eliminating implicit Any.

Do I need mypy and pyright to enforce strict typing standards?

Yes, comprehensive analysis and transformation for strict typing standards require mypy, pyright, and AST parsing libraries to accurately identify and refactor missing annotations.

Can I replace TypeVar and type aliases for Python 3.12 static analysis?

Yes, design optimization replaces outdated TypeVar, type aliases, and union syntax with modern standards to achieve precise static analysis and improved code safety.

Why does my Python code modernization fail to eliminate implicit Any types?

Code modernization fails to eliminate implicit Any types when legacy syntax patterns and missing annotations are not fully refactored, requiring AST parsing to identify and complete variable attributes.