What problem does it solve? Setting up Clerk authentication in React Router v7/v8 involves a middleware-plus-loader pipeline that differs sharply from other frameworks, and misconfigurations cause cryptic failures like getAuth returning empty userIds or SSR errors about useNavigate outside a Router context. This Skill provides the correct wiring patterns, version-specific config differences, and fixes for the most common pitfalls. ## Core Features & Use Cases - Root Setup: Configures clerkMiddleware, rootAuthLoader, and ClerkProvider in root.tsx, including the required ssr.noExternal workaround for React Router v8. - Server-Side Auth: Shows how to call getAuth in loaders and actions to protect routes, gate form submissions, and read org or session data. - Client & Org Patterns: Covers useAuth/useUser hooks, OrganizationSwitcher integration, and org-scoped data loading with redirects. - Use Case: You are adding auth to a React Router v8 app and every SSR request throws "useNavigate() may be used only in the context of a Router". This Skill identifies the Vite dev SSR externalization issue and applies the ssr.noExternal fix instead of chasing phantom duplicate installs. ## Quick Start Set up Clerk authentication in my React Router app with rootAuthLoader, clerkMiddleware, and a protected dashboard route that redirects unauthenticated users to sign-in.