clerk-auth - Add Clerk authentication to Next.js apps
Implements Clerk authentication for Next.js App Router apps, including protected routes, organizations, webhooks, and database user sync.
Tags
Updated: 2026-10-08Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Configure Clerk in App Router
- Protect routes with middleware
- Authenticate server components
- Use client authentication hooks
- Manage organizations and permissions
- Handle auth webhooks and user sync
Inputs
- Next.js App Router project
- Clerk project credentials
- Authentication route configuration
- Protected route patterns
- Organization roles and permissions
- Database connection details
- Webhook synchronization requirements
Outputs
- Clerk authentication setup files
- Protected route middleware
- Sign-in and sign-up pages
- Organization management components
- Authentication webhook handlers
- Synced user records
Requirements
- Next.js 14 or 15 App Router
- Clerk Next.js package
- Clerk project and API keys
- Configured clerkMiddleware
- Database access for user sync
