What problem does it solve? When multiple tenants share the same physical PostgreSQL tables in a SaaS platform, there is a risk of one tenant reading or modifying another tenant's data. This Skill enforces logical isolation at the database level using Row-Level Security, so each user or organization only accesses its own rows without needing separate schemas per tenant. ## Core Features & Use Cases - Declarative RLS Policies: Creates SELECT, INSERT, and UPDATE policies bound to a session-level tenant variable, with FORCE ROW LEVEL SECURITY to block even table owners from bypassing isolation. - Tenant Key Modeling: Adds a tenant_id column with composite primary-key indexing to keep RLS-filtered queries on Index Scans instead of full table scans. - Session Binding per Request: Injects the authenticated tenant_id into each transaction via SET LOCAL from the application middleware. - Use Case: A SaaS writing platform stores manuscripts from hundreds of organizations in one table. Apply this Skill so that a query from Tenant A can never return Tenant B's manuscripts, verified by penetration tests and a latency overhead under 10%. ## Quick Start Ask the AI to apply Row-Level Security tenant isolation to the shared manuscripts table in PostgreSQL, including the tenant_id column, policies, and session binding.