database

Design PostgreSQL schemas, migrations, RLS policies, and indexes for Supabase apps.

Updated Dec 14, 2025
One-click install
npx skills add https://github.com/shaitamam-80/-Find-My-Journal- --skill database-shaitamam-80
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database
Source: https://github.com/shaitamam-80/-Find-My-Journal-/tree/main/.claude/skills/database
Command: npx skills add https://github.com/shaitamam-80/-Find-My-Journal- --skill database-shaitamam-80

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Supabase + PostgreSQL database design and governance for secure, scalable apps. It covers schema design, migrations, RLS policies, indexing strategies, and integrating with Supabase features like Auth, Storage, and Edge Functions to avoid common pitfalls.

Core Features & Use Cases

  • Schema design and normalization for multi-tenant apps
  • Writing migrations with safe patterns, indexing, and RLS integrations
  • Implementing Row Level Security policies and access controls
  • Performance tuning and debugging for database queries and migrations
  • Use Cases: migrate a new project, enforce per-user data access, optimize common queries in a SaaS context

Quick Start

Design a robust, scalable PostgreSQL schema for a multi-tenant app with migrations, RLS, and indexing using Supabase.

Frequently Asked Questions about database

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

FAQPage Schema
How do I design a multi-tenant PostgreSQL schema for a Supabase app?

Multi-tenant PostgreSQL schema design involves structuring tables with proper normalization and tenant isolation rules. This Skill generates scalable schemas and safe migration patterns specifically for multi-tenant SaaS contexts using Supabase and PostgreSQL 15.

How do I enforce Row Level Security policies in Supabase?

Row Level Security policies in Supabase enforce per-user data access by restricting table rows based on authenticated user roles. This Skill implements RLS policies and access controls to prevent unauthorized data exposure across multi-tenant applications.

What's the best way to write safe database migrations in PostgreSQL?

Safe database migrations in PostgreSQL require patterns that prevent table locks and data loss during schema updates. This Skill provides migration strategies incorporating indexing best practices and Supabase integration to ensure reliable deployments.

How do I optimize slow PostgreSQL queries in a multi-tenant SaaS database?

Optimizing slow PostgreSQL queries requires analyzing execution plans and applying targeted indexing strategies. This Skill performs performance tuning and debugging for database queries to resolve common bottlenecks in SaaS applications.

Does this database schema design approach work with Supabase Auth and Storage?

Yes, this database schema design approach works with Supabase Auth and Storage. It ensures PostgreSQL 15 compatibility and integrates schema designs with native Supabase features like Auth, Storage, and Edge Functions for secure access control.

What are the limitations of relying on database-level RLS for tenant isolation?

Database-level RLS for tenant isolation requires correctly configured policies on every table to prevent data leaks. This Skill mitigates limitations by systematically enforcing RLS policies and access controls across the entire multi-tenant schema design.