type-safety-enforcer

Enforce strict type safety and documentation standards in Python projects with mypy and linters.

3|Updated Nov 4, 2022
One-click install
npx skills add https://github.com/dousu/maou --skill type-safety-enforcer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-safety-enforcer
Source: https://github.com/dousu/maou/tree/main/.claude/skills/type-safety-enforcer
Command: npx skills add https://github.com/dousu/maou --skill type-safety-enforcer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the critical need for robust, maintainable, and error-free code by enforcing strict type safety and documentation standards, preventing bugs before they reach production.

Core Features & Use Cases

  • Comprehensive Type Checking: Utilizes mypy with strict configurations to detect type inconsistencies, missing annotations, and potential runtime errors.
  • Documentation Enforcement: Verifies that all public APIs have necessary docstrings, ensuring code clarity and discoverability.
  • Code Quality Standards: Enforces line length limits and checks for other code quality issues.
  • Use Case: Before merging a new feature, run this Skill to guarantee that all new code adheres to the project's strict type hinting and docstring policies, preventing regressions and improving overall code health.

Quick Start

Run a full type check on the entire codebase to identify any type safety issues.

Frequently Asked Questions about type-safety-enforcer

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

FAQPage Schema
How do I enforce strict type checking in a Python project using mypy?

You enforce strict type checking by running mypy with strict configurations to detect type inconsistencies, missing annotations, and potential runtime errors across your Python codebase. This prevents type-related bugs before they reach production.

What is the best way to ensure all Python functions have docstrings and type annotations?

The best way to ensure docstrings and type annotations is to use an automated enforcement tool that checks for missing docstrings on public APIs and verifies type annotations on all functions, methods, and class attributes.

Does mypy strict mode check class attributes and methods for missing type hints?

Yes, mypy strict mode checks class attributes and methods for missing type hints. It enforces project-wide requirements for type annotations on all functions, methods, and class attributes to ensure comprehensive type safety.

Can I check code quality and line length limits alongside type safety in Python?

Yes, you can check code quality and line length limits alongside type safety. This Skill enforces code quality standards, including line length limits, while simultaneously running mypy to catch type inconsistencies and style violations.

When do I need to run type safety and documentation checks on my Python codebase?

You need to run type safety and documentation checks before merging a new feature to guarantee all new code adheres to strict type hinting and docstring policies. This prevents regressions and improves overall code health.