type-checking

Identify and fix Python type errors using pyright or basedpyright.

4|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/gigaverse-app/skillet --skill type-checking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: type-checking
Source: https://github.com/gigaverse-app/skillet/tree/main/python-standards/skills/type-checking
Command: npx skills add https://github.com/gigaverse-app/skillet --skill type-checking

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Type-checking helps catch type errors and enforce consistent typing in Python projects, reducing runtime bugs and enabling safer refactoring.

Core Features & Use Cases

  • Gradual typing adoption in existing codebases with incremental annotations
  • Guidance on resolving common type errors, improving decorator return types, and avoiding unsafe patterns
  • Integration with tests to ensure type safety without altering runtime behavior in production

Quick Start

Run a type checker on your project and iteratively fix errors without modifying runtime behavior.

Frequently Asked Questions about type-checking

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

FAQPage Schema
How do I add Python type checking to an existing codebase gradually?

You can adopt gradual typing by adding incremental annotations to existing Python codebases and running pyright to identify type errors. This approach enforces consistent typing iteratively, catching runtime bugs early without requiring a full project rewrite.

What is the best way to resolve common Python type errors during static typing?

Resolving common Python type errors involves running pyright and following its guidance to fix unsafe patterns and improve decorator return types. Verifying runtime behavior after these changes ensures type safety without altering production logic.

Can I integrate pyright type checking with my CI tests without breaking runtime behavior?

Yes, you can integrate pyright with CI tests to ensure type safety without altering runtime behavior in production. The workflow prescribes running the type checker, verifying runtime test behavior, and avoiding overuse of type: ignore comments to maintain code quality.

Why does mypy or pyright report type errors on valid Python decorator return types?

Static type checkers like pyright or mypy report decorator return type errors when encountering unsafe typing patterns. Resolving these type errors requires improving the decorator annotations and verifying the runtime behavior to align the static typing with actual execution.

When should I avoid using type: ignore comments for Python type checking?

You should avoid overusing type: ignore comments during Python type checking because they suppress type errors without fixing the underlying unsafe patterns. The prescribed workflow emphasizes resolving the root cause of type errors to maintain safer refactoring and consistent typing.