typings

Enforce PEP 695 generics and PEP 742 TypeIs predicates in Python 3.14+ codebases.

3|Updated May 12, 2026
One-click install
npx skills add https://github.com/gao-hongnan/omniagents --skill typings
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typings
Source: https://github.com/gao-hongnan/omniagents/tree/main/plugins/python/skills/typings
Command: npx skills add https://github.com/gao-hongnan/omniagents --skill typings

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the degradation of type-safety in large Python codebases, preventing the compounding cost of Any-leaks and ensuring that static analysis tools like mypy and pyright remain effective.

Core Features & Use Cases

  • Modern Syntax Enforcement: Mandates the use of PEP 695 generics and PEP 742 TypeIs predicates for cleaner, more robust code.
  • Boundary Integrity: Provides strict rules for I/O boundaries, ensuring that untyped third-party APIs do not pollute internal logic.
  • Use Case: When refactoring a complex service layer, use this skill to ensure that all new function signatures use ParamSpec for decorators and that all internal data structures are properly defined with TypedDict or Pydantic models.

Quick Start

Apply the typings skill to review the current module for any violations of PEP 695 generic syntax or improper use of Any.

Frequently Asked Questions about typings

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

FAQPage Schema
How do I prevent Any-leaks and enforce strict type-safety in a Python codebase?

To prevent Any-leaks and enforce type-safety, apply strict standards to function signatures, class hierarchies, and I/O boundaries, ensuring untyped third-party APIs do not pollute internal logic.

What is the best way to migrate Python generics to PEP 695 syntax?

Migrating to PEP 695 syntax involves mandating modern generic definitions and utilizing ParamSpec for decorators, which ensures cleaner and more robust type-safety in complex systems.

Does mypy or pyright support PEP 742 TypeIs predicates for static analysis?

Yes, comprehensive integration with static analysis tools like mypy and pyright supports PEP 742 TypeIs predicates to maintain strict type checking and prevent type decay.

How do I define internal data boundaries using TypedDict or Pydantic models?

Defining data boundaries requires strict rules at I/O edges, ensuring all internal data structures are properly modeled using TypedDict or Pydantic to stop untyped external inputs.

When do I need strict typing rules for refactoring a complex service layer?

You need strict typing rules when refactoring a complex service layer to ensure all new function signatures use ParamSpec and internal structures prevent static analysis degradation.

What are the limitations of enforcing Python 3.14+ type-safety standards?

The primary limitation is that enforcing Python 3.14+ type-safety requires modern syntax like PEP 695 generics, restricting compatibility with older Python versions and legacy codebases.