Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Python Typing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ansh44233-python-typing)
---
description: Add precise Python type hints checked by mypy or pyright, with typed boundaries and minimal Any
profile: standard
languages: python
tags: python, typing, mypy, pyright
---
# Python typing
Types pay off most at boundaries: public functions, I/O, and data models.
## Practice
- Annotate public functions and class attributes; let locals be inferred.
- Model data with dataclasses, pydantic or `TypedDict`, not raw dicts.
- Use `Protocol` for duck typing, `Literal` and enums for fixed values, `TypeVar`/generics for containers.
## Strictness
- Enable strict mode incrementally per package; ban new `Any` and `# type: ignore` without a reason code.
- Install stub packages (`types-requests`) instead of ignoring imports.
## Verify
`mypy --strict` (or `pyright`) passes on the changed modules with no new ignores.