spec-er-diagram
Entity E/R Diagram Generator
Generate a Mermaid E/R diagram from entity definitions found in source files and save it to a documentation file chosen by the user.
Step 1: Gather Locations
Before scanning any files, determine the two required paths. Ask the user if they are not provided upfront.
Entity source directory — where are the entity/model files?
- If not specified, search the workspace for common patterns: files named
*.entity.ts,*Entity.ts,*Model.ts,*Schema.ts, or directories namedentity/,entities/,models/,domain/ - Show the candidates found and ask the user to confirm which to use
Output file path — where should the diagram be saved?
- Do NOT assume or default to any path
- Ask the user explicitly: "Where would you like to save the diagram? (e.g.
docs/entity-diagram.md)" - Accept any path the user provides
Step 2: Evaluate Existing Diagram
If a file already exists at the confirmed output path:
More from efesto-cloud/skills
persistence
>
19population
>
18value-object
|
18type-enum-dict
|
18usecase
>
17entity
Create or modify domain entities using the @efesto-cloud/entity package. Use this skill whenever the user asks to add a new entity, update an existing entity, add properties or methods to an entity, or work on the entity/dto layer. Trigger when the user says things like "create a Foo entity", "add a field to Bar", "I need a new domain object", or "add entity X". Also trigger for DTO creation or modification.
17