What problem does it solve?
Supabase integration often yields never types or brittle inferences that cause compile-time or runtime issues. This skill regenerates strict, auto-generated Supabase types to enforce type-safety across the Database interface and DTOs.
Core Features & Use Cases
- Wrapper types for Tables, Insert, and Update DTOs to simplify access to the generated Database interface, for example:
export type Tables<T extends keyof Database['public']['Tables']> = Database['public']['Tables'][T]['Row'];
export type InsertDto<T extends keyof Database['public']['Tables']> = Database['public']['Tables'][T]['Insert'];
export type UpdateDto<T extends keyof Database['public']['Tables']> = Database['public']['Tables'][T]['Update'];
- Strategies to handle never by using Wrapper Casts and Builder Casts to avoid type errors when fields are optional or missing.
- Real-world use: improves type-safety in TypeScript projects using Supabase client APIs by ensuring strict table DTO shapes.
Quick Start
Use the supabase-type-migrator workflow to regenerate and align Supabase types in your project.