spex-db

Design database schemas, ERDs, and migration strategies for SQL and NoSQL databases.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/johangm90/spex --skill spex-db
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spex-db
Source: https://github.com/johangm90/spex/tree/main/skills/spex-db
Command: npx skills add https://github.com/johangm90/spex --skill spex-db

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the complex and error-prone process of designing database schemas, ERDs, and safe migration strategies, ensuring data integrity and efficient development.

Core Features & Use Cases

  • Schema Design: Models entities, attributes, types, and constraints based on project requirements.
  • ERD Generation: Creates visual Entity-Relationship Diagrams for clear understanding.
  • Migration Planning: Designs additive and safe destructive migration strategies, including rollback plans.
  • Database Engine Selection: Recommends and configures schemas for PostgreSQL, MariaDB/MySQL, and others.
  • Use Case: When a new feature requires storing user preferences, use this Skill to design the user_preferences table, define its columns (e.g., theme, notifications_enabled), specify data types, and generate a migration script that can be safely applied to production.

Quick Start

Design the database schema for the new user profile feature, including tables for profiles, avatars, and settings.

Frequently Asked Questions about spex-db

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

FAQPage Schema
How do I design a database schema and plan safe migrations for PostgreSQL?

Designing a database schema for PostgreSQL involves modeling entities, attributes, and constraints, followed by generating additive migration scripts with rollback plans to ensure zero-downtime deployments and transactional integrity.

What is the best way to generate an ERD for a new database feature?

The best way to generate an ERD is by modeling entities and their relationships based on project requirements, which produces a visual Entity-Relationship Diagram that clarifies data modeling and supports efficient development.

Does this approach support schema migration for both SQL and NoSQL databases?

Yes, schema migration and design approaches support both SQL and NoSQL databases, specifically configuring schemas and migration strategies for PostgreSQL, MariaDB, MySQL, and MongoDB according to best practices.

How do I create zero-downtime migration scripts for a production database?

To create zero-downtime migration scripts, you design additive and safe destructive migration strategies that include rollback plans, ensuring data integrity and preventing disruption during production deployments.

Can I integrate ORM tools with the database schemas I design?

Yes, you can integrate ORM tools with the database schemas you design, as the schema design process includes specific guidance on ORM integration alongside indexing and transactional integrity best practices.

When do I need to use specific data types and constraints in MariaDB schema design?

You need to define specific data types and constraints in MariaDB schema design when modeling entities and attributes for new features, ensuring data integrity and efficient queries through proper indexing and transactional rules.