rls

Enable RLS and create per-row access policies on PostgreSQL tables.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/theslashdojo/dojo --skill rls-theslashdojo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rls
Source: https://github.com/theslashdojo/dojo/tree/main/nodes/supabase/rls
Command: npx skills add https://github.com/theslashdojo/dojo --skill rls-theslashdojo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires psql, and includes scripts (resource) components.

What problem does it solve?

PostgreSQL row-level security policies protect data by enforcing per-row access controls on tables, preventing unauthorized data exposure.

Core Features & Use Cases

  • Enable RLS on tables to restrict access to owner-based rows
  • Create reusable policies for common access patterns (own data, public data, team data)
  • Quick testing and auditing of policies using auth.uid() and auth.jwt()

Quick Start

Enable RLS on a target table and apply common policies with the provided script.

Frequently Asked Questions about rls

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

FAQPage Schema
How do I enable row-level security on PostgreSQL tables?▼

Row-level security in PostgreSQL is enforced by enabling RLS and applying policies to restrict table access. This Skill creates common policies for owner-based rows and validates access patterns using auth.uid().

What's the best way to restrict data access per user in Supabase?▼

Restricting per-user data access in Supabase is handled by PostgreSQL row-level security policies. The Skill generates reusable policies for own, public, or team data and tests them using auth.jwt() claims.

Can I use psql to apply row-level security policies to my database?▼

Yes, you can use psql to apply row-level security policies. The Skill provides an automation script that generates and applies RLS policies directly to your PostgreSQL deployment.

How do I test PostgreSQL RLS policies for admin bypass and user isolation?▼

Testing PostgreSQL RLS policies for admin bypass and user isolation is done by validating access patterns. The Skill audits policies using auth.uid() and auth.jwt() to ensure correct per-user data exposure.

When do I need row-level security policies for my tables?▼

Row-level security policies are needed when preventing unauthorized data exposure on a per-row basis. They enforce per-row access controls on PostgreSQL tables to ensure admin bypass and per-user data isolation.