clerk-multi-env-setup

Featured

Configure Clerk for multiple environments (dev, staging, production). Use when setting up environment-specific configurations, managing multiple Clerk instances, or implementing environment promotion. Trigger with phrases like "clerk environments", "clerk staging", "clerk dev prod", "clerk multi-environment".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Clerk Multi-Environment Setup ## Overview Configure Clerk across development, staging, and production environments with separate instances, environment-aware configuration, and safe promotion workflows. ## Prerequisites - Clerk account (one instance per environment recommended) - CI/CD pipeline (GitHub Actions, Vercel, etc.) - Environment variable management in place ## Instructions ### Step 1: Create Clerk Instances Create separate Clerk instances in the Dashboard for each environment: | Environment | Instance | Key Prefix | Domain | |-------------|----------|------------|--------| | Development | my-app-dev | `pk_test_` / `sk_test_` | localhost:3000 | | Staging | my-app-staging | `pk_test_` / `sk_test_` | staging.myapp.com | | Production | my-app-prod | `pk_live_` / `sk_live_` | myapp.com | ### Step 2: Environment Configuration Files ```bash # .env.local (development - git-ignored) NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_dev... CLERK_SECRET_KEY=sk_test_dev... CLERK_WEBHOOK_SECRET=whsec_dev... # .env.staging (staging) NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_staging... CLERK_SECRET_KEY=sk_test_staging... CLERK_WEBHOOK_SECRET=whsec_staging... # .env.production (production) NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_prod... CLERK_SECRET_KEY=sk_live_prod... CLERK_WEBHOOK_SECRET=whsec_prod... ``` ### Step 3: Environment-Aware Configuration ```typescript // lib/clerk-config.ts type ClerkEnv = 'development' | 'staging' | 'production' function getClerkEnv(): ClerkEnv ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category