1
    PostgreSQL Schema Architect

    PostgreSQL Schema Architect

    by Arnstein Larsen

    Schema mistakes are the most expensive kind — code refactors in days, but a wrong table design holds your data hostage for years

    Updated Jun 2026
    Security scanned
    Cursor

    $9.99

    · or 50 credits

    30-day refund guarantee

    Secure checkout via Stripe

    Included in download

    • Design multi-tenant architectures using Row Level Security (RLS)
    • Evaluate trade-offs between normalized columns and JSONB storage
    • Ready for Cursor
    • Instant install

    Sample input

    Design a multi-tenant schema for a B2B SaaS project management tool using Row Level Security. We need to handle high-volume task updates and allow for custom metadata per project.

    Sample output

    I've designed the schema using a tenant_id column for RLS isolation.

    -- Key Decision: Used jsonb for project metadata to support custom fields without migrations. CREATE TABLE tasks ( id uuid PRIMARY KEY DEFAULT gen_random_uuid(), tenant_id uuid NOT NULL REFERENCES tenants(id), ... ); ALTER TABLE tasks ENABLE ROW LEVEL SECURITY;

    About This Skill

    Schema mistakes are the most expensive kind — code refactors in days, but a wrong table design holds your data hostage for years. This skill designs your PostgreSQL schema from the ground up: table structure, normalization decisions and where to deliberately denormalize, index strategy for your actual query patterns, constraint design that enforces business rules at the database level, and the migration path if you're evolving an existing schema. It explains every decision in terms of the trade-offs specific to your use case — not generic best practices, but choices calibrated to your data volume, query patterns, and growth trajectory. Use it before you write your first CREATE TABLE, or when you've hit the performance wall that tells you the original design was wrong. Give it your domain model and your most expensive queries; it returns a schema you can defend.

    Use Cases

    • Design multi-tenant architectures using Row Level Security (RLS)
    • Optimize slow queries by mapping index strategies to access patterns
    • Evaluate trade-offs between normalized columns and JSONB storage
    • Model complex entity relationships with strict data integrity constraints

    Reviews

    No reviews yet - be the first to share your experience.

    Only users who have downloaded or purchased this skill can leave a review.

    Security Scanned

    Passed automated security review

    Permissions

    No special permissions declared or detected

    Compatible with SKILL.md-compatible agents including Claude Code, Cursor, and Aider.

    Frequently Asked Questions

    More Premium Skills

    $10