domain-modeling

Identify context boundaries and construct domain models with types, aggregates, and validation rules.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/RyoMa99/dotfiles --skill domain-modeling-ryoma99
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-modeling
Source: https://github.com/RyoMa99/dotfiles/tree/main/dot_claude/skills/domain-modeling
Command: npx skills add https://github.com/RyoMa99/dotfiles --skill domain-modeling-ryoma99

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams detect when domain concepts are ambiguous, overloaded, or growing brittle, and provides systematic guidance to decompose, type, and validate those concepts so design and implementation remain maintainable and correct.

Core Features & Use Cases

  • Context boundary discovery: techniques to enumerate actors, clarify actor goals, and split concepts when the same term has different meanings across actors.
  • Reconstruction & refactor tactics: signatures for spotting fat models, flag-driven state, and stamp-coupling and steps to split types into discriminated unions and value objects.
  • Aggregate and service guidance: heuristics for aggregate boundaries, lock-competition tests, modifiedEntities pattern, and recommendations for domain service purity (DDD Trilemma).
  • Use case: apply when adding a new feature that blurs actor responsibilities, when boolean flags proliferate, or when spec tables show combinatorial complexity.

Quick Start

Use the domain-modeling skill to analyze a feature spec, identify context boundaries, and propose domain types, aggregates, and validation rules.

Frequently Asked Questions about domain-modeling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor domain models when boolean flags are proliferating?

Refactor domain models by splitting fat types and flag-driven state into discriminated unions and value objects. This skill identifies stamp-coupling and reconstructs types to ensure your domain model remains maintainable and correct as complexity grows.

When do I need to split bounded contexts for ambiguous business terms?

Split bounded contexts when the same domain term has actor-dependent meanings across different users. This skill enumerates actors, clarifies actor goals, and establishes context boundaries to prevent concept overload and maintain clear domain models.

What is the best way to define aggregate boundaries and avoid lock competition?

Define aggregate boundaries using heuristics and lock-competition tests provided by this skill. It recommends aggregate structures, applies the modifiedEntities pattern, and classifies domain service purity to resolve the DDD Trilemma effectively.

How do I simplify specification tables that contain combinatorial cross-cutting rules?

Simplify complex specification tables by applying domain modeling techniques to decompose cross-cutting rules. This skill analyzes feature specs, identifies combinatorial complexity, and proposes always-valid types and discriminated unions to reduce rule intersections.

Does domain modeling work for refactoring existing features or only new feature design?

Domain modeling works for both new feature design and refactoring existing systems. Apply it when actor responsibilities blur, boolean flags accumulate, or spec tables show combinatorial complexity to reconstruct and validate your current domain types.

Why should I use always-valid types and the Outbox pattern in domain-driven design?

Use always-valid types and the Outbox pattern to maintain domain model correctness and reliable state transitions. This skill provides practical patterns including modifiedEntities and Outbox guidance to ensure your aggregates and domain services remain structurally sound.