Lightlines
By clerk

clerk-nextjs-patterns

clerk

Build safer Clerk authentication into Next.js.

web authentication

What it does

Applies advanced Clerk authentication patterns to Next.js middleware, Server Actions, API routes, and caching.

When to use it

Use when implementing server or client authentication, middleware, protected actions, API authorization, or user-scoped caching.

How to use it

It changes how the agent implements Clerk authentication in a Next.js project, including which server and client APIs it uses.

What you provide

  • An existing project

Uses


Access · 0

No additional actions listed in the analysis.

What you need · 5

Requires the Clerk SDK for Next.js server APIs and client hooks.

Required for Clerk authentication; the files do not state how the skill obtains it.

Required for Clerk authentication; the files do not state how the skill obtains it.

Read from the environment for the optional manual JWT verification path using @clerk/backend.


About this skill

Visibility
Public
Repository
clerk/skills
Created
Oct 8, 2026
Updated
Oct 8, 2026
Files
12