Skip to content

Static type checker for Python that adds gradual typing, strict mode, and Protocol support to existing code.

CCM score
47 of 100
skills.sh installs
487
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers type annotation basics through generics, Protocols, Literal types, and callable typing with worked examples
  • Includes installation variants for plain Python, FastAPI (with pydantic), and Django (with django-stubs) projects
  • Enforces stricter checking through the --strict flag and recommends a mypy.ini file for project configuration
  • Designed for teams adding type safety to Python codebases, incrementally or in CI/CD pipelines

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill mypy -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Categories
Python, Code Review & Quality
First seen
Jun 3, 2026

Questions

What does the mypy skill do for Python projects?

The mypy skill brings static type checking to Python through gradual typing with type hints, strict mode, and Protocol support. It covers framework integration with FastAPI, Django, and Pydantic, so mypy can check typed code in those projects before runtime.

How do I install the mypy skill?

Run npx -y skills add bobmatnyc/claude-mpm-skills --skill mypy -y in your project to install the mypy skill. Once installed, the agent can apply mypy type checking guidance to the Python code in that project.

Where does the mypy skill rank in the Python category on Claude Marketplaces?

The mypy skill ranks in the top 100 of the Python category on Claude Marketplaces. Other skills in the category that lead it include python-performance-optimization, python-design-patterns, async-python-patterns, python-code-style and uv-package-manager, while mypy focuses on static type safety.

Who is the mypy skill for?

The mypy skill is for Python developers who want to add type safety to existing or new projects, use type hints in FastAPI or Django code, enforce type checking in CI/CD, or refactor code to add annotations. It starts with gradual typing, so teams can adopt types incrementally.

What does the mypy skill need before it can run?

The mypy skill needs a Python environment with mypy installed, which the skill's quick start covers with pip install mypy. It uses no external tools or API keys, and optional type stubs such as types-requests or django-stubs can be added for specific libraries.

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Mypy

More Python