supabase-database

Provides Supabase database schema, migration, function and RLS policy guidelines for Postgres projects.

1|Updated May 16, 2026
One-click install
npx skills add https://github.com/gudnuf/agicash-rs --skill supabase-database-gudnuf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-database
Source: https://github.com/gudnuf/agicash-rs/tree/main/.claude/skills/supabase-database
Command: npx skills add https://github.com/gudnuf/agicash-rs --skill supabase-database-gudnuf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Guidelines for designing and enforcing best practices around Supabase database work, including migrations, functions, and Row Level Security policies.

Core Features & Use Cases

  • Standardized migration naming and organization under supabase/migrations
  • Clear guidelines for creating and deploying functions with SECURITY INVOKER and proper set search_path
  • Granular RLS policy guidelines per operation and per role for robust access control
  • SQL style conventions and best practices across projects

Quick Start

Follow these guidelines when planning or updating your Supabase database schemas to ensure consistency, security, and maintainability.

Frequently Asked Questions about supabase-database

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

FAQPage Schema
How do I structure Supabase Row Level Security policies for multiple roles?

Supabase RLS policies should be defined granularly per operation and per role to enforce robust access control. This approach ensures secure, maintainable database code across development, staging, and production environments.

What is the best way to name Supabase database migration files?

Supabase database migration files require deterministic naming and organization under the supabase/migrations directory. This standardization ensures consistency and maintainability across development, staging, and production environments.

How do I secure Supabase Postgres functions against search_path attacks?

Secure Supabase Postgres functions by deploying them with SECURITY INVOKER and setting a proper search_path. Using fully qualified names in your SQL style further protects the database code from search_path attacks.

Do I need to follow specific SQL style conventions for Supabase migrations?

Yes, Supabase migrations require specific SQL style conventions including enforcing lowercase SQL and using fully qualified names. Following these guidelines ensures your database schemas remain secure and maintainable across all environments.

Can I use these database guidelines across development, staging, and production environments?

Yes, these Supabase database guidelines apply across development, staging, and production environments. They standardize migration naming, RLS policies, and function security to ensure consistent database schema deployment.