0159-python-type-safety
CommunityCatch Python type errors before runtime.
AuthorMrJmpl3
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It helps you prevent bugs caused by incorrect values, mismatched interfaces, and missing null/union handling by enforcing Python type checking during static analysis.
Core Features & Use Cases
- Type-safe public APIs: Annotate function signatures, methods, and class interfaces so tools can validate correct usage.
- Generics, Protocols, and type narrowing: Preserve type information across reusable components using
Generic, define structural interfaces withProtocol, and narrowT | Nonesafely with guards. - Strict type checking configuration: Use
mypy --strictor Pyright with strict rules to surface issues early in CI rather than at runtime. - Use Case: When building an internal library or service layer, define repository interfaces and response types so consumers cannot accidentally call methods with the wrong entity type or forget to handle missing results.
Quick Start
Configure your project to run strict mypy or pyright and add type annotations to your public functions, then validate that nullable return types like User | None are handled explicitly.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: 0159-python-type-safety Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0159-python-type-safety Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.