database-schema-designer

Design relational database schemas and generate migrations, types, seed data, indexes, and RLS policies.

1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/lagarcess/argus --skill database-schema-designer-lagarcess
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-schema-designer
Source: https://github.com/lagarcess/argus/tree/main/.agent/skills/database-schema-designer
Command: npx skills add https://github.com/lagarcess/argus --skill database-schema-designer-lagarcess

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Translate product and feature requirements into production-ready relational schemas, migrations, and operational policies so teams avoid performance regressions, security holes, and painful manual migrations.

Core Features & Use Cases

  • Schema design & normalization: convert requirements into normalized tables, relationships, constraints, and polymorphic associations.
  • Migration generation: produce migration artifacts for Prisma, Drizzle, TypeORM, and Alembic to safely evolve schemas.
  • Type & seed generation: emit TypeScript and Python types, realistic seed data, and audit-log patterns for compliance.
  • Operational policies: design index strategies, partial/composite indexes, optimistic locking, soft deletes, and PostgreSQL Row-Level Security for multi-tenancy.
  • ERD & diagrams: generate Mermaid ERD diagrams and actionable schema change plans for feature launches and refactors.
  • Use Case: scaffold a task-management SaaS schema with organizations, projects, tasks, labels, assignments, attachments, and an audit trail with RLS and seed data.

Quick Start

Generate a normalized PostgreSQL schema with multi-tenancy, soft deletes, RLS policies, Prisma and Alembic migrations, TypeScript/Pydantic types, and seed data for a task management app with users, projects, tasks, labels, assignments, and audit logs.

Frequently Asked Questions about database-schema-designer

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

FAQPage Schema
How do I design a multi-tenant PostgreSQL schema with Row-Level Security?

Generate normalized relational database schemas with multi-tenancy support by defining tables, constraints, and polymorphic associations. The process outputs schema migrations, seed data, and operational policies like PostgreSQL Row-Level Security to ensure robust data isolation.

Can I generate Prisma and Drizzle migrations from a database schema design?

Yes, generate migration artifacts for Prisma, Drizzle, TypeORM, and Alembic directly from relational database schema designs. These migration files safely evolve schemas by translating normalized table definitions and relationships into framework-compatible scripts.

What is the best way to model audit trails and polymorphic attachments in a relational schema?

Model audit trails and polymorphic attachments by applying normalization techniques to create flexible associations and compliance logs. This approach yields normalized table definitions with constraints, enabling accurate tracking and versatile file linking within the database.

Does this database schema design approach support composite and partial indexes?

Yes, database schema design supports composite and partial indexes to optimize query performance. It provides index strategy recommendations alongside PostgreSQL-ready RLS scripts and Mermaid ERD diagrams to visualize the relational schema structure.

How do I add soft deletes and optimistic locking to an existing database schema?

Add soft deletes and optimistic locking by generating migration files and operational policies that safely evolve schemas. These schema migration artifacts ensure data integrity during concurrent updates and deletions without losing historical records.

When do I need schema migration files for a multi-tenant SaaS application?

You need schema migrations for a multi-tenant SaaS application when translating feature requirements into production-ready relational schemas with RLS. Generating migrations for frameworks like Prisma or Drizzle prevents performance regressions and security holes during feature launches and refactors.