clerk-setuplisted
Install: claude install-skill sanketbodke/skew-ai
# 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
```bash
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
```bash
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
```bash
clerk auth login
clerk apps create "My App" --json # returns the new app_id
clerk link --app app_xxx
clerk env pu