What problem does it solves?
This Skill automates the complex and error-prone process of implementing data services, designing optimized database schemas, and configuring high-performance Row Level Security (RLS) policies in Supabase/PostgreSQL. It ensures security, performance, and architectural best practices, eliminating hours of manual configuration and debugging.
Core Features & Use Cases
- Optimized Schema Design: Creates database schemas with proper multi-tenancy, indexes (critical for RLS), constraints, and auto-update triggers.
- Secure RLS Policy Implementation: Configures Row Level Security policies following best practices to prevent circular dependencies, optimize performance, and ensure multi-tenant data isolation.
- Pure Data Services: Implements CRUD (Create, Read, Update, Delete) data services with
snake_case ↔ camelCase transformations and robust error handling, ensuring no business logic leaks into the data layer.
- TypeScript Type Generation: Automates the generation and validation of TypeScript types directly from your Supabase schema for end-to-end type safety.
- Use Case: After use cases are defined, this Skill designs the
tasks table schema, implements RLS policies to ensure users only access their organization's tasks, creates a TaskService for CRUD operations, and generates TypeScript types, all while making existing service tests pass.
Quick Start
1. Start with mandatory Context7 research:
mcp__context7__get_library_docs({
context7CompatibleLibraryID: "/supabase/supabase",
topic: "RLS row level security policies performance joins security definer circular",
tokens: 3000
})
2. Then, proceed through the 6-phase workflow for schema, RLS, and services.