Agent skill · software engineering · jeremylongshore
clerk-install-auth
Install and configure Clerk SDK/CLI authentication.
Why this skill is useful
Provides specific installation and configuration steps for the Clerk SDK that are not widely known or documented.
What it needs
Requires node installed locally. Requires clerk account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Clerk Install & Auth Overview Set up Clerk SDK and configure authentication for Next.js, React, or Express. This skill covers SDK installation, environment variables, ClerkProvider, middleware, and initial auth verification. Prerequisites Node.js 18+ Package manager (npm, pnpm, or yarn) Clerk account at dashboard.clerk.com Publishable Key (pktest) and Secret Key (sktest) from Clerk Dashboard > API Keys Instructions Step 1: Install SDK for Your Framework Step 2: Configure Environment Variables Ensure .env.local is in .gitignore: Step 3: Add ClerkProvider (Next.js App Router) Step 4: Add Middleware Step 5: Create Sign-In and Sign-Up Pages Step 6: Verify Connection React SPA Setup (Vite) Express Setup Error Handling Error Cause Solution ------- ------- ---------- Missing publishableKey Env var not set Add NEXTPUBLICCLERKPUBLISHABLEKEY to .env.local ClerkProvider must wrap your application Hook used outside provider Ensure ClerkProvider wraps root layout auth() was called but Clerk can't detect clerkMiddleware() Middleware not running Place middleware.ts at project root, check matcher Module not found: @clerk/nextjs Package not installed Run npm install @clerk/nextjs 500 error on all pages CLERKSECRETKEY missing or wrong Verify key prefix matches environment (sktest for dev) Enterprise Considerations Use separate Clerk instances per environment (dev/staging/prod) Store keys in platform secrets (Vercel, AWS Secrets Manager), never in .env files committed to git The CLERKSECRETKEY must never be exposed client-side; only NEXTPUBLICCLERKPUBLISHABLEKEY is safe for browsers For monorepos, install @clerk/nextjs only in the app that needs it; use @clerk/backend for shared server packages Enable Clerk's "Enhanced email deliverability" in production for reliable transactional emails Resources Next.js Quickstart React Quickstart Express Quickstart Clerk Dashboard Next Steps Proceed to clerk-hello-world for your first authenticated request. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/clerk-install-auth