Agent SkillsAgent Skills
danmarauda

supabase-to-convex-migration

@danmarauda/supabase-to-convex-migration
danmarauda
0
0 forks
Updated 3/31/2026
View on GitHub

Migrate ANY Supabase project to Convex with exact feature/design/architecture parity. Complete database schema translation, function migration, authentication, real-time queries, RLS replacement, and storage migration. Use when converting Supabase backends to Convex or planning Supabase-to-Convex migrations.

Installation

$npx agent-skills-cli install @danmarauda/supabase-to-convex-migration
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Repositorydanmarauda/pro
Pathnext-prisma-authjs/.claude/skills/supabase-to-convex-migration/SKILL.md
Branchmonorepo
Scoped Name@danmarauda/supabase-to-convex-migration

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: supabase-to-convex-migration description: Migrate ANY Supabase project to Convex with exact feature/design/architecture parity. Complete database schema translation, function migration, authentication, real-time queries, RLS replacement, and storage migration. Use when converting Supabase backends to Convex or planning Supabase-to-Convex migrations. allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task, WebSearch, WebFetch

Supabase to Convex Migration Skill

Overview

This skill provides systematic, comprehensive guidance for migrating any Supabase project to Convex with exact feature parity. Every Supabase capability is mapped to its Convex equivalent.

Core Promise: After migration, your application will have identical functionality, improved real-time performance, and type-safe backend operations.

When to Use This Skill

Use this skill when:

  • Planning or executing a Supabase β†’ Convex migration
  • Need to translate PostgreSQL schemas to Convex tables
  • Converting Supabase Edge Functions to Convex functions
  • Replacing RLS policies with Convex permission checks
  • Migrating Supabase Auth to Convex Auth
  • Setting up real-time subscriptions (Convex native)
  • Converting Supabase Storage to Convex file storage
  • Validating migration completeness

Feature Parity Matrix

Supabase FeatureConvex EquivalentMigration Complexity
PostgreSQL TablesConvex Tables (schema.ts)Medium
Row Level Security (RLS)Server-side auth checksHigh
Edge FunctionsConvex Functions (query/mutation/action)Medium
Realtime SubscriptionsNative reactive queriesLow
Auth (email/OAuth)Convex Auth / custom authMedium
Storage (buckets)Convex File StorageMedium
Database FunctionsConvex internal functionsMedium
TriggersScheduled functions / hooksMedium
Foreign KeysDocument references + indexesLow
ViewsQuery functionsLow
RPC endpointsPublic mutations/actionsLow

Migration Phases Overview

Phase 1: Audit & Discovery

  • Extract complete Supabase schema
  • Document all RLS policies
  • List Edge Functions and triggers
  • Map auth flows
  • Identify storage usage

Phase 2: Schema Translation

  • Convert PostgreSQL types to Convex validators
  • Design table relationships
  • Create indexes for query patterns
  • Plan data transformation

Phase 3: Function Migration

  • Convert Edge Functions to Convex functions
  • Translate SQL queries to Convex queries
  • Implement RLS as permission checks
  • Set up scheduled functions

Phase 4: Authentication Migration

  • Configure Convex Auth
  • Migrate user data
  • Update client auth flow
  • Test OAuth providers

Phase 5: Data Migration

  • Export Supabase data
  • Transform to Convex format
  • Bulk import with validation
  • Verify data integrity

Phase 6: Storage Migration

  • Export files from Supabase Storage
  • Upload to Convex File Storage
  • Update file references
  • Verify access controls

Phase 7: Client Integration

  • Update Supabase client calls to Convex
  • Implement reactive queries
  • Test real-time updates
  • Update error handling

Phase 8: Testing & Deployment

  • Comprehensive test coverage
  • Performance benchmarks
  • Staged rollout
  • Monitoring setup

Quick Reference: Type Mappings

// Supabase PostgreSQL β†’ Convex Validators
text/varchar       β†’ v.string()
integer/bigint     β†’ v.number() or v.int64()
boolean            β†’ v.boolean()
uuid               β†’ v.id("tableName") or v.string()
timestamp/timestamptz β†’ v.number() (Unix ms)
jsonb              β†’ v.any() or v.object({...})
array              β†’ v.array(v.type())
numeric/decimal    β†’ v.number() or v.float64()
bytea              β†’ v.bytes()

Detailed Guidance

See PHASES.md for step-by-step phase execution See CHECKLISTS.md for comprehensive migration checklists See REFERENCE.md for code examples and conversion patterns

Critical Success Factors

  1. Complete Schema Audit - Miss nothing from Supabase
  2. RLS Parity - Every policy must have Convex equivalent
  3. Data Integrity - Zero data loss, verified checksums
  4. Auth Continuity - Users seamlessly authenticate
  5. Real-time Parity - All subscriptions working
  6. Performance Baseline - Meet or exceed Supabase latency

Execution Command

To start migration, use:

/migrate-to-convex [phase-name]

Or ask: "Help me migrate my Supabase project to Convex"