How this skill is triggered — by the user, by Claude, or both
Slash command
/sage:stack-nextjs-supabaseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Layer 3 — Stack Composition**
Layer 3 — Stack Composition
Integration seams for Next.js App Router + Supabase. Covers the five critical integration points that neither Next.js docs nor Supabase docs adequately address together.
| Seam | What Goes Wrong |
|---|---|
| Dual Clients | Agents create one client — auth silently breaks across server/client boundary |
| Middleware Token Refresh | Agents skip middleware — users randomly get logged out on expired tokens |
| RLS as Authorization | Agents rely on Next.js middleware for auth — database is still publicly accessible |
| Typed Queries | Agents use untyped select('*') — typos are silent runtime errors |
| Server Actions | Agents build REST API routes for same-app mutations instead of using Server Actions |
L1: web (domain) + baas (backend domain)
L2: nextjs (framework) + react (framework)
L3: stack-nextjs-supabase (this pack — integration seams)
npx claudepluginhub xoai/sage --plugin sageIntegrates Next.js App Router with Supabase: dual-client auth, middleware token refresh, RLS policies, typed queries, and Server Actions.
Sets up Supabase Auth with Next.js App Router: browser/server clients, auth middleware for route protection and session refresh, and OAuth callback handling.
Implements Supabase clients for Next.js SSR server/client components, React/Vue SPAs, React Native mobile, serverless Edge Functions, and multi-tenant RLS/schema isolation.