Better Auth's official skill for hardening a Better Auth deployment: secret management, rate limiting, CSRF protection, trusted origins, session and cookie security, OAuth token encryption, IP tracking and audit logging.
Clerk React Patterns Skill
Clerk's official skill for authentication in React single-page apps with @clerk/react on Vite or Create React App: ClerkProvider setup, useAuth, useUser and useClerk hooks, React Router protected routes and custom sign-in flows.
Install
Other ways to install
About
- ClerkProvider setup for Vite and Create React App with VITE_CLERK_PUBLISHABLE_KEY
- useAuth, useUser and useClerk hooks with the isLoaded guard
- Protected routes for React Router v6 and v7
- Custom sign-in and sign-up flows with useSignIn and useSignUp
- Session JWTs for API calls via getToken() and a common-pitfalls table
Clerk React Patterns is Clerk's own skill, from the clerk/skills repository, for adding Clerk authentication to a client-only React single-page app built with Vite or Create React App. It is scoped tightly: Next.js projects are sent to clerk-nextjs-patterns and TanStack Start to clerk-tanstack-patterns.
The setup is spelled out end to end: install @clerk/react, put the publishable key in VITE_CLERK_PUBLISHABLE_KEY, and wrap the app in ClerkProvider in main.tsx. The skill's mental model is the part agents most often get wrong: @clerk/react is client-only, so there is no server-side auth(), all state comes from hooks, isLoaded must be true before isSignedIn can be trusted, useClerk() exposes signOut, openSignIn and openUserProfile, and getToken() from useAuth() fetches the session JWT for API calls.
It includes a minimal guarded component, a protected-route pattern for React Router v6 and v7, and a pitfalls table (undefined isSignedIn, a missing provider, the wrong Vite environment prefix, a null token, a blank sign-in component). Reference files go deeper on hooks, protected routes, custom sign-in and sign-up flows with useSignIn and useSignUp, and router integration. MIT licensed per its frontmatter.
SKILL.md
The instructions your agent loads, as published by Clerk.
Related Skills
See all Clerk React Patterns alternativesSkill: Better Auth: Two-Factor Auth
by Better Auth
Adds real 2FA to a Better Auth app — TOTP, email/SMS OTP, backup codes, trusted devices — including the sign-in interrupt and the encryption-at-rest details.
Skill: Better Auth: Organizations
by Better Auth
Turns a single-user app multi-tenant with Better Auth's organization plugin: orgs, members, invitations, teams, roles and dynamic access control.
Skill: Better Auth: Email & Password
by Better Auth
Credential auth done to spec in Better Auth: verification email, reset flow, token and session handling, password policy and custom hashing.