What problem does it solve? Building secure server-side auth endpoints in a Next.js + Supabase SSR stack requires repetitive boilerplate for cookie handling, session checks, and error responses. This Skill generates consistent, production-patterned auth routes (login, logout, callback, user) so you avoid re-implementing the same logic and making auth mistakes. ## Core Features & Use Cases - Auth Route Generation: Creates app/api/auth/ routes for login (signInWithPassword), logout (signOut), OAuth/magic-link callback code exchange, and current-user session retrieval. - DaaS-Compatible Patterns: Provides reference implementations for REST endpoints with DaaS-style query parameters (fields, filter, sort, limit, offset, aggregate), Zod validation, and standardized { data } / { errors } response formats. - Authorization Enforcement: Reference guides cover permission enforcement via enforcePermission(), field-level access control, item-level filters, and a reusable error handler mapping Supabase/Postgres error codes to HTTP statuses. - Use Case: You need a login endpoint for your Supabase-backed Next.js app. Invoke this Skill to scaffold app/api/auth/login/route.ts with proper SSR cookie handling, auth checks, and tests. ## Quick Start Ask the assistant to create a Supabase login API route for your Next.js app using this skill.