What problem does it solve? Python codebases often grow into tangled God classes, monolithic functions, and tightly coupled layers that are hard to test and modify. This Skill provides concrete design patterns and refactoring guidance to keep code simple, modular, and testable. ## Core Features & Use Cases - Fundamental Patterns: Apply KISS, Single Responsibility, Separation of Concerns, and composition over inheritance with before-and-after code examples. - Structural Guidance: Organize code into API, service, and repository layers with correct dependency direction, plus constructor-based dependency injection for testability. - Refactoring Heuristics: Use the Rule of Three, function size guidelines, and anti-pattern detection (leaking ORM types, mixing I/O with business logic) when reviewing or restructuring code. - Use Case: When a pull request introduces a handler that parses HTTP, validates input, queries the database, and formats the response all in one class, use this Skill to split it into handler, service, and repository layers with injected dependencies. ## Quick Start Review my UserHandler class using the python-design-patterns skill and refactor it into separate handler, service, and repository layers.