Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

nextjs-supabase-auth

Skill by sickn33

Adds Supabase Auth to a Next.js App Router project. It covers Supabase clients, session refresh and route protection in middleware, OAuth callbacks, and login and logout Server Actions.

  • Score 87
  • 50k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install nextjs-supabase-auth

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/nextjs-supabase-auth ~/.claude/skills/nextjs-supabase-auth

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install nextjs-supabase-auth in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The nextjs-supabase-auth skill gives an AI assistant patterns for adding Supabase Auth to a Next.js App Router project. It includes browser and server Supabase clients built with @supabase/ssr, a middleware that refreshes sessions and redirects unauthenticated users away from /dashboard, and an OAuth callback route that exchanges a code for a session. It also shows login, logout and signup in Server Actions, and reading the user in a Server Component.

The source lists validation checks, such as flagging getSession() use instead of getUser(), missing callback routes and client-only route protection. It names related skills for database, routing and deployment work. It is aimed at developers building login and session handling in Next.js with Supabase. The source says these are separate fragments, not a complete auth deployment, so the trusted APP_ORIGIN, callback allowlist and package versions must be configured first.

Written from the project's SKILL.md and checked against it.

What it can do

  • Supabase client setupCreates browser and server Supabase clients using createBrowserClient and createServerClient.
  • Auth middlewareRefreshes sessions and redirects users without a session away from /dashboard routes.
  • Auth callback routeExchanges an OAuth code for a session and redirects to a validated next path.
  • Server Action authProvides signIn and signOut Server Actions that revalidate paths and redirect.
  • Get user in Server ComponentReads the signed-in user with getUser() and redirects to /login when none exists.
  • Validation checksFlags getSession() for auth checks, missing callback routes and client-only route protection.
  • Delegation triggersPoints database, routing, deployment and UI work to related skills.

What you need

  • Next.js App Router project
  • Supabase project
  • @supabase/ssr package
  • NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY environment variables
  • APP_ORIGIN environment variable
  • nextjs-app-router and supabase-backend skills

Try asking

  • Add Supabase email login and a logout action to my Next.js app
  • Protect my /dashboard route with Supabase Auth middleware in Next.js
  • Set up an OAuth callback route for Google sign-in with Supabase

Good to know

  • The source describes separate-file fragments, not a complete auth deployment.
  • Server Components cannot write cookies, according to the source notes.
  • Middleware is not the sole authorization layer; the source says to enforce RLS and check sessions on server paths.
  • Trusted APP_ORIGIN, callback allowlist and exact versions must be configured first.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/nextjs-supabase-auth/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md9 KB

Alternatives to nextjs-supabase-auth

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

nextjs-supabase-auth: common questions

Does this skill use getSession() or getUser() for auth checks?

The source warns that getSession() does not verify the JWT. The skill uses getUser() for secure checks and flags getSession() as an error.

Does it cover OAuth sign-in with providers like Google or GitHub?

Yes. The source includes an auth callback route for OAuth providers such as Google and GitHub, which exchanges the code for a session.

Which other skills does it depend on?

The source lists nextjs-app-router and supabase-backend as required prerequisite skills.

How do I install nextjs-supabase-auth?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is nextjs-supabase-auth free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is nextjs-supabase-auth safe to use?

It scores 87 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to nextjs-supabase-auth?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

nextjs-supabase-auth Install

Add to stack

Loading.