supabase-test

Test Supabase applications with ephemeral PostgreSQL databases and simulated RLS policies.

1|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/constructive-io/constructive-skills --skill supabase-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-test
Source: https://github.com/constructive-io/constructive-skills/tree/main/skills/supabase-test
Command: npx skills add https://github.com/constructive-io/constructive-skills --skill supabase-test

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the testing of Supabase applications by providing a robust framework for creating isolated, ephemeral databases and simulating various user roles for comprehensive testing of Row Level Security (RLS) policies.

Core Features & Use Cases

  • Ephemeral Databases: Each test runs with a fresh, isolated database instance, ensuring test independence.
  • RLS Testing: Simulate anon and authenticated users to verify access controls.
  • Multi-User Simulation: Test scenarios involving multiple concurrent users with different permissions.
  • Direct Postgres Access: Interact directly with the database using both superuser and user clients.
  • Use Case: Verify that an authenticated user can only modify their own records in a posts table while being unable to access or modify records belonging to other users.

Quick Start

Use the supabase-test skill to write tests for your Supabase application.

Frequently Asked Questions about supabase-test

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

FAQPage Schema
How do I test Supabase Row Level Security policies in Vitest or Jest?

To test Supabase Row Level Security policies, you can write pure TypeScript tests using Vitest or Jest that simulate anon and authenticated users against an isolated PostgreSQL database to verify authorization rules.

What is the best way to isolate PostgreSQL database tests for Supabase applications?

The best way to isolate PostgreSQL database tests is to use ephemeral database instances, ensuring each test runs with a fresh database state for instant test independence and reliable data integrity verification.

Can I simulate multiple concurrent users with different permissions in a Supabase test?

Yes, you can simulate multiple concurrent users with different permissions in a Supabase test by interacting directly with the database using both superuser and user clients to verify multi-user RLS scenarios.

Does the supabase-test skill work with direct Postgres access for CI environments?

Yes, the supabase-test skill works with direct Postgres access to provide instant test isolation and CI-ready environments, allowing you to verify robust authorization and data integrity directly in your pipeline.

Do I need an existing PostgreSQL database to run Supabase RLS tests?

No, you do not need an existing PostgreSQL database to run Supabase RLS tests because the framework automatically provisions ephemeral databases for each test, ensuring a completely isolated and fresh environment.

What are the limitations of testing Supabase apps with ephemeral databases?

A limitation of testing Supabase apps with ephemeral databases is that each test spins up a fresh instance, which may increase execution overhead for large test suites while guaranteeing strict test isolation.