
Clerk Nextjs Skills
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-codeInstalls into .claude/skills of the current project.
Files
Links
- Clerk Next.js Quickstart
- Clerk MCP Server Guide
- Clerk Next.js SDK Reference
- clerkMiddleware() Reference
- Reading User Data
- Protecting Routes
- OAuth Token Verification
- Clerk Dashboard
- @vercel/mcp-adapter
- @clerk/mcp-tools
- MCP Example Repository
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