CtrlK
BlogDocsLog inGet started
Tessl Logo

auth0-nextjs

Use when adding authentication to Next.js applications with both server and client-side auth - supports App Router and Pages Router with @auth0/nextjs-auth0 SDK

Install with Tessl CLI

npx tessl i github:auth0/agent-skills --skill auth0-nextjs
What are skills?

86

1.08x

Does it follow best practices?

Evaluation100%

1.08x

Agent success when using this skill

Validation for skill structure

SKILL.md
Review
Evals

Evaluation results

100%

8%

Add Auth0 Authentication to a New Next.js Application

V4 SDK setup and environment configuration

Criteria
Without context
With context

Correct SDK package

100%

100%

Auth0Client import path

100%

100%

lib/auth0.ts location

100%

100%

APP_BASE_URL env var

100%

100%

AUTH0_DOMAIN no scheme

100%

100%

Correct env file

100%

100%

.gitignore entry

100%

100%

AUTH0_SECRET generation

100%

100%

Regular Web Application type

100%

100%

v4 callback URL

100%

100%

Auth0Client constructor fields

0%

100%

No deprecated env vars

100%

100%

Without context: $0.3697 · 1m 44s · 22 turns · 79 in / 5,675 out tokens

With context: $0.5136 · 1m 49s · 28 turns · 888 in / 5,912 out tokens

100%

Protect Internal Dashboard Routes with Authentication Middleware

Middleware route protection configuration

Criteria
Without context
With context

Middleware file location

100%

100%

Correct function name

100%

100%

Calls auth0.middleware()

100%

100%

Correct matcher pattern

100%

100%

v4 login route in redirect

100%

100%

Session check uses getSession

100%

100%

Auth routes pass-through

100%

100%

Auth0Client imported from server

100%

100%

returnTo parameter

100%

100%

No /api/auth/* references

100%

100%

Without context: $0.2455 · 1m 19s · 12 turns · 17 in / 4,028 out tokens

With context: $0.3177 · 57s · 15 turns · 5,075 in / 2,922 out tokens

100%

16%

Build an Authenticated User Profile and Data Dashboard

Server-side session and API route patterns

Criteria
Without context
With context

getSession() no args (App Router)

100%

100%

No withPageAuthRequired

100%

100%

No withApiAuthRequired

100%

100%

useUser() client-only

100%

100%

getSession() for server auth check

100%

100%

getAccessToken() for external API

100%

100%

Redirect to /auth/login

0%

100%

Auth0Client from server import

0%

100%

useUser() import path

100%

100%

Auth0Provider optional

100%

100%

401 for unauthenticated API

100%

100%

Without context: $0.4068 · 1m 53s · 22 turns · 28 in / 6,520 out tokens

With context: $0.7885 · 2m 20s · 36 turns · 2,347 in / 6,989 out tokens

Evaluated
Agent
Claude Code
Model
Unknown

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.