From nexa-claude-core
Creates entity model documents with Mermaid.js ER diagrams and attribute tables defining entities, relationships, data types, and validation rules. Use when the user asks to "create an entity model", "design a data model", "draw an ERD", "define database schema", "model entities", or mentions entity-relationship diagram, ER diagram, database design, or data modeling.
How this skill is triggered — by the user, by Claude, or both
Slash command
/nexa-claude-core:entity-modelThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create or update the entity model at `docs/entity_model.md` based on `docs/requirements.md`.
Create or update the entity model at docs/entity_model.md based on docs/requirements.md.
The document contains an ER diagram and attribute tables.
Read and follow ${CLAUDE_PLUGIN_ROOT}/shared/readiness/NEXA_RULES_GATE.md.
# Entity Model
## Entity Relationship Diagram
```mermaid
erDiagram
ROOM_TYPE ||--o{ ROOM : "categorizes"
GUEST ||--o{ RESERVATION : "makes"
One sentence describing the entity.
| Attribute | Description | Data Type | Length/Precision | Validation Rules |
|---|---|---|---|---|
| id | ... | Long | 19 | Primary Key, Sequence |
| ... | ... | ... | ... | ... |
Every entity MUST have:
Defines categories of rooms with shared characteristics.
| Attribute | Description | Data Type | Length/Precision | Validation Rules |
|---|---|---|---|---|
| id | Unique identifier | Long | 19 | Primary Key, Sequence |
| name | Name of the room type | String | 50 | Not Null, Unique |
| description | Detailed description | String | 500 | Optional |
| capacity | Maximum number of guests | Integer | 10 | Not Null, Min: 1, Max: 10 |
| price | Price per night in CHF | Decimal | 10,2 | Not Null, Min: 0 |
ENTITY_A ||--o{ ENTITY_B : "relationship"Use these values in the "Validation Rules" column (never leave empty):
| Attribute Type | Validation Rules Value |
|---|---|
| Primary key | Primary Key, Sequence |
| Required field | Not Null |
| Unique field | Not Null, Unique |
| Foreign key | Not Null, Foreign Key (TABLE.id) |
| Optional field | Optional |
| With range | Not Null, Min: X, Max: Y |
| With values | Not Null, Values: A, B, C |
| Not Null, Format: Email |
| Data Type | Length/Precision | Usage |
|---|---|---|
| Long | 19 | IDs, foreign keys |
| String | varies (50-500) | Text fields |
| Integer | 10 | Whole numbers |
| Decimal | 10,2 | Currency, percentages |
| Boolean | 1 | True/false flags |
| Date | - | Date only |
| DateTime | - | Date and time |
If validation spans multiple columns, add after the table:
Constraints: Check-out date must be after check-in date.
npx claudepluginhub nexadevapp/nexa-claude-skills-marketplace --plugin nexa-claude-coreCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.