supabase-migrations

Audit Supabase migrations for stubs, RLS policies, and idempotency.

Updated Nov 17, 2025
One-click install
npx skills add https://github.com/Valynt/ValueOS --skill supabase-migrations-valynt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-migrations
Source: https://github.com/Valynt/ValueOS/tree/main/.windsurf/skills/supabase-migrations
Command: npx skills add https://github.com/Valynt/ValueOS --skill supabase-migrations-valynt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Audits and hardens Supabase migrations for production readiness by separating functional SQL from boilerplate, enforcing RLS policies, and ensuring idempotent migrations.

Core Features & Use Cases

  • Stub detection and cleanup: identify migrations that add no value and recommend deletion or repair.
  • Security & RLS validation: ensure every CREATE TABLE has a corresponding ENABLE ROW LEVEL SECURITY and a CREATE POLICY exists; flag high-risk gaps.
  • Idempotency & safety: enforce IF NOT EXISTS, OR REPLACE patterns to ensure repeatable CI/CD runs.
  • Workflow guidance: provides baseline and verification commands to align migrations with remote history and CI progress.

Quick Start

Baseline your Supabase migrations and start auditing for stubs, missing RLS policies, and idempotency using the provided commands.

Frequently Asked Questions about supabase-migrations

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

FAQPage Schema
How do I enforce Supabase RLS policies in CI/CD migrations?

Enforce Supabase RLS policies in CI/CD by auditing migrations to ensure every CREATE TABLE has a corresponding ENABLE ROW LEVEL SECURITY and a CREATE POLICY statement. This validates security requirements and flags high-risk gaps before production release.

What is a Supabase migration stub and how do I clean it up?

A Supabase migration stub is a migration file that adds no functional SQL value. You clean it up by running an audit process that identifies these non-value changes and recommends deletion or repair to maintain a clean database schema history.

How do I make Supabase migrations idempotent for repeatable CI/CD runs?

Make Supabase migrations idempotent for repeatable CI/CD runs by enforcing IF NOT EXISTS and OR REPLACE patterns in your SQL. This ensures schema evolution commands do not fail when executed multiple times in production release workflows.

How do I baseline Supabase migrations with remote history before deploying?

Baseline Supabase migrations with remote history by using workflow guidance commands that align local migrations with CI progress. This verifies database schema evolution and ensures rollback readiness before applying changes to production.

Does this Supabase migration audit work without external dependencies?

Yes, this Supabase migration audit works without external dependencies. It directly analyzes your SQL migrations to separate functional code from boilerplate, enforcing security policies and idempotency within your existing CI/CD pipelines.

Why are my Supabase CI/CD pipeline migrations failing on repeated runs?

Supabase CI/CD pipeline migrations fail on repeated runs when SQL commands lack idempotency. Enforce IF NOT EXISTS and OR REPLACE patterns during migration audits to prevent duplicate object creation errors and ensure repeatable production releases.