supabase-database

Standardize Supabase migrations, RLS policies, and auth integration.

59|12|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/etylsarin/opencastle --skill supabase-database-etylsarin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: supabase-database
Source: https://github.com/etylsarin/opencastle/tree/main/src/orchestrator/plugins/supabase
Command: npx skills add https://github.com/etylsarin/opencastle --skill supabase-database-etylsarin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Supabase database migrations, RLS policies, and auth integration are error-prone without a standard methodology. This guide provides a consistent approach to designing schemas, writing migrations, and enforcing access control while aligning authentication flows.

Core Features & Use Cases

  • Migration discipline: write idempotent, well-documented migrations that reflect schema changes.
  • RLS patterns: design roles and policies with consistent access control across tables.
  • Auth integration: align database auth with your app's authentication flow and role management.
  • Use Case: Migrate a project to a RBAC-based model with proper RLS rules and migrations to support secure multi-tenant access.

Quick Start

Configure your project following the supabase-config guidelines to implement migrations, RLS, and auth alignment.

Frequently Asked Questions about supabase-database

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

FAQPage Schema
How do I write idempotent Supabase database migrations for schema changes?▼

Idempotent Supabase database migrations ensure schema changes execute consistently without duplication errors. This methodology enforces well-documented, repeatable migration scripts that safely reflect structural updates across multiple tables and roles.

What is the best way to design Supabase RLS policies for multi-tenant access control?▼

Designing Supabase RLS policies for multi-tenant access requires standardized roles and consistent policy definitions across tables. This approach enforces robust access-control rules to securely isolate tenant data within your database schema.

How does Supabase auth integration align with database roles and RBAC?▼

Supabase auth integration aligns database authentication with your application's role management flow. This methodology ensures authentication processes correctly map to database roles, supporting a secure RBAC-based model across user sessions.

How do I align TypeScript typings after Supabase schema migrations?▼

Aligning TypeScript typings after Supabase schema migrations ensures type safety following structural database changes. This standardized methodology enforces consistent type generation to match updated tables, roles, and access-control policies.

Why do my Supabase RLS policies return inconsistent query results across roles?▼

Inconsistent Supabase RLS policy results often stem from poorly defined access-control rules across database roles. Applying a standardized RLS methodology resolves these inconsistencies by enforcing robust, predictable policy definitions for multi-tenant access.