data-model

Generates a data model document with tables, constraints, and indexes derived from a domain model.

Updated May 24, 2026
One-click install
npx skills add https://github.com/pirras-torres/pirras-marketplace --skill data-model-pirras-torres
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: data-model
Source: https://github.com/pirras-torres/pirras-marketplace/tree/main/plugins/pi-dev/skills/data-model
Command: npx skills add https://github.com/pirras-torres/pirras-marketplace --skill data-model-pirras-torres

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Translating a domain model into a concrete persistence design is repetitive and error-prone. This Skill derives entities from your existing domain model and business rules, then guides you through storage decisions to produce a complete data model document. ## Core Features & Use Cases - Entity Derivation: Reads domain_model.md and business_rules.md to extract entities, attributes, relationships, and validation rules without re-asking known information. - Guided Storage Decisions: Asks targeted questions about storage technology, field types, constraints, indexes, soft deletes, tenancy, and primary key conventions. - Structured Output: Writes a formatted docs/02_business/data_model.md with table definitions, indexes, relationships, and validation constraints traceable to business rules. - Use Case: After defining your domain model for a fintech app, run this Skill to generate SQL-ready table definitions with constraints like amount DECIMAL(10,2) CHECK (> 0) pulled directly from your business rules. ## Quick Start Ask the assistant to create the data model document from the existing domain model and business rules in the docs folder.

Frequently Asked Questions about data-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a data model from a domain model?▼

Run this Skill after generating a domain model. It reads docs/02_business/domain_model.md, extracts entities and attributes, then asks about storage specifics like field types, constraints, and indexes before writing data_model.md.

What inputs does the data model skill require?▼

It requires docs/02_business/domain_model.md to exist; otherwise it tells you to run the domain-model skill first. It optionally reads business_rules.md to convert validation rules into field constraints.

Does it support both SQL and NoSQL storage?▼

Yes. During the process it asks whether storage is relational SQL, document NoSQL, both, or undecided, and records the choice in the generated document header.

How are business rules reflected in the data model?▼

Validation rules from business_rules.md are pre-filled as field constraints, such as CHECK constraints, and listed in a dedicated Validation Constraints table mapping each constraint to its source rule.

Where is the data model document written?▼

It writes to docs/02_business/data_model.md, creating the folder if missing. If multiple docs folders exist, it asks which one to use.