clerk-astro-patterns
clerk astro patterns
What it does
- SSR pages — use Astro.locals.auth() which is populated by the middleware
- Static pages (export const prerender = true) — Clerk middleware skips them; use client-side hooks in islands
- Islands — React/Vue/Svelte components; use useAuth() and other hooks from @clerk/astro/react
- clerk-setup - Initial Clerk install
- clerk-custom-ui - Custom flows & appearance
- clerk-orgs - B2B organizations
Requirements & configuration
- SDK: @clerk/astro v3+. Requires Astro 4.15+.
- What Do You Need?
Configuration: PUBLIC_NEXT_PUBLIC_
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
clerk-astro-patterns FAQ
What does the clerk-astro-patterns skill do?
Astro patterns with Clerk — middleware, SSR pages, island components, API routes, static vs SSR rendering. Triggers on: astro clerk, clerk astro middleware, astro protected page, clerk island component, astro API route auth, clerk astro SSR. SSR pages — use Astro.locals.auth() which is populated by the middleware Static pages (export const prerender = true) — Clerk middleware skips them; use client-side hooks in islands
What does clerk-astro-patterns require?
SDK: @clerk/astro v3+. Requires Astro 4.15+. What Do You Need? Configuration keys: PUBLIC_, NEXT_PUBLIC_.
How do I install clerk-astro-patterns?
Run: npx -y skills add https://github.com/clerk/skills --skill clerk-astro-patterns --agent claude-code — the source lives at github.com/clerk/skills.
Maintain clerk-astro-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-astro-patterns?ref=badge) npx agentictools info skills/clerk-skills-clerk-astro-patterns The second line is the CLI lookup for this page — handy in READMEs and docs.