A static type checker that catches bugs before runtime by analyzing Python type hints. You'd use this when adding type safety to existing code, building FastAPI or Django apps where types matter, or enforcing stricter guarantees in CI/CD pipelines. The skill covers gradual typing (so you can add hints incrementally), Protocol support for structural typing, and the strict mode flag for maximum safety. The examples span basics like annotating functions and collections through advanced patterns like generics and TypeVar. Honest take: mypy has a learning curve with complex types, but it pays off by turning entire classes of runtime errors into build-time failures. Works well with modern Python frameworks that already lean on type hints.
- skills.sh installs
- 478
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill mypy --agent claude-codeInstalls into .claude/skills of the current project.
Files
mypy - Static Type Checking for Python
Overview
mypy is the standard static type checker for Python, enabling gradual typing with type hints (PEP 484) and comprehensive type safety. It catches type errors before runtime, improves code documentation, and enhances IDE support while maintaining Python's dynamic nature through incremental adoption.
Key Features:
- Gradual typing: Add types incrementally to existing code
- Strict mode: Maximum type safety with --strict flag
- Type inference: Automatically infer types from context
- Protocol support: Structural typing (duck typing with types)
- Generic types: TypeVar, Generic, and advanced type patterns
- Framework integration: FastAPI, Django, Pydantic compatibility
- Plugin system: Extend type checking for libraries
- Incremental checking: Fast type checking on large codebases
Installation:
# Basic mypy
pip install mypy
# With common type stubs
pip install mypy types-requests types-PyYAML types-redis
# For FastAPI projects
pip install mypy pydantic
# For Django projects
pip install mypy django-stubs
# Development setup
pip install mypy pre-commit
Type Annotation Basics
1. Variable Type Hints
Sponsors
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Category
- Python
- First seen
- Jun 3, 2026
More from bobmatnyc/claude-mpm-skills
All 158- Threat Modeling474
- Wordpress Block Editor Fse474
- Celery470
- Web Performance Optimization469
- Local Llm Ops464
- Golang Testing Strategies458
- Wordpress Advanced Architecture455
- Golang Http Frameworks453
- Sveltekit452
- Digitalocean Management451
- Hono Rpc450
- Flask449
- Hono Middleware444
- Golang Cli Cobra Viper438
- Dependency Audit434
- Wordpress Plugin Fundamentals434
- Phoenix Liveview432
- Wordpress Testing Qa430
- Digitalocean Compute429
- Database Migration427
- Hono Testing422
- Golang Observability Opentelemetry421
- Shadcn Ui421
- Golang Concurrency Patterns420
