type-hints-guide - Python Type Hints Guide
Guide Python type annotations using typing module features
Tags
Updated: 2026-03-24Capabilities
Typical Inputs
Typical Outputs
What this skill does
- write type annotations
- explain typing concepts
- suggest type improvements
- refactor code with types
- define generic classes
- create protocols
- add TypeVar
- implement ParamSpec decorators
- use Literal types
- define TypeAlias
- add overload signatures
- type dataclass fields
- narrow types with TypeGuard
- add @runtime_checkable
- provide error codes
Inputs
- Python code without types
- Python code snippet
- typing question
- mypy error message
- pyright error message
- generic class definition
- protocol definition
- function signature
Outputs
- type-annotated code
- type annotation suggestions
- code improvement recommendations
Requirements
- Python 3.10+
- type checker (mypy or pyright)
- typing module
