·composition-over-inheritance
</>

composition-over-inheritance

yanko-belov/code-craft

클래스 상속을 사용하고 싶을 때 사용하세요. 클래스 계층을 생성할 때 사용합니다. 하위 클래스에 일부 상위 동작만 필요할 때 사용합니다.

18설치·0트렌드·@yanko-belov

설치

$npx skills add https://github.com/yanko-belov/code-craft --skill composition-over-inheritance

SKILL.md

Inheritance creates tight coupling and rigid hierarchies. Composition creates flexible, reusable components that can be mixed and matched.

Default to composition. Use inheritance only for true type hierarchies.

| Diamond problem | Duck needs Flying AND Swimming | | Tight coupling | Child knows parent internals | | Rigid hierarchy | Can't change parent without breaking children | | Forced inheritance | Gets methods it doesn't need | | Fragile base class | Parent changes break all children |

클래스 상속을 사용하고 싶을 때 사용하세요. 클래스 계층을 생성할 때 사용합니다. 하위 클래스에 일부 상위 동작만 필요할 때 사용합니다. 출처: yanko-belov/code-craft.

원본 보기

인용 가능한 정보

AI/검색 인용용 안정적인 필드와 명령어.

설치 명령어
npx skills add https://github.com/yanko-belov/code-craft --skill composition-over-inheritance
카테고리
</>개발 도구
인증됨
최초 등록
2026-02-01
업데이트
2026-02-18

빠른 답변

composition-over-inheritance이란?

클래스 상속을 사용하고 싶을 때 사용하세요. 클래스 계층을 생성할 때 사용합니다. 하위 클래스에 일부 상위 동작만 필요할 때 사용합니다. 출처: yanko-belov/code-craft.

composition-over-inheritance 설치 방법은?

터미널 또는 명령줄 도구(Terminal, iTerm, Windows Terminal 등)를 엽니다 이 명령어를 복사하여 실행합니다: npx skills add https://github.com/yanko-belov/code-craft --skill composition-over-inheritance 설치 후 스킬은 자동으로 AI 코딩 환경에 설정되어 Claude Code나 Cursor에서 사용할 수 있습니다

소스 저장소는 어디인가요?

https://github.com/yanko-belov/code-craft