types

Adds inferred type hints to untyped Python code and validates them with mypy.

4|2|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/Arete-Consortium/ai-skills --skill types-arete-consortium
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: types
Source: https://github.com/Arete-Consortium/ai-skills/tree/main/personas/engineering/types
Command: npx skills add https://github.com/Arete-Consortium/ai-skills --skill types-arete-consortium

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mypy.

What problem does it solve? Untyped Python codebases lack static type safety, making refactoring risky and IDE autocomplete unreliable. This Skill analyzes untyped Python files, infers types from defaults, usage, and docstrings, and adds annotations automatically. ## Core Features & Use Cases - Type Inference: Infers parameter and return types from default values, usage patterns, and docstrings. - Modern Syntax: Prefers list[str] over List[str] and str | None over Optional[str], adding only necessary typing imports. - Coverage Reporting: Reports before/after type coverage and flags code that cannot be inferred, with optional --check and --strict modes. - Use Case: Point it at a legacy module to annotate all functions and class attributes, then verify the additions with mypy. ## Quick Start Ask Claude to add type hints to a specific Python file or module, for example by running /types on path/to/file.py.

Frequently Asked Questions about types

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add type hints to an existing Python file?▼

Run /types with the file path, such as /types path/to/file.py, to annotate a single file, or pass a module directory to process all files. The skill parses the AST, infers types, adds annotations and imports, then validates with mypy.

How can I check Python type coverage without changing code?▼

Use the --check flag, which reports current type coverage without modifying any files. This is useful for auditing a codebase before committing to a full annotation pass.

Does it use modern Python typing syntax like list[str]?▼

Yes, it prefers modern syntax such as list[str] over List[str] and str | None over Optional[str]. The union pipe syntax requires Python 3.10 or later.

What happens when a type cannot be inferred?▼

Parameters or values with insufficient context, such as runtime-dependent results, are listed in an 'Unable to Infer' section of the report. In strict mode Any is avoided, so ambiguous cases are flagged rather than guessed.

How are the added type hints verified?▼

After annotations are added, the skill runs mypy to validate that the inferred types are correct. The output report summarizes functions, classes, and variables typed along with the resulting coverage percentage.