What problem does it solve?
Provide clear, opinionated guidance to make Python code more readable, robust, and maintainable by enforcing idioms, type hints, and proven error-handling and design patterns.
Core Features & Use Cases
- Readable, Consistent Style: Advice on PEP 8 conventions, import ordering, and formatting to improve team consistency.
- Type Hints & Safety: Recommendations for modern type annotations, Protocol-based typing, and integration with mypy to catch issues early.
- Practical Patterns: Examples for EAFP, context managers, dataclasses, generators, concurrency choices, and decorator usage to solve common problems.
- Use Case: Use during code reviews to suggest idiomatic refactors, when designing package layout for a new project, or to standardize error handling across modules.
Quick Start
Use the python-patterns skill to review a Python module and produce concrete suggestions to make it PEP 8 compliant, add type hints, and apply idiomatic patterns.