# Supabase Schema Designer

> Use when designing PostgreSQL tables, enums, relationships, migrations, storage metadata, or tenant-aware schema structures for a Supabase-backed app. Trigger on requests about Supabase schema planning or SQL-first data design.

- Skill: `saranskumar/supabase-schema-designer` (Agent Skill)
- Install (CLI): `npx skillmds@latest add saranskumar/supabase-schema-designer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/saranskumar/supabase-schema-designer/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: saranskumar (https://skillmd.com/u/saranskumar)
- Updated: 2026-08-19
- Page: https://skillmd.com/skills/saranskumar/supabase-schema-designer

---


# Goal
Design a Supabase-friendly schema that works with auth, RLS, and migration-based development.

# When to Use
- The app will use Supabase Postgres.
- Core entities and permissions are known enough to model.
- The team wants schema guidance before migrations are written.

# Instructions
1. Define entities, tenant boundaries, and user ownership rules.
2. Design tables, enums, relationships, and lifecycle fields.
3. Note where `auth.users` joins, profile tables, and membership tables are needed.
4. Plan migration order and indexes.
5. Flag RLS-sensitive tables for follow-up policy design.

# Constraints
- Prefer explicit join tables and memberships over magic JSON blobs.
- Do not rely on dashboard-only manual schema edits.
- Keep auth and app data linked deliberately.

# Output Format
- Schema overview
- Table sketches
- Relationship notes
- Migration notes
- RLS follow-ups

# Examples
- "Design a Supabase schema for a team-based analytics app."
- "What tables do we need for subscriptions and AI usage history?"

