SKILL

clerk-auth

Expert patterns for Clerk auth implementation, middleware, organizations, webhooks, and user sync Use when: adding authentication, clerk auth, user authentication, sign in, sign up.

Target: Target not categorized. Automatically collected · unverified.

Excerpt from the author’s documentation

Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.

Read the original English text

Topics in the source

  • Clerk Authentication
  • Patterns
  • Next.js App Router Setup
  • Middleware Route Protection
  • Server Component Authentication
  • ⚠️ Sharp Edges

Complete Clerk setup for Next.js 14/15 App Router. Includes ClerkProvider, environment variables, and basic sign-in/sign-up components. Key components: ClerkProvider: Wraps app for auth context , : Pre-built auth forms : User menu with session management Protect routes using clerkMiddleware and createRouteMatcher. Best practices: Single middleware.ts file at project root Use createRouteMatcher for route groups auth.protect() for explicit protection Centralize all auth logic in middleware Access auth state in Server Components using auth() and currentUser(). Key functions: auth(): Returns userId, sessionId, orgId, claims currentUser(): Returns full User object Both require clerkMiddleware to be configured | Issue | Severity | Solution | |-------|----------|----------| | Issue | critical | See docs | | Issue | high | See docs | | Issue | high | See docs | | Issue | high | See docs | | Issue | medium | See docs | | Issue | medium | See docs | | Issue | medium | See docs | | Issue | medium | See docs |

Source repository
davila7/claude-code-templates
Source file
cli-tool/components/skills/development/clerk-auth/SKILL.md
Fixed revision
21be197f100a12b8d0dd9a211cc244c8179f84d3
Read the complete original documentation ↗

Sources and evidence

This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.

Author: davila7/claude-code-templates · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:44.186Z.

Categories are inferred from names, descriptions and paths. They do not establish compatibility.

License and attribution

MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.

Original license ↗

Synchronization, copying and user-reported success do not mark a resource as runtime-tested.

Limitations and notes

  • Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.