value-object

Installation
SKILL.md

Value Object Skill

Generates or refactors immutable TypeScript value objects — domain primitives that encapsulate validation, normalization, and conversion logic.

Note: This skill focuses on patterns for creating value objects and does not require specific npm packages. However, if you're integrating with @efesto-cloud packages, install @efesto-cloud/entity for the mapper interfaces:

  • IValueObjectMapper<VO, Raw> — use this for value object mappers (preferred)
  • IEntityMapper<Entity, Doc> — use this for entity mappers (handled by the persistence skill)

Decision: what to generate

Request Output
Single primitive (email, UUID, phone, color…) Interface + scalar wrapper class
Composite (address, money, date range…) Interface + composite class accepting IFoo raw shape
Mentions persistence or transport layer Also generate mapper/FooMapper.ts
Improving/retrofitting existing code Add missing factory + toRaw/toJSON without renaming

File layout

Related skills
Installs
3
First Seen
14 days ago