Command Palette

Search for a command to run...

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

clerk-setup

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

Add Clerk authentication to any project by following the official quickstart guides.

vvedantbот vvedantb★ 100 звёзд на GitHub

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

Adding Clerk

Version: Check package.json for the SDK version — see clerk skill for the version table. Core 2 differences are noted inline with > **Core 2 ONLY (skip if current SDK):** callouts.

This skill sets up Clerk for authentication by following the official quickstart documentation. For agents, the clerk CLI handles most of this end to end — see the next section.

Agent-first: Provision via CLI

The clerk CLI replaces most Dashboard clicks. Three scenarios cover almost everything:

Scenario A — New project, new Clerk app

clerk init --framework <next|react|vue|nuxt|astro|react-router|tanstack-react-start|expressjs|fastify|expo> -y

clerk init creates the Clerk app via PLAPI, links the project, writes the framework-specific publishable + secret keys to the right env file (e.g. .env.local for Next.js, .env for Vite-based projects), and installs the SDK package.

Scenario B — Existing project, existing Clerk app

clerk auth login                      # one-time OAuth (skip if already logged in)
clerk link                            # autolinks if a CLERK_PUBLISHABLE_KEY is in your .env
clerk link --app app_xxx              # explicit form, required in agent mode
clerk env pull                        # writes the framework-detected env vars

Scenario C — Existing project, new Clerk app

clerk auth login
clerk apps create "My App" --json     # returns the new app_id
clerk link --app app_xxx
clerk env pull

Daily ops

clerk env pull                        # refresh keys (uses linked profile)
clerk env pull --instance prod        # production keys
clerk doctor --json                   # framework integration health check

Rotate the secret key (replaces Dashboard rotation)

PLAPI exposes secret-key rotation directly. Use raw clerk api until the friendly wrapper ships:

clerk api --platform POST /v1/platform/applications/<app_id>/rotate_secret_keys \
  -d '{"delay_old_secrets_expiration_hours": 24, "reason": "scheduled rotation"}'

delay_old_secrets_expiration_hours keeps the old key valid for the grace period so deploys can roll forward without downtime.

Notes for agents

  • clerk link (no flags) only autolinks when a CLERK_PUBLISHABLE_KEY is already in .env / .env.local. Without it, agent mode errors out: "Cannot select an application in agent mode." When that happens, run clerk apps list --json, and ask the user which app_id to link rather than guessing.
  • Pass --json on apps list/create, users create, and doctor for parseable output.
  • The CLI auto-detects framework env var names (VITE_CLERK_PUBLISHABLE_KEY for Vite, NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY for Next.js, etc.) and target file (.env.development.local > .env.local > .env).

Quick Reference (Dashboard fallback)

If the CLI isn't an option (sandboxed environments, docs walkthroughs), here's the manual Dashboard path:

Step Action
1. Detect framework Check package.json dependencies
2. Fetch quickstart Use WebFetch on the appropriate docs URL
3. Follow instructions Execute steps; create proxy.ts (Next.js <=15: middleware.ts)
4. Get API keys From dashboard.clerk.com

If the project has components.json (shadcn/ui), apply the shadcn theme after setup. See clerk-custom-ui skill → shadcn Theme.

Framework Detection

Check package.json to identify the framework:

Dependency Framework Quickstart URL
next Next.js https://clerk.com/docs/nextjs/getting-started/quickstart
@remix-run/react Remix (deprecated) Migrate to React Router v7 — use the React Router quickstart below
react-router React Router (v7+) https://clerk.com/docs/react-router/getting-started/quickstart
astro Astro https://clerk.com/docs/astro/getting-started/quickstart
nuxt Nuxt https://clerk.com/docs/nuxt/getting-started/quickstart
@tanstack/react-start TanStack Start https://clerk.com/docs/tanstack-react-start/getting-started/quickstart
react (no framework) React SPA https://clerk.com/docs/react/getting-started/quickstart
vue Vue https://clerk.com/docs/vue/getting-started/quickstart
Полный SKILL.md на GitHub

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

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

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

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

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

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

WebFetch

Вложенные файлы

evals/evals.json

FAQ

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

Add Clerk authentication to any project by following the official quickstart guides.

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

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

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

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

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

Сравнить clerk-setup с