Confirm successful installation by checking the skill directory location:
.cursor/skills/supabase
Restart Cursor to activate supabase. Access via /supabase in your agent's command palette.
β
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
# In your project directorysupabase init
# Creates:# supabase/# βββ config.toml # Local config# βββ seed.sql # Seed data# βββ migrations/ # SQL migrations
Link to Remote
# Get project ref from dashboard URL: https://supabase.com/dashboard/project/<ref>supabase link --project-ref <project-id># Pull existing schemasupabase db pull
Start Local Stack
supabase start
# Output:# API URL: http://localhost:54321# GraphQL URL: http://localhost:54321/graphql/v1# DB URL: postgresql://postgres:postgres@localhost:54322/postgres# Studio URL: http://localhost:54323# Anon key: eyJ...# Service role key: eyJ...
Migration Workflow
Option 1: Dashboard + Diff (Quick Prototyping)
# 1. Make changes in local Studio (localhost:54323)# 2. Generate migration from diffsupabase db diff-f<migration_name># 3. Review generated SQLcat supabase/migrations/*_<migration_name>.sql
# 4. Reset to testsupabase db reset
Option 2: Write Migrations Directly (Recommended)
# 1. Create empty migrationsupabase migration new create_users_table
# 2. Edit the migration file# supabase/migrations/<timestamp>_create_users_table.sql# 3. Apply locallysupabase db reset
Option 3: ORM Migrations (Best DX)
Use Drizzle (TypeScript) or SQLAlchemy (Python) - see framework-specific skills.
Deploy Migrations
# Push to remote (staging/production)supabase db push
# Check migration statussupabase migration list
Database Patterns
Enable RLS on All Tables
-- Always enable RLSALTERTABLEpublic.profiles ENABLEROWLEVEL SECURITY;-- Default deny - must create policiesCREATE POLICY "Users can view own profile"ONpublic.profiles
FORSELECTUSING(auth.uid()= id);
Common RLS Policies
-- Public readCREATE POLICY "Public read access"ONpublic.posts FORSELECTUSING(true);-- Authenticated users onlyCREATE POLICY "Authenticated users can insert"ONpublic.posts FORINSERTWITHCHECK(auth.role()='authenticated');-- Owner accessCREATE POLICY "Users can update own records"ONpublic.posts FORUPDATEUSING(auth.uid()= user_id);-- Admin access (using custom claim)CREATE POLICY "Admins have full access"ONpublic.posts FORALLUSING(auth.jwt()->>'role'='admin');
Link to auth.users
-- Profile table linked to authCREATETABLEpublic.profiles ( id UUID PRIMARYKEYREFERENCES auth.users(id)ONDELETECASCADE, username TEXTUNIQUENOTNULL, avatar_url TEXT, created_at TIMESTAMPTZ DEFAULTNOW());-- Auto-create profile on signupCREATEORREPLACEFUNCTIONpublic.handle_new_user()RETURNSTRIGGERAS $$
BEGININSERTINTOpublic.profiles (id, username)VALUES(NEW.id, NEW.email);RETURN NEW;END;$$ LANGUAGE plpgsql SECURITY DEFINER;CREATETRIGGER on_auth_user_created
AFTERINSERTON auth.users
FOR EACH ROWEXECUTEFUNCTIONpublic.handle_new_user();
Seed Data
supabase/seed.sql
-- Runs on `supabase db reset`-- Use ON CONFLICT for idempotencyINSERTINTOpublic.profiles (id, username, avatar_url)VALUES('d0e1f2a3-b4c5-6d7e-8f9a-0b1c2d3e4f5a','testuser',null),('a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d','admin',null)ON CONFLICT (id)DO NOTHING;
Environment Variables
Required Variables
# Public (safe for client-side)SUPABASE_URL=https://xxxxx.supabase.co
SUPABASE_ANON_KEY=eyJ...
# Private (server-side only - NEVER expose)SUPABASE_SERVICE_ROLE_KEY=eyJ...
DATABASE_URL=postgresql://postgres.[ref]:[password]@aws-0-region.pooler.supabase.com:6543/postgres
βΊAccess to product documentation and roadmap tools (Jira, Notion, etc.)
βΊUnderstanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
βΊStakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
1Install product management skill
2Start with user story generation for known feature
3Progress to competitive analysis: research 2-3 competitors
4Use for roadmap prioritization: apply RICE/ICE scoring
5Draft stakeholder communications and refine based on feedback
6Build template library for recurring PM tasks
7Share effective prompts with product team
Common Pitfalls
β Not validating competitive researchβverify facts before sharing
β Accepting user stories without involving engineering team
β Over-relying on frameworks without qualitative judgment
β Not customizing outputs to company culture and communication style
β Skipping stakeholder validation of generated requirements
Best Practices
β Do
+Validate research and competitive analysis with real data
+Collaborate with engineering when generating technical requirements
+Customize frameworks and templates to your company context
+Use skill for first drafts, refine with stakeholder input
+Document successful prompt patterns for PM tasks
+Combine AI efficiency with human judgment and intuition
β Don't
βDon't publish competitive analysis without fact-checking
βDon't finalize user stories without engineering review
βDon't make prioritization decisions solely on AI scoring
βDon't skip customer validation of generated requirements
βDon't ignore company-specific context and culture
π‘ Pro Tips
β Provide context: company goals, constraints, customer feedback
β Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
β Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
β Use skill for 70% generation + 30% customization to company needs
When to Use This
β Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
β Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path
1Basic: user stories, feature specs, status updates