clerk-react-router-patterns
clerk react router patterns
What it does
- Middleware (clerkMiddleware()) — runs on every request, attaches auth to context
- rootAuthLoader — required in root.tsx to pass Clerk state to the client
- getAuth(args) — called inside any loader/action to get the current user
- clerk-setup - Initial Clerk install
- clerk-custom-ui - Custom flows & appearance
- clerk-orgs - B2B organizations
Requirements & configuration
- What Do You Need?
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
clerk-react-router-patterns FAQ
What does the clerk-react-router-patterns skill do?
React Router v7/v8 patterns with Clerk — rootAuthLoader, getAuth in loaders, clerkMiddleware, protected routes, SSR user data, org switching. Triggers on: react-router auth, rootAuthLoader, getAuth loader, react-router protected route, loader authentication, SSR auth react-router, useNavigate may be used only in the context of a Router. Middleware (clerkMiddleware()) — runs on every request, attaches auth to context rootAuthLoader — required in root.tsx to pass Clerk state to the client
How do I install clerk-react-router-patterns?
Run: npx -y skills add https://github.com/clerk/skills --skill clerk-react-router-patterns --agent claude-code — the source lives at github.com/clerk/skills.
Maintain clerk-react-router-patterns?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/clerk-skills-clerk-react-router-patterns?ref=badge) npx agentictools info skills/clerk-skills-clerk-react-router-patterns The second line is the CLI lookup for this page — handy in READMEs and docs.