supabase-seeding

Guide Supabase database seeding with idempotent INSERT statements and schema-data separation.

2|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/jclfocused/claude-agents --skill supabase-seeding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-seeding
Source: https://github.com/jclfocused/claude-agents/tree/main/skills/supabase-seeding
Command: npx skills add https://github.com/jclfocused/claude-agents --skill supabase-seeding

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides clear, actionable patterns and best practices for seeding data into Supabase databases, ensuring consistency and reliability across development and production environments.

Core Features & Use Cases

  • Schema vs. Data Separation: Guides on keeping database schema in migrations and data in seed files.
  • Idempotent Seeding: Demonstrates how to write INSERT statements that can be run multiple times safely using ON CONFLICT.
  • Deferred Seeding: Explains patterns for seeding data that depends on user signups or other dynamic elements.
  • Use Case: You need to populate your Supabase project with initial reference data (e.g., product categories, user roles) and ensure that new users automatically get assigned to default organizations based on their email domain.

Quick Start

Use the supabase-seeding skill to apply migrations and seed data to your local Supabase project.

Frequently Asked Questions about supabase-seeding

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

FAQPage Schema
How do I seed data into a Supabase database without duplicating existing records?

To seed data into a Supabase database safely, use idempotent INSERT statements with ON CONFLICT clauses. This ensures your seed files can be run multiple times without creating duplicate records, maintaining data consistency across development and production environments.

What is the best way to separate database schema from seed data in Supabase?

Separating database schema from seed data in Supabase involves keeping structural changes in migration files while placing initial reference data in dedicated seed files. This pattern ensures consistency and reliability when populating databases across different environments.

How do I seed Supabase data that depends on user signups or dynamic elements?

Seeding Supabase data that depends on user signups requires deferred seeding patterns. This approach handles dynamic elements by waiting to populate data until the dependent event occurs, such as assigning new users to default organizations based on their email domain.

Can I use Supabase seeding to auto-join users to organizations based on their email domain?

Yes, Supabase seeding supports domain-based auto-joining by using deferred seeding patterns. This allows you to automatically assign new users to default organizations dynamically based on their email domain when they sign up.

Does Supabase seeding work for both local development and production environments?

Supabase seeding works for both local and production environments by applying consistent best practices. It emphasizes idempotent seeding techniques and schema separation to ensure reliable data population across your local Supabase project and live production setup.

Why should I use idempotent seeding techniques in Supabase?

Idempotent seeding techniques in Supabase prevent duplicate data errors by using ON CONFLICT in your SQL INSERT statements. This allows your database seed files to be executed repeatedly and safely without corrupting existing reference data.