clerk-astro-patterns

Installation
SKILL.md

Astro Patterns

SDK: @clerk/astro v3+. Requires Astro 4.15+.

What Do You Need?

Task Reference
Configure middleware 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:

  • SSR pages — use Astro.locals.auth() which is populated by the middleware
Related skills
Installs
1.4K
Repository
clerk/skills
GitHub Stars
40
First Seen
Apr 6, 2026