What problem does it solve?
This Skill helps you design, implement, and review Python code that stays testable, decoupled, and easy to change by avoiding common architecture mistakes like god objects, leaky abstractions, and hardcoded dependencies.
Core Features & Use Cases
- Architecture Guidance: Plan modules, services, class hierarchies, and boundaries using proven principles such as SOLID, separation of concerns, and composition over inheritance.
- Code Review Support: Spot red flags like deep mock chains, Law of Demeter violations, missing type hints, and side effects hidden in constructors.
- Refactoring Direction: Turn mixed-concern code into cleaner designs with dependency injection, repositories, adapters, and focused service layers.
- Practical Python Conventions: Use dataclasses for data objects, Protocols or ABCs for abstractions, and functions for stateless behavior.
- Use Case: If a Python service directly opens databases, reaches through multiple object layers, or becomes impossible to test without real infrastructure, this Skill shows how to restructure it.
Quick Start
Ask the python-architecture-patterns skill to review your Python codebase and recommend a cleaner, more testable architecture for the specific module or pull request you are working on.