environment-setup-guide
Guide developers through setting up development environments with proper tools, dependencies, and configurations
clerk-core-workflow-a
Implement user sign-up and sign-in flows with Clerk. Use when building authentication UI, customizing sign-in experience, or implementing OAuth social login. Trigger with phrases like "clerk sign-in", "clerk sign-up", "clerk login flow", "clerk OAuth", "clerk social login".
Full skill instructions
Implement comprehensive user authentication flows including email, OAuth, and custom UI.
// 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: {
formButtonPrimary: 'bg-blue-500 hover:bg-blue-600',
card: 'shadow-lg'
}
}}
routing="path"
path="/sign-in"
signUpUrl="/sign-up"
/>
</div>
)
}
// app/sign-up/[[...sign-up]]/page.tsx
import { SignUp } from '@clerk/nextjs'
export default function SignUpPage() {
return (
<div className="flex min-h-screen items-center justify-center">
<SignUp
appearance={{
elements: {
formButtonPrimary: 'bg-green-500 hover:bg-green-600'
}
}}
routing="path"
path="/sign-up"
signInUrl="/sign-in"
/>
</div>
)
}
'use client'
import { useSignIn } from '@clerk/nextjs'
import { useState } from 'react'
import { useRouter } from 'next/navigation'
export function CustomSignIn() {
const { signIn, isLoaded, setActive } = useSignIn()
const [email, setEmail] = useState('')
const [password, setPassword] = useState('')
const [error, setError] = useState('')
const router = useRouter()
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault()
if (!isLoaded) return
try {
const result = await signIn.create({
identifier: email,
password,
})
if (result.status === 'complete') {
await setActive({ session: result.createdSessionId })
router.push('/dashboard')
}
} catch (err: any) {
setError(err.errors?.[0]?.message || 'Sign in failed')
}
}
return (
<form onSubmit={handleSubmit}>
<input
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="Email"
/>
<input
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="Password"
/>
{error && <p className="text-red-500">{error}</p>}
<button type="submit">Sign In</button>
</form>
)
}
'use client'
import { useSignIn } from '@clerk/nextjs'
export function SocialLogin() {
const { signIn, isLoaded } = useSignIn()
const handleOAuth = async (provider: 'oauth_google' | 'oauth_github' | 'oauth_apple') => {
if (!isLoaded) return
await signIn.authenticateWithRedirect({
strategy: provider,
redirectUrl: '/sso-callback',
redirectUrlComplete: '/dashboard'
})
}
return (
<div className="space-y-2">
<button onClick={() => handleOAuth('oauth_google')}>
Continue with Google
</button>
<button onClick={() => handleOAuth('oauth_github')}>
Continue with GitHub
</button>
<button onClick={() => handleOAuth('oauth_apple')}>
Continue with Apple
</button>
</div>
)
}
// app/sso-callback/page.tsx
import { AuthenticateWithRedirectCallback } from '@clerk/nextjs'
export default function SSOCallback() {
return <AuthenticateWithRedirectCallback />
}
'use client'
import { useSignUp } from '@clerk/nextjs'
import { useState } from 'react'
export function EmailVerification() {
const { signUp, isLoaded, setActive } = useSignUp()
const [verificationCode, setVerificationCode] = useState('')
const [pendingVerification, setPendingVerification] = useState(false)
const handleSignUp = async (email: string, password: string) => {
if (!isLoaded) return
await signUp.create({
emailAddress: email,
password,
})
// Send email verification
await signUp.prepareEmailAddressVerification({
strategy: 'email_code'
})
setPendingVerification(true)
}
const handleVerify = async () => {
if (!isLoaded) return
const result = await signUp.attemptEmailAddressVerification({
code: verificationCode
})
if (result.status === 'complete') {
await setActive({ session: result.createdSessionId })
}
}
if (pendingVerification) {
return (
<div>
<input
value={verificationCode}
onChange={(e) => setVerificationCode(e.target.value)}
placeholder="Verification code"
/>
<button onClick={handleVerify}>Verify</button>
</div>
)
}
return <SignUpForm onSubmit={handleSignUp} />
}
| Error | Cause | Solution |
|---|---|---|
| form_identifier_not_found | Email not registered | Show sign-up prompt |
| form_password_incorrect | Wrong password | Show error, offer reset |
| session_exists | Already signed in | Redirect to dashboard |
| verification_failed | Wrong code | Allow retry, resend code |
const handleMagicLink = async (email: string) => {
await signIn.create({
identifier: email,
strategy: 'email_link',
redirectUrl: `${window.location.origin}/verify-magic-link`
})
}
// app/verify-magic-link/page.tsx
import { EmailLinkComplete } from '@clerk/nextjs'
export default function VerifyMagicLink() {
return <EmailLinkComplete />
}
Proceed to clerk-core-workflow-b for session management and middleware.
Guide developers through setting up development environments with proper tools, dependencies, and configurations
Implement Exa lint rules, policy enforcement, and automated guardrails. Use when setting up code quality rules for Exa integrations, implementing pre-commit hooks, or configuring CI policy checks for Exa best practices. Trigger with phrases like "exa policy", "exa lint", "exa guardrails", "exa be...
Configure CI/CD pipelines for Documenso integrations. Use when setting up automated testing, deployment pipelines, or continuous integration for Documenso projects. Trigger with phrases like "documenso CI", "documenso GitHub Actions", "documenso pipeline", "documenso automated testing".
Build check model availability and implement fallback chains. Use when building resilient systems or handling model outages. Trigger with phrases like 'openrouter availability', 'openrouter fallback', 'openrouter model down', 'openrouter health check'.
Configure Langfuse enterprise organization management and access control. Use when implementing team access controls, configuring organization settings, or setting up role-based permissions for Langfuse projects. Trigger with phrases like "langfuse RBAC", "langfuse teams", "langfuse organization"...
Execute compliance and security auditing for Cursor usage. Triggers on "cursor compliance", "cursor audit", "cursor security review", "cursor soc2", "cursor gdpr". Use when analyzing or auditing cursor compliance audit. Trigger with phrases like "cursor compliance audit", "cursor audit", "cursor".
Configure Apollo.io CI/CD integration. Use when setting up automated testing, continuous integration, or deployment pipelines for Apollo integrations. Trigger with phrases like "apollo ci", "apollo github actions", "apollo pipeline", "apollo ci/cd", "apollo automated tests".
Create robust Python automation with full logging and safety checks. Use when tasks need complex data processing, authenticated API work, conditional file operations, or error handling beyond simple shell commands.
Configure PostHog across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment secrets, or implementing environment-specific PostHog configurations. Trigger with phrases like "posthog environments", "posthog staging", "po...
Expert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration. Use when: build agent, AI agent, autonomous agent, tool use, function calling.
Validate insecure deserialization checker operations. Auto-activating skill for Security Fundamentals. Triggers on: insecure deserialization checker, insecure deserialization checker Part of the Security Fundamentals skill category. Use when working with insecure deserialization checker functiona...
Manage path traversal finder operations. Auto-activating skill for Security Fundamentals. Triggers on: path traversal finder, path traversal finder Part of the Security Fundamentals skill category. Use when working with path traversal finder functionality. Trigger with phrases like "path traversa...
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience