clerk-astro-patterns
Installation
SKILL.md
Astro Patterns
SDK: @clerk/astro v4+. Requires Astro 5+.
What Do You Need?
| Task | Reference |
|---|---|
Configure middleware (bare clerkMiddleware(), checks per page) |
references/middleware.md |
| Protect SSR pages | references/ssr-pages.md |
| Use Clerk in island components | references/island-components.md |
| Auth in API routes | references/api-routes.md |
| Use Clerk with React in Astro | references/astro-react.md |
Mental Model
Astro has two rendering modes per page: SSR and static prerender. Clerk works differently in each: