skills/smithery.ai/Entity Design Skill

Entity Design Skill

Installation
SKILL.md
  1. Choose the correct identity type:

    • GuidEntity for client-side generated UUIDs
    • SerialEntity for database auto-increment IDs
    • Entity<T> for custom ID types
  2. Create public constructor with all required fields including:

    • id, createdAt, updatedAt, isActive
    • All domain-specific fields
  3. Add creation factory (e.g., .create()) that:

    • Generates appropriate ID using GuidEntity.newId() or SerialEntity.unsavedId
    • Sets createdAt and updatedAt to current time
    • Sets isActive: true by default
    • Initializes entity in valid state
  4. Protect internal collections:

    • Use private fields with underscore prefix
    • Return List.unmodifiable() from getters
    • Never expose mutable collections directly
Installs
1
First Seen
Apr 1, 2026
Entity Design Skill from smithery.ai