What problem does it solve? Multi-tenant applications risk leaking one tenant's data to another through missing query filters, misconfigured database policies, or SQL injection. This Skill provides a complete framework for enforcing tenant isolation at both the database and application level, preventing cross-tenant data access. ## Core Features & Use Cases - Row Level Security Setup: SQL templates to enable and force RLS on PostgreSQL tables with tenant isolation policies based on session settings. - Tenant Context Middleware: TypeScript/Prisma middleware that injects tenant_id into every query and sets per-transaction tenant context. - Automated Security Testing: Test suites covering cross-tenant reads, updates, deletes, transaction rollbacks, and SQL injection bypass attempts. - RLS Audit Script: Scans all database tables to verify tenant_id columns, RLS enablement, forced enforcement, and policy existence. - Use Case: A SaaS team building a multi-tenant order management API uses this Skill to configure RLS policies, add Prisma tenant middleware, and run regression tests proving Tenant A can never read Tenant B's orders. ## Quick Start Audit my Prisma/PostgreSQL schema for tenant isolation gaps and generate the RLS policies, middleware, and security tests needed to prevent cross-tenant data leakage.