Marketplace

data-modeler

Creates entity model documents with Mermeaid.js ER diagrams and attribute tables.

$ 安裝

git clone https://github.com/martinellich/aiup-marketplace /tmp/aiup-marketplace && cp -r /tmp/aiup-marketplace/aiup-vaadin-jooq/skills/data-modeler ~/.claude/skills/aiup-marketplace

// tip: Run this command in your terminal to install the skill


name: data-modeler description: Creates entity model documents with Mermeaid.js ER diagrams and attribute tables.

Data Modeler

Instructions

Create an entity model document with ER diagram and attribute tables.

DO NOT

  • Add attributes/columns to the Mermaid diagram
  • Write prose descriptions like "Key attributes: name, email..."
  • Create a "Relationships" table
  • Skip the attribute tables

Document Structure

# Entity Model

## Entity Relationship Diagram

```mermaid
erDiagram
    ROOM_TYPE ||--o{ ROOM : "categorizes"
    GUEST ||--o{ RESERVATION : "makes"

ENTITY_NAME

One sentence describing the entity.

AttributeDescriptionData TypeLength/PrecisionValidation Rules
id...Long19Primary Key, Sequence
...............

Required Format for Each Entity

Every entity MUST have:

  1. A ### heading with ENTITY_NAME
  2. One sentence description
  3. An attribute table with exactly 5 columns

Example Entity

ROOM_TYPE

Defines categories of rooms with shared characteristics.

AttributeDescriptionData TypeLength/PrecisionValidation Rules
idUnique identifierLong19Primary Key, Sequence
nameName of the room typeString50Not Null, Unique
descriptionDetailed descriptionString500Optional
capacityMaximum number of guestsInteger10Not Null, Min: 1, Max: 10
pricePrice per night in CHFDecimal10,2Not Null, Min: 0

Mermaid Diagram Rules

  • Show entity names and relationships ONLY
  • NO attributes inside entity blocks
  • Use relationship syntax: ENTITY_A ||--o{ ENTITY_B : "relationship"

Validation Rules Reference

Use these values in the "Validation Rules" column (never leave empty):

Attribute TypeValidation Rules Value
Primary keyPrimary Key, Sequence
Required fieldNot Null
Unique fieldNot Null, Unique
Foreign keyNot Null, Foreign Key (TABLE.id)
Optional fieldOptional
With rangeNot Null, Min: X, Max: Y
With valuesNot Null, Values: A, B, C
EmailNot Null, Format: Email

Data Types Reference

Data TypeLength/PrecisionUsage
Long19IDs, foreign keys
Stringvaries (50-500)Text fields
Integer10Whole numbers
Decimal10,2Currency, percentages
Boolean1True/false flags
Date-Date only
DateTime-Date and time

Multi-Column Constraints

If validation spans multiple columns, add after the table:

Constraints: Check-out date must be after check-in date.

Workflow

  1. Read the requirements document
  2. Use TodoWrite to create a task for each entity
  3. Write the document header and ER diagram (relationships only)
  4. For each entity:
    • Write ### heading
    • Write one sentence description
    • Write attribute table with 5 columns
    • Add constraints if needed
    • Mark todo complete
  5. Verify every entity has an attribute table