Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

clerk-environments-deployment

БесплатноБез исполняемых скриптовНе проверен

Use for Clerk dev/prod readiness, deployment, and multi-language implementation planning. PROACTIVELY activate for environment variables, pk_test/sk_test vs…

JosiahSiegelот JosiahSiegel★ 67 звёзд на GitHub

Об этом скилле

Clerk Environments, Deployment, and Multi-Language Checklists

Overview

Use this skill when the task is broader than a single framework: development vs production setup, deployment readiness, custom domains, DNS, redirects, CORS/cookies, webhooks, CSP, monitoring, incident response, or multi-language backend architecture.

Clerk integrations often work locally and fail in production because keys, domains, redirects, OAuth credentials, webhook secrets, proxy headers, or CSP are environment-specific. Treat environment design as part of the auth implementation, not a deployment afterthought.

Environment Model

Use separate Clerk instances for development and production. For staging/preview, decide explicitly whether to use a separate staging Clerk instance or a constrained development instance. Avoid sharing a production instance with untrusted preview URLs unless there is a strong reason and hardened allowlists.

Key prefixes are a fast sanity check:

Key type Development Production Exposure
Publishable key pk_test_... pk_live_... Client-safe
Secret key sk_test_... sk_live_... Server-only
Webhook signing secret whsec_... whsec_... per endpoint/instance Server-only
Encryption key random secret random secret Server-only

Never mix pk_test_ with sk_live_, pk_live_ with sk_test_, or webhook secrets from another endpoint/instance.

Local Development Checklist

  • Use .env.local/local secret storage for dev keys only.
  • Confirm framework variable names: e.g. NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY for Next.js client exposure and CLERK_SECRET_KEY for server-only use.
  • Configure local sign-in/sign-up routes and fallback redirects.
  • Use the Clerk CLI where useful: setup/init, env pull, and deploy status checks.
  • For webhooks, expose the local app with a tunnel and create a development webhook endpoint using the tunnel URL.
  • Keep local webhook signing secrets separate from production secrets.
  • Test signed-out, signed-in, wrong-role, wrong-org, and webhook replay flows locally.
  • Do not commit .env files, logs with tokens, or tunnel URLs that imply private infrastructure.
  • Confirm NTP is enabled on the dev host and inside any Docker/WSL2 containers; clock drift causes spurious token-not-active-yet/token-expired errors. For container time resync recipes (WSL2 timedatectl, Docker Desktop restart, docker exec date -s), load the clerk-clock-skew-jwt skill.

Preview and Staging Checklist

Preview deployments introduce dynamic hosts. Decide how those hosts map to Clerk settings.

  • Use non-production keys for untrusted preview branches.
  • Configure allowed origins/redirect URLs for the preview host pattern where the platform and Clerk support it.
  • Avoid giving every preview URL production OAuth credentials or production webhook access.
  • Confirm cross-origin APIs accept the preview origin in CORS.
  • Confirm cookies and SameSite behavior match the preview domain topology.
  • If previews call a shared backend, ensure the backend accepts only the intended Clerk instance(s) and token issuers.
  • Keep preview webhook endpoints separate, or route them to isolated test queues/databases.

Production Launch Checklist

Before going live:

  1. Create or select a production Clerk instance.
  2. Set production environment variables in the hosting platform; do not deploy with development keys.
  3. Configure production domains in Clerk Dashboard.
  4. Add required DNS records for session management and domain-verified emails.
  5. Replace development/shared OAuth credentials with provider-owned production credentials.
  6. Configure sign-in/sign-up URLs, after-auth fallback/force redirects, and allowed redirect origins.
  7. Configure production webhook endpoints and use the production endpoint's signing secret.
  8. Configure custom domain/proxy settings if the app cannot use Clerk's Frontend API CNAME.
  9. Add CSP directives for Clerk scripts, frames, connections, images, and styles if CSP is enabled.
  10. Configure subdomain allowlists and authorizedParties for cross-subdomain safety.
  11. Verify reverse proxies/CDNs forward auth-relevant headers.
  12. Run direct API tests with and without Bearer tokens.
  13. Run a webhook delivery/replay test.
  14. Verify logs redact tokens, cookies, session IDs, webhook signatures, and secret keys.
  15. Document rollback steps and secret-rotation steps.

Clerk production keys use pk_live_ and sk_live_. DNS propagation can take time, so schedule domain validation before launch.

Domains, DNS, Custom Domains, and Proxying

Production Clerk domains require DNS access. Clerk uses DNS records for session management and domain-verified emails. If using Cloudflare, certain Clerk validation records may need DNS-only mode so validation can complete.

When a Frontend API CNAME cannot be added, use Clerk's documented proxy option. Validate:

  • Frontend SDK points at the correct proxy/custom domain.
  • Nex
Полный SKILL.md на GitHub

Установить clerk-environments-deployment в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл clerk-environments-deployment?

Use for Clerk dev/prod readiness, deployment, and multi-language implementation planning. PROACTIVELY activate for environment variables, pk_test/sk_test vs pk_live/sk_live, local dev, preview/staging/prod instances, domains/DNS, redirects, OAuth credentials, custom domains/proxy, authorizedParties, CSP, CORS/cookies, webhooks/tunnels, Vercel/Netlify/Cloudflare/API gateways, monitoring/troubleshooting, and backends in Node/Express/Fastify, Python/FastAPI/Django/Flask, Go, Ruby/Rails, Java/Spring, .NET, PHP/Laravel. Provides checklists, rollout plans, and language-portable patterns.

Как установить скилл clerk-environments-deployment?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл clerk-environments-deployment запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить clerk-environments-deployment с