jeremylongshore/claude-code-plugins-plus-skills
clerk-pack
plugins/saas-packs/clerk-pack/skills/clerk-rate-limits/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-rate-limits/SKILL.md -a claude-code --skill clerk-rate-limitsInstallation paths:
.claude/skills/clerk-rate-limits/# Clerk Rate Limits
## Overview
Understand Clerk's rate limiting system and implement strategies to avoid hitting limits.
## Prerequisites
- Clerk account with API access
- Understanding of your application's traffic patterns
- Monitoring/logging infrastructure
## Instructions
### Step 1: Understand Rate Limits
#### Clerk API Rate Limits (as of 2024)
| Endpoint Category | Free Tier | Pro Tier | Enterprise |
|------------------|-----------|----------|------------|
| Authentication | 100/min | 500/min | Custom |
| User Management | 100/min | 500/min | Custom |
| Session Management | 200/min | 1000/min | Custom |
| Webhooks | Unlimited | Unlimited | Unlimited |
#### Client-Side Limits
- SDK requests are automatically throttled
- Browser session: 10 requests/second
- Token refresh: 1 per 50 seconds (automatic)
### Step 2: Implement Rate Limit Handling
```typescript
// lib/clerk-client.ts
import { clerkClient } from '@clerk/nextjs/server'
interface RateLimitConfig {
maxRetries: number
baseDelay: number
}
async function withRateLimitRetry<T>(
operation: () => Promise<T>,
config: RateLimitConfig = { maxRetries: 3, baseDelay: 1000 }
): Promise<T> {
let lastError: Error | null = null
for (let attempt = 0; attempt < config.maxRetries; attempt++) {
try {
return await operation()
} catch (error: any) {
lastError = error
// Check for rate limit error
if (error.status === 429 || error.code === 'rate_limit_exceeded') {
const delay = config.baseDelay * Math.pow(2, attempt)
console.warn(`Rate limited, retrying in ${delay}ms (attempt ${attempt + 1})`)
await new Promise(resolve => setTimeout(resolve, delay))
continue
}
// Non-rate-limit error, throw immediately
throw error
}
}
throw lastError
}
// Usage
export async function getUser(userId: string) {
const client = await clerkClient()
return withRateLimitRetry(() => client.users.getUser(userId))
}
```
### Step 3: Ba