This gets Clerk authentication running in Next.js 16 with the App Router, handling the proxy.ts migration from the old middleware.ts pattern. The skill covers the full setup from installing dependencies and configuring environment variables to protecting routes and reading user data in both client and server components. It also walks through building an MCP server with Clerk auth using @vercel/mcp-adapter and @clerk/mcp-tools, which is useful if you're building AI agents that need authenticated access to your Next.js app. The matcher config and route protection patterns are spelled out clearly, so you won't waste time figuring out why your auth isn't firing on certain routes.

skills.sh installs
438
GitHub stars
23
last updated
Aug 21, 2026

Install

$ npx -y skills add gocallum/nextjs16-agent-skills --skill clerk-nextjs-skills --agent claude-code

Installs into .claude/skills of the current project.

Files

Links

Quick Start

1. Install Dependencies (Using pnpm)

pnpm add @clerk/nextjs
# For MCP server integration, also install:
pnpm add @vercel/mcp-adapter @clerk/mcp-tools

2. Create proxy.ts (Next.js 16)

The proxy.ts file replaces middleware.ts from Next.js 15. Create it at the root or in /src:

Sponsors

Details

Repository
github.com/gocallum/nextjs16-agent-skills
Categories
Frontend Development, Backend & APIs, Security, AI & Agent Building
First seen
Jun 3, 2026

More from gocallum/nextjs16-agent-skills

All 9
1pproenca avatarreact-testing-librarypproenca/dot-skillsReact Testing Library best practices for writing maintainable, user-centric tests. Use when writing, reviewing, or refactoring RTL tests. Triggers on test files418skills.sh installs
2vercel-labs avatarvercel-react-best-practicesvercel-labs/agent-evalReact and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js c408skills.sh installs
3ofershap avatartailwind-best-practicesofershap/tailwind-best-practicesStop your AI agent from generating Tailwind CSS v3 code. Rules for v4 syntax, CSS-first config, modern utility patterns, and common anti-patterns.405skills.sh installs
4secondsky avatarnuxt-coresecondsky/claude-skills| Nuxt 4 core framework fundamentals: project setup, configuration, routing, SEO, error handling, and directory structure. Use when: creating new Nuxt 4 project401skills.sh installs
5secondsky avatarnuxt-datasecondsky/claude-skills| Nuxt 4 data management: composables, data fetching with useFetch/useAsyncData, and state management with useState and Pinia. Use when: creating custom composa400skills.sh installs
6vercel-labs avatarjson-render-reactvercel-labs/json-renderReact renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating com391skills.sh installs