Back to Skills Hub
Supabase RLS Generator

Supabase RLS Generator

@lxgicstudios
developmentSupabaseRLS Policy GenerationPrisma Schema

Automatically generate Supabase Row Level Security (RLS) policies from your Prisma schema file with AI assistance. Handles common access patterns including user data isolation, team access, and multi-tenant scenarios without manual configuration.

🚀 Automatically generate Supabase RLS policies from your Prisma schema in seconds. One command reads your data models and creates secure, production-ready policies—no manual syntax wrestling required. Just run npx ai-supabase-gen and get instant protection for your database tables.

💡 Perfect for securing multi-tenant apps, protecting user data, and implementing team-based access controls. Whether you're setting up a new Supabase project or adding security to existing tables, this tool handles common patterns like personal data access and team permissions automatically.

✨ Zero configuration needed—just your OpenAI API key. Handles SELECT, INSERT, UPDATE, and DELETE operations with built-in best practices for auth.uid() and role-based access.

GitHub

Requirements

OpenAI API Key

Required for AI-powered policy generation. Set via OPENAI_API_KEY environment variable.

Node.js

Node.js 18 or higher required to run the tool.