01
언제 사용하는가
KISS, 관심사 분리, 단일 책임 원칙 및 구성 대 상속 등 Python 디자인 패턴을 포함합니다.
이 기술은 새로운 서비스 또는 컴포넌트를 처음부터 설계하고 책임을 어떻게 층화할지 결정해야 할 때 사용하며, God 클래스나 너무 큰 단일 함수로 성장한 코드를 리팩토링할 때, 새 추상화를 추가하거나 중복을 감수하는지 결정해야 할 때, 결합도가 높거나 내부 타입이 누출된 구조적 문제를 평가할 때 pull request를 검토할 때, 새로운 클래스 계층구조에서 상속과 구성 사이의 선택을 해야 할 때, 또는 I/O와 비즈니스 로직이 얽혀 테스트하기 어려워진 코드베이스에 사용합니다.
02
따라 하는 방법
- Python design patterns including KISS, Separation of Concerns, Single Responsibility, and composition over inheritance. Use this skill when designing a new service or component from scratch and choosing how to layer responsibilities, when refactoring a God class or monolithic function that has grown too large, when deciding whether to add a new abstraction or live with duplication, when evaluating a pull request for structural issues like tight coupling or leaking internal types, when choosing between inheritance and composition for a new class hierarchy, or when a codebase is becoming hard to test because of entangled I/O and business logic.을 실행합니다.
03
설치 방법
npx skills add installs: 17188 --skill python-design-patterns