What problem does it solve? Developers integrating Clerk into Next.js apps often struggle with server-vs-client auth APIs, unprotected Server Actions and API routes, misconfigured middleware matchers, and cache keys that leak data between users. This Skill provides correct, version-aware patterns for each of these scenarios. ## Core Features & Use Cases - Server vs Client Auth Guidance: Correct usage of await auth() from @clerk/nextjs/server versus useAuth()/useUser() hooks, including Core 2 vs current SDK differences. - Route & Mutation Protection: Middleware strategies (public-first vs protected-first with createRouteMatcher), Server Action protection, and API route auth with proper 401 vs 403 semantics. - Token & Caching Patterns: Custom JWT templates via getToken() for third-party APIs like Hasura or Supabase, manual JWT verification for standalone servers, and user-scoped unstable_cache keys. - Use Case: You need to protect all /dashboard routes with Clerk middleware while keeping / and /sign-in public, then call an external GraphQL API with a custom JWT from a Server Component. ## Quick Start Ask the AI to protect your Next.js dashboard routes with Clerk middleware and convert a client component using useUser into a server component using await auth().