/clerk:auth-componentsfrom clerk
Provides Clerk authentication component templates, appearance customization, and validation scripts for building sign-in/sign-up pages and user buttons.
Ships in clerk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill provides comprehensive templates and patterns for implementing and customizing Clerk authentication components including pre-built components, Clerk Elements for custom flows, and appearance theming.
Clerk offers two approaches for authentication UI:
<SignIn />, <SignUp />, <UserButton /> with minimal configurationThis skill covers both approaches with practical templates and customization patterns.
Script: scripts/generate-auth-ui.sh <output-dir> <component-type>
Purpose: Generates complete authentication page templates
Component Types:
signin - SignIn page with routingsignup - SignUp page with routingboth - Both SignIn and SignUp pagesprofile - User profile pageall - Complete auth UI setUsage:
# Generate sign-in page
./scripts/generate-auth-ui.sh ./app/sign-in signin
# Generate both sign-in and sign-up
./scripts/generate-auth-ui.sh ./app signup
# Generate complete auth UI
./scripts/generate-auth-ui.sh ./app all
Generated Files:
app/sign-in/[[...sign-in]]/page.tsxapp/sign-up/[[...sign-up]]/page.tsxapp/profile/[[...profile]]/page.tsxcomponents/auth/protected-wrapper.tsxScript: scripts/customize-appearance.sh <config-file> <theme-preset>
Purpose: Generates appearance configuration for Clerk components
Theme Presets:
default - Clerk default themedark - Dark mode themeneobrutalist - Neobrutalist themeshadesOfPurple - Shades of Purple themecustom - Custom theme templateUsage:
# Generate dark theme config
./scripts/customize-appearance.sh ./lib/clerk-config.ts dark
# Generate custom theme template
./scripts/customize-appearance.sh ./lib/clerk-config.ts custom
# Generate theme with custom variables
BRAND_COLOR="#6366f1" ./scripts/customize-appearance.sh ./lib/clerk-config.ts custom
Environment Variables:
BRAND_COLOR - Primary brand color (hex)BACKGROUND - Background color (hex)TEXT_COLOR - Text color (hex)Script: scripts/validate-components.sh <project-dir>
Purpose: Validates Clerk component setup and configuration
Checks:
Usage:
# Validate current project
./scripts/validate-components.sh .
# Validate specific directory
./scripts/validate-components.sh /path/to/project
Exit Codes:
0: Validation passed1: Validation failed (must fix issues)Template: templates/sign-in-page.tsx
Features:
[[...sign-in]]Usage:
// app/sign-in/[[...sign-in]]/page.tsx
import { SignIn } from '@clerk/nextjs'
export default function SignInPage() {
return (
<div className="flex min-h-screen items-center justify-center">
<SignIn
appearance={{
elements: {
rootBox: "mx-auto",
card: "shadow-lg"
}
}}
afterSignInUrl="/dashboard"
/>
</div>
)
}
Template: templates/sign-up-page.tsx
Features:
[[...sign-up]]Template: templates/user-button-custom.tsx
Features:
Customization Example:
<UserButton
appearance={{
elements: {
userButtonAvatarBox: "w-10 h-10",
userButtonPopoverCard: "shadow-xl"
}
}}
>
<UserButton.MenuItems>
<UserButton.Link
label="Dashboard"
labelIcon={<LayoutDashboard size={16} />}
href="/dashboard"
/>
<UserButton.Action
label="Settings"
labelIcon={<Settings size={16} />}
onClick={() => router.push('/settings')}
/>
</UserButton.MenuItems>
</UserButton>
Template: templates/protected-wrapper.tsx
Features:
Usage:
// app/dashboard/page.tsx
import { ProtectedRoute } from '@/components/auth/protected-wrapper'
export default function DashboardPage() {
return (
<ProtectedRoute>
<div>Protected Dashboard Content</div>
</ProtectedRoute>
)
}
Example: examples/custom-sign-in-guide.md (code: examples/custom-sign-in.tsx)
Demonstrates:
Key Components:
<SignIn.Root>
<SignIn.Step name="start">
{/* Email/username input */}
<SignIn.Strategy name="password">
{/* Password input */}
</SignIn.Strategy>
<SignIn.Strategy name="email_code">
{/* Email verification */}
</SignIn.Strategy>
</SignIn.Step>
</SignIn.Root>
Example: examples/social-authentication-guide.md (code: examples/social-buttons.tsx)
Demonstrates:
Supported Providers:
Example: examples/theming-guide.md (code: examples/theme-config.tsx)
Demonstrates:
The appearance prop accepts:
appearance={{
baseTheme: dark, // Base theme
layout: { // Layout options
shimmer: true,
logoPlacement: 'inside'
},
variables: { // CSS variables
colorPrimary: '#6366f1',
colorBackground: '#ffffff',
colorText: '#1f2937',
borderRadius: '0.5rem'
},
elements: { // Element overrides
card: 'shadow-lg',
formButtonPrimary: 'bg-blue-500',
footerActionLink: 'text-blue-600'
}
}}
Global (ClerkProvider):
<ClerkProvider appearance={{
baseTheme: dark,
variables: { colorPrimary: '#6366f1' }
}}>
{children}
</ClerkProvider>
Component-Level:
<SignIn appearance={{
elements: {
card: 'shadow-xl',
rootBox: 'mx-auto'
}
}} />
For Tailwind CSS v4 support:
<ClerkProvider
appearance={{
cssLayerName: 'clerk' // Ensures Tailwind utilities override
}}
>
Common element selectors:
rootBox - Root containercard - Main card containerheaderTitle - Header textformButtonPrimary - Submit buttonsformFieldInput - Input fieldsfooterActionLink - Footer linksuserButtonAvatarBox - User avataruserButtonPopoverCard - Dropdown menuThis skill follows strict security rules:
.gitignore protection documented<SignIn />, <SignUp /> before custom Elements<ClerkProvider> level for consistencyvariables prop for brand colors, spacing, and typographyelements prop for specific component stylingafterSignInUrl and afterSignUpUrl for better UXNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEY@clerk/themes for pre-built themesFor advanced customization patterns, see:
examples/custom-sign-in.tsx - Complete Clerk Elements implementationexamples/social-buttons.tsx - OAuth provider integrationexamples/theme-config.tsx - Advanced theming patternsREADME.md (opens in a new tab)examples/custom-sign-in-guide.md (opens in a new tab)examples/custom-sign-in.tsx (opens in a new tab)examples/social-authentication-guide.md (opens in a new tab)examples/social-buttons.tsx (opens in a new tab)examples/theme-config.tsx (opens in a new tab)examples/theming-guide.md (opens in a new tab)scripts/customize-appearance.sh (opens in a new tab)scripts/generate-auth-ui.sh (opens in a new tab)scripts/validate-components.sh (opens in a new tab)templates/protected-wrapper.tsx (opens in a new tab)templates/sign-in-page.tsx (opens in a new tab)templates/sign-up-page.tsx (opens in a new tab)templates/user-button-custom.tsx (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
clerk, auth-components, sign-in, sign-up, theming, user-button
10 skills in this plugin
/api-authenticationBackend API authentication patterns with Clerk JWT middleware and route protection. Use when building REST APIs, GraphQL APIs, protecting backend routes, implementing JWT validation, setting up Express middleware, or when user mentions API authentication, backend security, JWT tokens, or protected endpoints./billing-integrationClerk Billing and Stripe subscription management setup. Use when implementing subscriptions, configuring pricing plans, setting up billing, adding payment flows, managing entitlements, or when user mentions Clerk Billing, Stripe integration, subscription management, pricing tables, payment processing, or monetization./middleware-protectionRoute protection and authorization patterns for Clerk middleware. Use when implementing route guards, protecting API routes, configuring middleware matchers, setting up role-based access control, creating auth boundaries, or when user mentions middleware, route protection, auth guards, protected routes, public routes, matcher patterns, or authorization middleware./nextjs-integrationComplete Next.js integration patterns for Clerk authentication with App Router and Pages Router. Use when setting up Clerk in Next.js, configuring authentication middleware, implementing protected routes, setting up server/client components with auth, or when user mentions Clerk Next.js setup, App Router auth, Pages Router auth, or Next.js authentication integration./oauth-providersConfigure OAuth authentication providers for Clerk (Google, GitHub, Discord, Apple, Microsoft, Facebook, LinkedIn, Twitter, and 11+ more). Use when setting up social login, configuring OAuth providers, implementing authentication flows, generating redirect URLs, testing OAuth connections, or when user mentions Clerk OAuth, social authentication, provider setup, or multi-provider auth./organization-managementImplement Clerk multi-tenant organization features with RBAC, role-based access control, organization switching, member management, and tenant isolation. Use when building multi-tenant SaaS applications, implementing organization hierarchies, configuring custom roles and permissions, setting up organization-scoped data isolation, or when user mentions organizations, RBAC, multi-tenancy, roles, permissions, organization switcher, member management, or tenant isolation.npx claudepluginhub vanman2024/ai-dev-marketplace --plugin clerkOther plugins' skills for the same job