testing-rls-pgtap

Automate Supabase Row Level Security validation with pgTAP tests.

32|13|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/nghiahsgs/taw-kit --skill testing-rls-pgtap
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-rls-pgtap
Source: https://github.com/nghiahsgs/taw-kit/tree/main/skills/testing-rls-pgtap
Command: npx skills add https://github.com/nghiahsgs/taw-kit --skill testing-rls-pgtap

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validate Supabase Row Level Security policies by automatically generating and executing pgTAP tests to ensure correct data access boundaries for tenants, admins, and anonymous users.

Core Features & Use Cases

  • Auto-detect tables and policies from supabase/migrations to build targeted tests.
  • Validate owner vs non-owner access for authenticated users and proper fallback for anonymous sessions.
  • Provide deterministic test suites that can be run with Supabase CLI or local PostgreSQL environments.

Quick Start

Run the pgTAP test suite against your Supabase project to verify RLS policy behavior.

Frequently Asked Questions about testing-rls-pgtap

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

FAQPage Schema
How do I test Supabase Row Level Security policies?

To test Supabase Row Level Security policies, you can use pgTAP to automate validation of data access boundaries. This Skill generates deterministic test suites that verify owner vs. non-owner access and admin visibility for authenticated and anonymous users.

What is the best way to automate pgTAP tests for Postgres RLS policies?

Automating pgTAP tests for Postgres RLS policies involves auto-detecting tables and policies from your Supabase migrations. This approach builds targeted tests to ensure correct data access boundaries for tenants and admins, producing deterministic results runnable via Supabase CLI or local PostgreSQL.

Can I run pgTAP tests for Supabase RLS in a local PostgreSQL environment?

Yes, you can run pgTAP tests for Supabase RLS in a local PostgreSQL environment. The generated test suites are deterministic and can be executed using either the Supabase CLI or a local PostgreSQL setup, provided pgTAP and Supabase config are present.

Do I need pgTAP installed to validate Supabase database security policies?

Yes, you need pgTAP installed to validate Supabase database security policies using this approach. The Skill requires a project with Supabase configuration and the pgTAP extension to auto-detect tables and generate test suites for RLS policy validation.

Why are my Supabase RLS policies allowing access for non-owner users?

Supabase RLS policies allowing access for non-owner users indicate a misconfiguration in data access boundaries. Using pgTAP tests to validate owner vs. non-owner access for authenticated users helps identify and isolate these policy failures across your database tables.