rls-generator

Generate Supabase Row Level Security policies from table_name, columns, and access_rules.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Zibilispops/dark2 --skill rls-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rls-generator
Source: https://github.com/Zibilispops/dark2/tree/main/.agent/skills/rls-generator
Command: npx skills add https://github.com/Zibilispops/dark2 --skill rls-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of Row Level Security policies for new Supabase tables, reducing manual errors and ensuring policy coverage.

Core Features & Use Cases

  • Generate sql_policy from provided table_name, columns[], and access_rules to enforce row-level access controls.
  • Validate consistency between access_rules and resulting policy, reducing misconfigurations.
  • Use in development and PR workflows to ensure every new table ships with a compliant RLS policy.

Quick Start

Provide the table_name, columns, and access_rules to generate the initial RLS policy for a new table.

Frequently Asked Questions about rls-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I auto-generate Row Level Security policies for new Supabase tables?

To generate Row Level Security policies for new Supabase tables, provide the table_name, columns, and access_rules to produce a json object containing the sql_policy, explanation, and risk_notes for consistent access controls.

What do I need to provide to generate an RLS policy for a Supabase table?

You need to provide the table_name, a list of columns, and the access_rules for the Supabase table. The Skill combines these inputs to validate consistency and generate the precise row-level security policy.

Can I integrate RLS policy generation into my development and PR workflows?

Yes, you can integrate RLS policy generation into development, staging, and production PR workflows. This ensures every new table ships with a compliant row-level security policy, reducing manual errors and misconfigurations.

How does the generated RLS policy explain its access controls and security implications?

The generated RLS policy includes an explanation and risk_notes alongside the sql_policy. These fields detail how the row-level access controls work and outline potential security implications for the Supabase table.

Why do my new Supabase tables lack consistent row-level access controls?

New Supabase tables often lack consistent row-level access controls due to manual policy creation errors. Automatically generating RLS policies from table_name, columns, and access_rules enforces consistent data access controls across environments.