Data & Schema
RLS Policy Forge
Generates production-ready RLS policies from plain English
About this skill
RLS Policy Forge
Generates production-ready Row Level Security (RLS) policies for Supabase/Postgres tables from plain English descriptions. Never uses USING(true) for sensitive data. Always pairs each policy with test queries.
What it does
Describe your access pattern in plain English ("users can only see their own orders" or "anyone can read published posts, only the author can edit") and get back:
- Full SQL with ENABLE RLS and CREATE POLICY statements
- Test queries for the happy path
- Test queries that should fail for the wrong user
- A verification checklist
Patterns covered
- Own-row access (most common)
- Multi-tenant organization isolation
- Public read with owner write
- Role-based access via admin_users table (never role column on profiles)
Why it matters
RLS is your last line of defense. One bad policy and your data is public.
SKILL.md preview
---
name: rls-policy-forge
description: Use when creating or updating Row Level Security policies on Supabase tables, when describing access patterns in plain English, or implementing multi-tenant data isolation.
---
# RLS Policy Forge
Generates production-ready RLS policies from plain English descriptions.