Database Setup
Includes RLS policies, indexes, and type generation alongside table definitions. This produces a secure, performant database setup instead of just bare table creation.
Set up the Supabase database for this application:\n\nTables:\n1. {{table_1}}\n - id (UUID, primary key, auto-generated)\n - {{table_1_fields}}\n - user_id (UUID, foreign key to auth.users)\n - created_at (timestamp with timezone, default now())\n - updated_at (timestamp with timezone)\n\n2. {{table_2}}\n - id (UUID, primary key, auto-generated)\n - {{table_2_fields}}\n - {{table_1}}_id (UUID, foreign key)\n - created_at, updated_at\n\nRow Level Security:\n- Users can only read/write their own {{table_1}} rows (WHERE user_id = auth.uid())\n- Users can read/write {{table_2}} rows that belong to their {{table_1}}\n\nIndexes: Add indexes on user_id, {{table_1}}_id, and any field used for sorting or filtering.\n\nGenerate the corresponding TypeScript types and Supabase query functions for CRUD operations on each table.
Variables to customize
Why this prompt works
Includes RLS policies, indexes, and type generation alongside table definitions. This produces a secure, performant database setup instead of just bare table creation.
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
Forcing the agent to plan before acting prevents premature execution and wasted steps. Explicit dependency mapping enables parallel execution and catches logical gaps early.
Tool Selection AgentThe ReAct pattern (Reason + Act) creates an explicit reasoning trace that improves tool selection accuracy. The error-handling rule prevents infinite retry loops.
Prompt CompressorExplicitly requiring all functional requirements to be preserved prevents the model from over-compressing and losing critical instructions.
Memory Management AgentExplicit memory read/write instructions create agents that improve over time. Categorization keeps memories organized, and the deduplication rule prevents context bloat.