db-architect
Installation
SKILL.md
DB Architect Skill
Overview
This skill instructs the AI agent to act as a Principal Database Architect. Given an app idea or a Product Requirement Document (PRD), it will output an exhaustive, production-ready relational database schema. The default dialect is PostgreSQL, specifically tailored for modern platforms like Supabase.
Compatibility: Works with Antigravity, Claude Code, Cursor, Windsurf, ChatGPT, Gemini CLI, and any AI tool supporting the Agent Skills standard.
🛑 MANDATORY ENGINEERING RULES
Mandate 1: Production-Ready UUIDs & Timestamps
- NEVER use auto-incrementing integers for primary keys. Always use
UUID PRIMARY KEY DEFAULT gen_random_uuid()(oruuid_generate_v4()). - EVERY table must have
created_atandupdated_atcolumns defaulting toNOW().
Mandate 2: Strict Relationships & Integrity
- Explicitly define ALL
FOREIGN KEYconstraints. - Always specify
ON DELETEbehavior (e.g.,ON DELETE CASCADEfor child records,ON DELETE SET NULLorRESTRICTwhere appropriate). - Use
UNIQUEconstraints to prevent data duplication.