jeremylongshore/claude-code-plugins-plus-skills
clerk-pack
plugins/saas-packs/clerk-pack/skills/clerk-migration-deep-dive/SKILL.md
January 22, 2026
Select agents to install to:
npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/clerk-pack/skills/clerk-migration-deep-dive/SKILL.md -a claude-code --skill clerk-migration-deep-diveInstallation paths:
.claude/skills/clerk-migration-deep-dive/# Clerk Migration Deep Dive
## Overview
Comprehensive guide to migrating from other authentication providers to Clerk.
## Prerequisites
- Current auth provider access
- User data export capability
- Clerk account and API keys
- Migration timeline planned
## Migration Sources
### 1. Auth0 to Clerk
#### Step 1: Export Users from Auth0
```bash
# Using Auth0 Management API
curl -X GET "https://YOUR_DOMAIN.auth0.com/api/v2/users" \
-H "Authorization: Bearer YOUR_MGMT_TOKEN" \
-H "Content-Type: application/json" \
> auth0-users.json
```
#### Step 2: Transform User Data
```typescript
// scripts/transform-auth0-users.ts
interface Auth0User {
user_id: string
email: string
email_verified: boolean
name: string
given_name?: string
family_name?: string
picture?: string
created_at: string
last_login?: string
}
interface ClerkImportUser {
external_id: string
email_addresses: Array<{
email_address: string
verified: boolean
}>
first_name?: string
last_name?: string
image_url?: string
created_at: string
public_metadata?: Record<string, any>
}
function transformAuth0ToClerk(auth0User: Auth0User): ClerkImportUser {
return {
external_id: auth0User.user_id,
email_addresses: [{
email_address: auth0User.email,
verified: auth0User.email_verified
}],
first_name: auth0User.given_name,
last_name: auth0User.family_name,
image_url: auth0User.picture,
created_at: auth0User.created_at,
public_metadata: {
migrated_from: 'auth0',
migrated_at: new Date().toISOString()
}
}
}
```
#### Step 3: Import to Clerk
```typescript
// scripts/import-to-clerk.ts
import { clerkClient } from '@clerk/nextjs/server'
async function importUsers(users: ClerkImportUser[]) {
const client = await clerkClient()
const results = { success: 0, failed: 0, errors: [] as string[] }
for (const user of users) {
try {
await client.users.createUser({
externalId: user.external_id,
e