What problem does it solve? Domain bugs often come from illegal states that the type system was never told to forbid, leaving rules enforced only by runtime checks and tests. This Skill applies Scott Wlaschin's functional DDD approach to push domain constraints into types so the compiler rejects invalid states, exception-based failures, and impure domain logic. ## Core Features & Use Cases - Type-driven domain modeling: Wrap primitives in single-case types, model aggregates as sum types (choice-of-states), and make illegal states unrepresentable in F#, C#, Scala, Kotlin, or TypeScript. - Workflows as type signatures: Design workflows as Command → AsyncResult<Events, DomainError>, with errors-as-values on a three-track railroad (domain errors, infrastructure errors, panics) and total functions throughout. - Functional core, imperative shell: Structure application services as impureim/Recawr sandwiches using dependency rejection, parameterization, and DTO-to-domain translation at bounded-context edges. - Use Case: When reviewing an Order record with eight optional fields and sibling-exclusive bools, use this Skill to remodel it as a discriminated union of states (Unvalidated, Validated, Priced, Paid) so invalid combinations cannot compile. ## Quick Start Ask Claude to review your domain model or aggregate against the Domain Modeling Made Functional checklist and refactor exception-based code to errors-as-values.