supabase-patterns

Consolidate Supabase server and client patterns for authentication, sessions, and RLS-aware data access.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/vassovass/scl-v3 --skill supabase-patterns-vassovass
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-patterns
Source: https://github.com/vassovass/scl-v3/tree/main/.claude/skills/supabase-patterns
Command: npx skills add https://github.com/vassovass/scl-v3 --skill supabase-patterns-vassovass

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

StepLeague apps rely on consistent, secure patterns for using Supabase across server and client code. This Skill provides proven MCP server usage patterns, safe authentication workflows, and clear guidance for when to use the admin client and how to handle sessions with RLS in API routes.

Core Features & Use Cases

  • MCP Server access patterns for migrations, table management, and verification
  • Safe auth patterns and deadlock prevention (getUser on server, avoid getSession on client)
  • Guidance on using adminClient to bypass RLS in API routes while preserving security
  • Session handling and caching patterns for long-running operations
  • Clear differentiation between server components (admin scripts) and client patterns

Quick Start

Install or import the adminClient in your API route, perform a sample insert using adminClient, and verify RLS bypass works with a test user.

Frequently Asked Questions about supabase-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent authentication deadlocks when using Supabase across server and client code?

Authentication deadlocks occur when getSession is called on the client side instead of the server. Use getUser on the server and avoid getSession on the client to maintain safe session handling. This Skill consolidates proven patterns that eliminate this common pitfall in Supabase applications.

When should I use the admin client to bypass RLS in Supabase API routes?

Use the admin client in API routes when you need to perform operations that should bypass row-level security constraints while preserving data security. This Skill provides guidance on adminClient usage patterns that maintain security boundaries between server and client operations.

How do I implement safe Row-Level Security patterns across Supabase server and client components?

Safe RLS-aware data access requires clear separation between server components using admin patterns and client-side operations with authenticated users. This Skill covers session handling, caching patterns, and differentiation between server and client contexts to keep RLS enforcement consistent.

What are the best practices for using Supabase with MCP servers for migrations and table management?

MCP server access patterns provide safe methods for migrations, table management, and verification without external tooling. This Skill consolidates these patterns within standard Supabase client libraries and internal codebase practices.

Can I use Supabase patterns for long-running operations without losing session state?

Yes. Session caching and handling patterns designed for long-running operations prevent state loss while maintaining RLS compliance. This Skill documents proven session management techniques that scale reliably in production applications.