nextjs-supabase-auth

nextjs-supabase-auth is a skill for Claude Code, Codex from tmolavi/mcp-agent-skills-hub. It costs 18 tokens per session (1,839 once invoked), scanned A, original, MIT.

A guide to adding Supabase Auth, a hosted user sign-in system, to a Next.js application using its App Router.

In plain words
What is it for?
Use it when setting up sign-up, sign-in, session handling, authentication callbacks, or protected routes in Next.js with Supabase.
Why use it?
It helps connect browser and server code correctly and protect pages and actions that require a signed-in user.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when setting up sign-up, sign-in, session handling, authentication callbacks, or protected routes in Next.js with Supabase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmolavi/mcp-agent-skills-hub/nextjs-supabase-auth
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tmolavi/mcp-agent-skills-hub --skill nextjs-supabase-auth
Clone the repo
git clone --depth 1 https://github.com/tmolavi/mcp-agent-skills-hub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nextjs-supabase-auth

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmolavi/mcp-agent-skills-hub/nextjs-supabase-auth/github.svg)](https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/nextjs-supabase-auth)
Your own site
<a href="https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/nextjs-supabase-auth"><img src="https://agentmods.dev/badge/skills/tmolavi/mcp-agent-skills-hub/nextjs-supabase-auth/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nextjs-supabase-auth

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmolavi/mcp-agent-skills-hub/nextjs-supabase-auth"><img src="https://agentmods.dev/badge/skills/tmolavi/mcp-agent-skills-hub/nextjs-supabase-auth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,839 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.01839
Opus 5 $0.00009 $0.00920
Sonnet 5 $0.00004 $0.00368
Haiku 4.5 $0.00002 $0.00184

Measured 8d ago against content hash 82bbd17e1a31, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

nextjs-supabase-auth scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/nextjs-supabase-auth/SKILL.md · 314 lines

How it starts

The opening of the file, as written. The whole thing — 314 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Next.js + Supabase Auth

Expert integration of Supabase Auth with Next.js App Router

Capabilities

  • nextjs-auth
  • supabase-auth-nextjs
  • auth-middleware
  • auth-callback

Prerequisites

  • Required skills: nextjs-app-router, supabase-backend

Patterns

Supabase Client Setup

Create properly configured Supabase clients for different contexts

When to use: Setting up auth in a Next.js project

// lib/supabase/client.ts (Browser client) 'use client' import { createBrowserClient } from '@supabase/ssr'

export function createClient() { return createBrowserClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY! ) }

// lib/supabase/server.ts (Server client) import { createServerClient } from '@supabase/ssr' import { cookies } from 'next/headers'

export async function createClient() { const cookieStore = await cookies() return createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!, { cookies: { getAll() { return cookieStore.getAll() }, setAll(cookiesToSet) { cookiesToSet.forEach(({ name, value, options }) => { cookieStore.set(name, value, options) }) }, }, } ) }

Auth Middleware

Protect routes and refresh sessions in middleware

When to use: You need route protection or session refresh

// middleware.ts import { createServerClient } from '@supabase/ssr' import { NextResponse, type NextRequest } from 'next/server'

export async function middleware(request: NextRequest) { let response = NextResponse.next({ request })

const supabase = createServerClient( process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!, { cookies: { getAll() { return request.cookies.getAll() }, setAll(cookiesToSet) { cookiesToSet.forEach(({ name, value, options }) => { response.cookies.set(name, value, options) }) }, }, } )

Read the full file on GitHub · 314 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 314 lines · 18 tokens per session scan A 82bbd17e1a31

Subscribe to this mod's changes

nextjs-supabase-auth is a skill published in the GitHub repository tmolavi/mcp-agent-skills-hub (8 stars, last pushed 16d ago), licensed MIT. It adds 18 tokens to every session and 1,839 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fullstack-coder

Full-stack implementation agent that writes complete, production-ready code following an approved architecture and schema. Triggers on: write the code, implement features, build the app, code the MVP, generate codebase.

Aizaz-Noor/Agent-Startup-Skills · 46 tokens

nextjs-app-router-patterns

Master Next.js 14+ App Router with Server Components, streaming, parallel routes, and advanced data fetching. Use when building Next.js applications, implementing SSR/SSG, or optimizing React Server Components.

rmyndharis/antigravity-skills · 48 tokens

dev-engineer

Adds logic, state management, TypeScript types, and CRUD operations to UI. Works AFTER ui-first-builder creates the interface. Implements Zustand stores, form handling with React Hook Form + Zod, and prepares for backend connection. Triggers: add logic, add functionality, make it work, state management, form…

wasintoh/toh-framework · 75 tokens

spa-orchestrator

Orchestrates Single-Page Application (SPA) architecture, integrating frontend state management with API-driven backends / Mengorkestrasi arsitektur Single-Page Application (SPA), mengintegrasikan state management frontend dengan backend berbasis API.

roedyrustam/vibes-plug · 53 tokens

multiple-entry-points

Expert guide for designing and implementing Multiple Entry Points architecture in web applications / Panduan ahli untuk merancang dan mengimplementasikan arsitektur Multiple Entry Points pada aplikasi web.

roedyrustam/vibes-plug · 39 tokens

realtime-collaboration-expert

Expert guide for building real-time collaboration features using WebSockets, WebRTC, CRDTs (Yjs, Automerge), and Liveblocks / Panduan ahli untuk fitur kolaborasi real-time.

roedyrustam/vibes-plug · 48 tokens