mypy

mypy is a skill for Claude Code from bobmatnyc/claude-mpm-skills. It costs 24 tokens per session (7,727 once invoked), scanned A, original, MIT.

A tool that checks Python type hints without running the program. Type hints describe the kinds of values that functions and variables are expected to use.

In plain words
What is it for?
It helps gradually add type checking to Python projects, including FastAPI and Django applications, with stricter checks when needed.
Why use it?
It finds many type-related mistakes early and can improve code documentation and editor assistance.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

not rated 74repo 1mo ago A scan Socket: passSnyk: passSkillSpector: pass 24 tokens original MIT

Good fit It helps gradually add type checking to Python projects, including FastAPI and Django applications, with stricter checks when needed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bobmatnyc/claude-mpm-skills/mypy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bobmatnyc/claude-mpm-skills --skill mypy
Clone the repo
git clone --depth 1 https://github.com/bobmatnyc/claude-mpm-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mypy

README.md
[![agentmods](https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/mypy/github.svg)](https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/mypy)
Your own site
<a href="https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/mypy"><img src="https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/mypy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mypy

Your own site · 80×15
<a href="https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/mypy"><img src="https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/mypy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,727 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 17 Apr 2026
  • Snyk pass 17 Apr 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
SkillSpector: 1 finding, up to low

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • low Excessive Agency · line 510
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.07727
Opus 5 $0.00012 $0.03864
Sonnet 5 $0.00005 $0.01545
Haiku 4.5 $0.00002 $0.00773

Measured 8d ago against content hash 78defdc92088, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

mypy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

toolchains/python/tooling/mypy/SKILL.md · 1,298 lines

How it starts

The opening of the file, as written. The whole thing — 1,298 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

# Basic types
name: str = "Alice"
age: int = 30
height: float = 5.9
is_active: bool = True

# Type inference (mypy infers types)
count = 10  # mypy infers: int
message = "Hello"  # mypy infers: str

# Multiple types with Union
from typing import Union

user_id: Union[int, str] = 123  # Can be int OR str
result: Union[int, None] = None  # Nullable int

# Optional (shorthand for Union[T, None])
from typing import Optional

user_email: Optional[str] = None  # Can be str or None

2. Function Type Hints

# Basic function typing
def greet(name: str) -> str:
    return f"Hello, {name}"

# Multiple parameters
def add(a: int, b: int) -> int:
    return a + b

# Optional parameters with defaults
def create_user(name: str, age: int = 18) -> dict:
    return {"name": name, "age": age}

# No return value
def log_message(message: str) -> None:
    print(message)

# Functions that never return
from typing import NoReturn

def raise_error() -> NoReturn:
    raise ValueError("Always raises")

Read the full file on GitHub · 1,298 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 1,298 lines · 24 tokens per session scan A 78defdc92088

Subscribe to this mod's changes

mypy is a skill published in the GitHub repository bobmatnyc/claude-mpm-skills (74 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 7,727 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

mypy

Skill "mypy" from bobmatnyc/claude-mpm, covering mypy - static type checking for python, basic mypy, with common type stubs, for fastapi projects and for django projects.

bobmatnyc/claude-mpm · 24 tokens

pytest

Skill "pytest" from bobmatnyc/claude-mpm, covering pytest - professional python testing, basic pytest, with common plugins, for fastapi testing and for django testing.

bobmatnyc/claude-mpm · 28 tokens

kolo

Kolo is a text-based Python debugger that captures every executed function, return value, local variable, HTTP request, and SQL query into greppable trace files. Use this skill for tricky debugging challenges, to verify that code behaves as expected at runtime, and to see the real data and values passing through the…

koloai/kolo · 119 tokens

py-clean-arch

Use this skill when the user asks about Clean Architecture in Python — not generic theory, but the specific layer conventions (l1entities, l2usecases, l3interfaceadapters, l4frameworksanddrivers), folder patterns, boundary interfaces, and .importlinter.ini contracts from CJHwong/py-clean-architecture-examples. Fetches…

CJHwong/py-clean-architecture-examples · 113 tokens

python-code-quality

Code quality checks, linting, formatting, and type checking commands for the Agent Framework Python codebase. Use this when running checks, fixing lint errors, or troubleshooting CI failures.

microsoft/agent-framework · 40 tokens

plugin-architecture-patterns

Design, implement, or diagnose Xberg plugin traits, typed registries, priority collisions, lifecycle, native extractors, and Alef-generated Python plugin bridges. Load for plugin-system work, not ordinary extractor parsing.

xberg-io/xberg · 49 tokens