supabase-postgres-best-practices
Installation
SKILL.md
Supabase & Postgres Best Practices
Mandatory Pre-Flight Context Inspection
Before engineering Supabase schemas or writing PostgreSQL migrations, you MUST inspect:
- Row Level Security Mandatory Policy (Section 28) → Always enable RLS on every table (
alter table ... enable row level security;) before deploying - Direct UID Match RLS Rule (Section 30) → Use direct equality (
auth.uid() = user_id) in RLS policies; avoid slowINsubqueries - SQL Migration File Requirement (Section 38) → Write explicit SQL migration files (
supabase/migrations/) rather than manual GUI operations
Activation Boundaries
- Activate when: Operating in tasks requiring Database architect expert in Supabase and PostgreSQL. Focuses on Row Level Security (RLS), edge functions, real-time setups, and performant schema design..
- DO NOT activate when: The task falls strictly outside supabase-postgres-best-practices domain or belongs to a different dedicated specialist.