clerk-setup

Detect the framework and apply Clerk authentication configuration.

66|4|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/clerk/skills --skill clerk-setup-clerk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-setup
Source: https://github.com/clerk/skills/tree/main/skills/core/clerk-setup
Command: npx skills add https://github.com/clerk/skills --skill clerk-setup-clerk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many projects lack a clear, framework-aware process to add production-ready authentication. This Skill reduces manual research and repetitive setup by detecting the framework, fetching the official Clerk quickstart, and applying the required configuration so developers can get authentication working reliably.

Core Features & Use Cases

  • Framework detection: Reads package.json to identify Next.js, Remix, Astro, Nuxt, React SPA, Expo, Express, and others.
  • Quickstart automation: Fetches the official Clerk quickstart for the detected framework and guides or applies steps such as installing SDKs, adding providers, creating proxy or middleware files, and configuring publishable and secret environment variables.
  • Migration and theming guidance: Provides audit and migration recommendations for existing auth systems and applies shadcn/ui theming when components.json is present.
  • Use Case: Add Clerk to a new Next.js app with the app router and Tailwind, or secure Express API routes while keeping public endpoints open.

Quick Start

Use the clerk-setup skill to detect the project's framework, fetch the appropriate Clerk quickstart, and apply the recommended installation, middleware, and environment variable configuration to the target project.

Frequently Asked Questions about clerk-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Clerk authentication to my Next.js or Express project?

To add Clerk authentication, the skill detects your framework from package.json, fetches the official quickstart, and applies SDK installation, middleware, and environment variable configuration automatically. It supports Next.js, Remix, Astro, Nuxt, Express, and Expo.

Does Clerk setup work with React SPA, Expo, and Nuxt frameworks?

Yes, Clerk setup works with React SPAs, Expo, and Nuxt, alongside Next.js, Remix, Astro, and Express. It reads your package.json to detect the framework and applies the corresponding quickstart patterns for that specific platform.

How do I configure Clerk environment variables for publishable and secret keys?

Configuring Clerk environment variables is handled automatically during setup. The skill provisions your publishable and secret keys into the environment configuration files required by your detected framework's official quickstart documentation.

Can I apply Clerk middleware to secure API routes while keeping public endpoints open?

Yes, you can secure API routes while keeping public endpoints open. The skill creates the required proxy or middleware files based on your framework's specific quickstart patterns to manage route protection effectively.

Does Clerk authentication setup integrate with shadcn/ui theming?

Yes, Clerk setup integrates with shadcn/ui theming when a components.json file is present in your project. It detects the configuration and applies the appropriate theming adjustments alongside the authentication middleware.

What is the best way to migrate an existing auth system to Clerk?

The best way to migrate an existing auth system to Clerk is using the skill's built-in audit and migration recommendations. It evaluates your current setup and guides you through applying the official Clerk quickstart configuration.