Skip to content
Back to skills

Clerk Multi Env Setup

ASecurity

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".

  • 4 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 10, 2026
devopsbashnextjsci/cd

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 10, 2026

npx -y skills add micsapp/micstec-skills --skill clerk-multi-env-setup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clerk Multi Env Setup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Clerk Multi Env Setup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/micsapp-clerk-multi-env-setup/badge)](https://www.skillsdirectory.com/skills/micsapp-clerk-multi-env-setup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: clerk-multi-env-setup
description: |
  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".
allowed-tools: Read, Write, Edit, Bash(npm:*), Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
compatible-with: claude-code, codex, openclaw
---
# Clerk Multi-Environment Setup

## Overview
Configure Clerk across development, staging, and production environments.

## Prerequisites
- Clerk account with multiple instances
- Understanding of environment management
- CI/CD pipeline configured

## Instructions
1. Step 1: Create Clerk Instances
2. Step 2: Environment Configuration
3. Step 3: Environment-Aware Configuration
4. Step 4: ClerkProvider Configuration
5. Step 5: Webhook Configuration Per Environment
6. Step 6: CI/CD Environment Promotion
7. Step 7: User Data Isolation

For full implementation details and code examples, load:
`Read(${CLAUDE_SKILL_DIR}/references/implementation-guide.md)`

## Output
- Separate Clerk instances per environment
- Environment-aware configuration
- Webhook handling per environment
- CI/CD pipeline configured

## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| Wrong environment keys | Misconfiguration | Validate at startup |
| Webhook signature fails | Wrong secret | Check env-specific secret |
| User not found | Env mismatch | Check environment isolation |

## Resources
- [Clerk Instances](https://clerk.com/docs/deployments/overview)
- [Environment Variables](https://clerk.com/docs/deployments/set-up-preview-environment)
- [Next.js Environments](https://nextjs.org/docs/app/building-your-application/configuring/environment-variables)

## Next Steps
Proceed to `clerk-observability` for monitoring and logging.

## Examples

**Basic usage**: Apply clerk multi env setup to a standard project setup with default configuration options.

**Advanced scenario**: Customize clerk multi env setup for production environments with multiple constraints and team-specific requirements.

Files in this skill

  • SKILL.md2.2 KB
  • references/implementation-guide.md5.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.