본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)48k · #4348

ddd-tactical-patterns

하는 일

이 도구는 'DDD 전술 패턴'이라는 설계 원칙에 따라 프로그램 코드를 정리하도록 돕습니다. 특히 비즈니스 규칙이 복잡할 때 핵심 부분을 구성해 이해하고 유지보수하기 쉽게 만드는 데 집중합니다.

사용하는 경우

  • ✓비즈니스 규칙을 코드로 옮겨야 할 때.
  • ✓프로그램의 여러 부분을 어떻게 묶을지 정할 때.
  • ✓헷갈리거나 논리가 불명확한 코드를 개선할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ddd-tactical-patterns/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ddd-tactical-patterns/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 비즈니스 규칙을 코드로 바꿔 주세요: [규칙 입력]”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 도구는 코드를 '엔티티'와 '값 객체'라는 블록으로 나누고, 중요한 규칙(불변식)이 항상 지켜지도록 합니다. 또한 이 블록들이 어떻게 소통하고 중요한 변경을 어떻게 기록할지도 정의하도록 돕습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

DDD Tactical Patterns

Use this skill when

  • Translating domain rules into code structures.
  • Designing aggregate boundaries and invariants.
  • Refactoring an anemic model into behavior-rich domain objects.
  • Defining repository contracts and domain event boundaries.

Do not use this skill when

  • You are still defining strategic boundaries.
  • The task is only API documentation or UI layout.
  • Full DDD complexity is not justified.

Instructions

  1. Identify invariants first and design aggregates around them.
  2. Model immutable value objects for validated concepts.
  3. Keep domain behavior in domain objects, not controllers.
  4. Emit domain events for meaningful state transitions.
  5. Keep repositories at aggregate root boundaries.

If detailed checklists are needed, open references/tactical-checklist.md.

Example

class Order {
  private status: "draft" | "submitted" = "draft";

  submit(itemsCount: number): void {
    if (itemsCount === 0) throw new Error("Order cannot be submitted empty");
    if (this.status !== "draft") throw new Error("Order already submitted");
    this.status = "submitted";
  }
}

Limitations

  • This skill does not define deployment architecture.
  • It does not choose databases or transport protocols.
  • It should be paired with testing patterns for invariant coverage.
자주 묻는 질문

'불변식'이란 무엇인가요?

프로그램의 한 부분에서 항상 참이어야 하는 비즈니스 규칙입니다. 예를 들어 은행 계좌의 잔액은 절대 음수가 될 수 없습니다.

'엔티티'와 '값 객체'란 무엇인가요?

엔티티는 시간이 지나며 변하지만 고유한 정체성을 가진 것입니다(예: '사용자'). 값 객체는 고유한 정체성 없이 속성으로 정의되는 것입니다(예: '주소').

'애그리게이트'란 무엇인가요?

함께 작동하며 하나의 단위로 취급되는 엔티티와 값 객체의 묶음입니다. 비즈니스 규칙의 일관성을 유지하는 데 도움을 줍니다.

상세 정보

작성자의 원본 설명

Apply DDD tactical patterns in code using entities, value objects, aggregates, repositories, and domain events with explicit invariants.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4348
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬