database-schema

Generates database schemas, ORM/ODM models, migrations, and FastAPI endpoints from JSON entity specifications.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/jr2804/prompts --skill database-schema-jr2804
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: database-schema
Source: https://github.com/jr2804/prompts/tree/main/skills/database/database-schema
Command: npx skills add https://github.com/jr2804/prompts --skill database-schema-jr2804

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill automates the generation of comprehensive database schemas, including ORM/ODM models, migrations, and FastAPI-ready wiring for PostgreSQL, MongoDB, and SQLite.

Core Features & Use Cases

  • Generate SQLAlchemy models for SQL databases with proper relationships and constraints
  • Generate ODMantic models for MongoDB and Alembic-compatible migrations
  • Produce FastAPI integration scaffolding and ready-to-run initialization code for quick project bootstrap

Quick Start

Define your entities in a JSON specification and run the generator script to produce models, migrations, and API scaffolding for a FastAPI project.

Frequently Asked Questions about database-schema

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

FAQPage Schema
How do I auto-generate SQLAlchemy models from a JSON specification?▼

You can auto-generate SQLAlchemy models by defining your database entities in a JSON specification and running the generator script. This process outputs Python modules with proper relationships and constraints for PostgreSQL or SQLite.

Can I generate ODMantic models for MongoDB with this approach?▼

Yes, you can generate ODMantic models for MongoDB. The generator reads a JSON entity specification and produces ODMantic models along with Alembic-compatible migrations for MongoDB environments.

Does this database schema generator produce FastAPI integration code?▼

Yes, the database schema generator produces FastAPI-ready integration scaffolding. It outputs starter API endpoints and ready-to-run initialization code to help you quickly bootstrap your FastAPI project.

What is the best way to create database migrations for multiple databases?▼

The best way to create migrations for multiple databases is using a JSON entity specification to generate Alembic-compatible migration scripts. This automatically produces the necessary migration files for PostgreSQL, MongoDB, and SQLite.

Do I need to manually configure database relationships when generating schemas?▼

No, you do not need to manually configure database relationships. The generator automatically creates complete database schemas with proper relationships and constraints directly from your JSON entity definitions.