Skip to content
Back to skills

Supabase Expert

ASecurity

Use when building or debugging Supabase features — RLS policies, Auth flows, Storage rules, Edge Functions, and real-time subscriptions

  • 7 stars
  • 0 votes
  • 3 copies
  • 18 views
  • Added June 14, 2026
databasestypescriptsqldebuggingdatabasesecurityperformance

Works with

  • cli

Security analysis

A100/100

Scanned June 14, 2026

npx -y skills add fratilanico/apex-os-bad-boy --skill supabase-expert --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Supabase Expert?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Supabase Expert
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fratilanico-supabase-expert/badge)](https://www.skillsdirectory.com/skills/fratilanico-supabase-expert)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: supabase-expert
description: Use when building or debugging Supabase features — RLS policies, Auth flows, Storage rules, Edge Functions, and real-time subscriptions
tier: HIGH
value_tier: production
tags: [supabase, postgresql, auth, rls, database]
entitlements: { product_tiers: [pro, enterprise], agent_access: [all] }
---

# Supabase Expert Skill

## Database Schema

### RLS Policies
```sql
-- Enable RLS
ALTER TABLE profiles ENABLE ROW LEVEL SECURITY;

-- Policy: Users can read own profile
CREATE POLICY "Users can view own profile"
ON profiles FOR SELECT
USING (auth.uid() = user_id);

-- Policy: Users can update own profile
CREATE POLICY "Users can update own profile"
ON profiles FOR UPDATE
USING (auth.uid() = user_id);
```

### Relationships
- Use foreign keys for all relationships
- Add indexes on frequently queried columns
- Consider partial indexes for permission filtering

## Authentication

### Secure Flow
```typescript
// Sign up with email confirmation
const { data, error } = await supabase.auth.signUp({
  email: 'user@example.com',
  password: 'secure-password',
  options: {
    emailRedirectTo: 'https://yoursite.com/auth/callback'
  }
})
```

### Session Management
```typescript
// Check current session
const { data: { session } } = await supabase.auth.getSession()

// Listen for auth changes
supabase.auth.onAuthStateChange((event, session) => {
  if (event === 'SIGNED_IN') {
    // Handle sign in
  }
})
```

## Edge Functions

### Deno Runtime
```typescript
import { serve } from 'https://deno.land/std@0.168.0/http/server.ts'
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'

serve(async (req) => {
  const supabase = createClient(Deno.env.get('SUPABASE_URL')!, Deno.env.get('SUPABASE_ANON_KEY')!)
  // Your logic here
})
```

## Storage

### Bucket Management
```typescript
// Upload file
const { data, error } = await supabase.storage
  .from('avatars')
  .upload('folder/filename', file)
```

## Real-time

### Subscribe to Changes
```typescript
const subscription = supabase
  .channel('custom-insert-channel')
  .on('postgres_changes', { 
    event: 'INSERT', 
    schema: 'public', 
    table: 'messages' 
  }, (payload) => {
    console.log('New message:', payload.new)
  })
  .subscribe()
```

## Performance

### Query Optimization
- Select only needed columns
- Use .single() for single row queries
- Implement pagination for large datasets
- Add proper indexes

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.