database-schema-generator

Generates ER models, Prisma schemas, indexes, and migration plans from requirement models.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/fen-zx/NovelToScript --skill database-schema-generator-fen-zx
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: database-schema-generator
Source: https://github.com/fen-zx/NovelToScript/tree/main/.agents/skills/database-schema-generator
Command: npx skills add https://github.com/fen-zx/NovelToScript --skill database-schema-generator-fen-zx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing a database schema from scratch requires translating requirement models into ER diagrams, Prisma models, indexes, constraints, and migration plans, which is time-consuming and error-prone when done manually. ## Core Features & Use Cases - Complete Schema Generation: Produces entity analysis, ER models, full Prisma schemas, enums, indexes, unique constraints, and foreign keys from requirement or architecture documents. - SQLite Compatibility & Migration Planning: Checks SQLite compatibility issues (JSON, arrays, decimals) and outputs an ordered migration plan with ready-to-run prisma migrate commands. - Risk & Performance Analysis: Flags missing indexes, undefined delete strategies, and N+1 query risks with High/Medium/Low severity ratings. - Use Case: Feed it the entity list from a requirement analysis (e.g., User, Script, Version, Scene) and receive a complete, development-ready Prisma schema with migration steps and optimization suggestions. ## Quick Start Ask the AI to generate a database design from your requirement model, for example: generate a Prisma schema and migration plan for entities User, Script, Version, and Scene.

Frequently Asked Questions about database-schema-generator

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

FAQPage Schema
How do I generate a Prisma schema from requirement documents?▼

Provide the entity list or domain model from your requirement analysis as input, in Markdown or JSON form. The skill outputs a complete Prisma schema with models, relations, enums, indexes, and constraints ready for development.

What input formats does the database schema generator accept?▼

It accepts three input formats: RequirementAnalyzer output listing entities in Markdown, BackendArchitectureGenerator output showing domain model hierarchies, or plain JSON with an entities array.

Does Prisma work with SQLite for production databases?▼

Prisma supports SQLite, but with limitations such as no native array or decimal types. The skill includes a SQLite compatibility check that flags unsupported field types and suggests alternatives like JSON fields.

How do I plan Prisma migrations for multiple tables?▼

The skill generates an ordered migration plan based on entity dependencies, along with ready-to-run commands like npx prisma migrate dev --name init_users for each migration step.

When should I use soft delete instead of hard delete?▼

Use soft delete with a deletedAt timestamp field when records must be recoverable or referenced by historical data. The skill recommends soft delete per entity and flags missing delete strategies as a risk.