[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AZ45493YQMSVP0MXVN8KBK":3,"skill-same:01M7AZ45493YQMSVP0MXVN8KBK":103},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7AZ45493YQMSVP0MXVN8KBK","clerk-astro-patterns",null,"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.","dbillion\u002Fhermes-skills-public","dbillion","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F49393855?v=4","01M7AVH8QPGCM8WKWS22TRT0T6","Oludayo Adeoye","01M7AVH8RD1JJWA0YS9CFEWAV9",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: clerk-astro-patterns\ndescription: 'Astro patterns with Clerk — middleware, SSR pages, island components,\n  API routes, static vs SSR rendering. Triggers on: astro clerk, clerk astro middleware,\n  astro protected page, clerk island component, astro API route auth, clerk astro\n  SSR.'\nlicense: MIT\nallowed-tools: WebFetch\nmetadata:\n  author: clerk\n  version: 1.0.0\n---\n\n# Astro Patterns\n\nSDK: `@clerk\u002Fastro` v3+. Requires Astro 4.15+.\n\n## What Do You Need?\n\n| Task | Reference |\n|------|-----------|\n| Configure middleware | references\u002Fmiddleware.md |\n| Protect SSR pages | references\u002Fssr-pages.md |\n| Use Clerk in island components | references\u002Fisland-components.md |\n| Auth in API routes | references\u002Fapi-routes.md |\n| Use Clerk with React in Astro | references\u002Fastro-react.md |\n\n## Mental Model\n\nAstro has two rendering modes per page: **SSR** and **static prerender**. Clerk works differently in each:\n\n- **SSR pages** — use `Astro.locals.auth()` which is populated by the middleware\n- **Static pages** (`export const prerender = true`) — Clerk middleware skips them; use client-side hooks in islands\n- **Islands** — React\u002FVue\u002FSvelte components; use `useAuth()` and other hooks from `@clerk\u002Fastro\u002Freact`\n\n```\nRequest → clerkMiddleware() → SSR page → Astro.locals.auth()\n                                ↓\n                         Island (.client) → useAuth() hook\n```\n\n## Setup\n\n### astro.config.mjs\n\n```ts\nimport { defineConfig } from 'astro\u002Fconfig'\nimport clerk from '@clerk\u002Fastro'\n\nexport default defineConfig({\n  integrations: [clerk()],\n  output: 'server',\n})\n```\n\n### src\u002Fmiddleware.ts\n\n```ts\nimport { clerkMiddleware, createRouteMatcher } from '@clerk\u002Fastro\u002Fserver'\n\nconst isProtectedRoute = createRouteMatcher(['\u002Fdashboard(.*)'])\n\nexport const onRequest = clerkMiddleware((auth, context, next) => {\n  if (isProtectedRoute(context.request) && !auth().userId) {\n    return auth().redirectToSignIn()\n  }\n  return next()\n})\n```\n\n## SSR Page Auth\n\n```astro\n---\nconst { userId, orgId } = Astro.locals.auth()\nif (!userId) return Astro.redirect('\u002Fsign-in')\n---\n\n\u003Ch1>Dashboard\u003C\u002Fh1>\n```\n\n## Common Pitfalls\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `Astro.locals.auth` is undefined | Missing middleware | Add `clerkMiddleware` to `src\u002Fmiddleware.ts` |\n| Auth works in dev but not production | `output: 'static'` globally | Set `output: 'server'` or `hybrid` for protected pages |\n| Static page has no auth | Prerendered pages skip middleware | Use `export const prerender = false` or move to island |\n| Island not reactive to sign-in | Missing `client:load` directive | Add `client:load` to the island component |\n\n## Import Map\n\n| What | Import From |\n|------|-------------|\n| `clerkMiddleware`, `createRouteMatcher` | `@clerk\u002Fastro\u002Fserver` |\n| `useAuth`, `useUser`, `UserButton` | `@clerk\u002Fastro\u002Freact` |\n| Astro components (`\u003CSignIn>`, etc.) | `@clerk\u002Fastro\u002Fcomponents` |\n\n## Env Variables\n\n```\n# .env\nPUBLIC_CLERK_PUBLISHABLE_KEY=pk_...\nCLERK_SECRET_KEY=sk_...\n```\n\nAstro uses `PUBLIC_` prefix for client-exposed variables (not `NEXT_PUBLIC_`).\n\n## See Also\n\n- `clerk-setup` - Initial Clerk install\n- `clerk-custom-ui` - Custom flows & appearance\n- `clerk-orgs` - B2B organizations\n\n## Docs\n\n[Astro SDK](https:\u002F\u002Fclerk.com\u002Fdocs\u002Fastro\u002Fgetting-started\u002Fquickstart)\n","# Astro Patterns\n\nSDK: `@clerk\u002Fastro` v3+. Requires Astro 4.15+.\n\n## What Do You Need?\n\n| Task | Reference |\n|------|-----------|\n| Configure middleware | references\u002Fmiddleware.md |\n| Protect SSR pages | references\u002Fssr-pages.md |\n| Use Clerk in island components | references\u002Fisland-components.md |\n| Auth in API routes | references\u002Fapi-routes.md |\n| Use Clerk with React in Astro | references\u002Fastro-react.md |\n\n## Mental Model\n\nAstro has two rendering modes per page: **SSR** and **static prerender**. Clerk works differently in each:\n\n- **SSR pages** — use `Astro.locals.auth()` which is populated by the middleware\n- **Static pages** (`export const prerender = true`) — Clerk middleware skips them; use client-side hooks in islands\n- **Islands** — React\u002FVue\u002FSvelte components; use `useAuth()` and other hooks from `@clerk\u002Fastro\u002Freact`\n\n```\nRequest → clerkMiddleware() → SSR page → Astro.locals.auth()\n                                ↓\n                         Island (.client) → useAuth() hook\n```\n\n## Setup\n\n### astro.config.mjs\n\n```ts\nimport { defineConfig } from 'astro\u002Fconfig'\nimport clerk from '@clerk\u002Fastro'\n\nexport default defineConfig({\n  integrations: [clerk()],\n  output: 'server',\n})\n```\n\n### src\u002Fmiddleware.ts\n\n```ts\nimport { clerkMiddleware, createRouteMatcher } from '@clerk\u002Fastro\u002Fserver'\n\nconst isProtectedRoute = createRouteMatcher(['\u002Fdashboard(.*)'])\n\nexport const onRequest = clerkMiddleware((auth, context, next) => {\n  if (isProtectedRoute(context.request) && !auth().userId) {\n    return auth().redirectToSignIn()\n  }\n  return next()\n})\n```\n\n## SSR Page Auth\n\n```astro\n---\nconst { userId, orgId } = Astro.locals.auth()\nif (!userId) return Astro.redirect('\u002Fsign-in')\n---\n\n\u003Ch1>Dashboard\u003C\u002Fh1>\n```\n\n## Common Pitfalls\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `Astro.locals.auth` is undefined | Missing middleware | Add `clerkMiddleware` to `src\u002Fmiddleware.ts` |\n| Auth works in dev but not production | `output: 'static'` globally | Set `output: 'server'` or `hybrid` for protected pages |\n| Static page has no auth | Prerendered pages skip middleware | Use `export const prerender = false` or move to island |\n| Island not reactive to sign-in | Missing `client:load` directive | Add `client:load` to the island component |\n\n## Import Map\n\n| What | Import From |\n|------|-------------|\n| `clerkMiddleware`, `createRouteMatcher` | `@clerk\u002Fastro\u002Fserver` |\n| `useAuth`, `useUser`, `UserButton` | `@clerk\u002Fastro\u002Freact` |\n| Astro components (`\u003CSignIn>`, etc.) | `@clerk\u002Fastro\u002Fcomponents` |\n\n## Env Variables\n\n```\n# .env\nPUBLIC_CLERK_PUBLISHABLE_KEY=pk_...\nCLERK_SECRET_KEY=sk_...\n```\n\nAstro uses `PUBLIC_` prefix for client-exposed variables (not `NEXT_PUBLIC_`).\n\n## See Also\n\n- `clerk-setup` - Initial Clerk install\n- `clerk-custom-ui` - Custom flows & appearance\n- `clerk-orgs` - B2B organizations\n\n## Docs\n\n[Astro SDK](https:\u002F\u002Fclerk.com\u002Fdocs\u002Fastro\u002Fgetting-started\u002Fquickstart)\n",{"name":5,"license":15,"metadata":24,"description":7,"allowed-tools":27},{"author":25,"version":26},"clerk","1.0.0","WebFetch","master","f341c46fed021656175d5c9ccc67a72126e50bfb","skills\u002Fclerk-astro-patterns","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public","https:\u002F\u002Fgithub.com\u002Fdbillion","I enjoy writing codes,teaching programming, solving problems, tasted automation in Python and never looked back😋😋😋💞","2026-10-14 03:31:55",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add dbillion\u002Fhermes-skills-public --skill clerk-astro-patterns",{"tool":41,"command":42},"bunx","bunx skills add dbillion\u002Fhermes-skills-public --skill clerk-astro-patterns",{"tool":44,"command":45},"pnpm","pnpm dlx skills add dbillion\u002Fhermes-skills-public --skill clerk-astro-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002FSKILL.md",true,[49,55,59,63,67,71,75,81,85,91,95,99],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"evals\u002Fevals.json","REFERENCE","参考文档",5580,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Fevals\u002Fevals.json",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fapi-routes.md",2009,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Freferences\u002Fapi-routes.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fastro-react.md",2309,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Freferences\u002Fastro-react.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fisland-components.md",1456,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Freferences\u002Fisland-components.md",{"path":68,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fmiddleware.md",1645,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Freferences\u002Fmiddleware.md",{"path":72,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fssr-pages.md",1811,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Freferences\u002Fssr-pages.md",{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"templates\u002Fastro-basic-auth\u002Fastro.config.mjs","SCRIPT","脚本",229,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Ftemplates\u002Fastro-basic-auth\u002Fastro.config.mjs",{"path":82,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":83,"sourceHtmlUrl":84},"templates\u002Fastro-basic-auth\u002Fpackage.json",227,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Ftemplates\u002Fastro-basic-auth\u002Fpackage.json",{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"templates\u002Fastro-basic-auth\u002Fsrc\u002Flayouts\u002FLayout.astro","OTHER","其他",520,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Ftemplates\u002Fastro-basic-auth\u002Fsrc\u002Flayouts\u002FLayout.astro",{"path":92,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":93,"sourceHtmlUrl":94},"templates\u002Fastro-basic-auth\u002Fsrc\u002Fmiddleware.ts",98,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Ftemplates\u002Fastro-basic-auth\u002Fsrc\u002Fmiddleware.ts",{"path":96,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":97,"sourceHtmlUrl":98},"templates\u002Fastro-basic-auth\u002Fsrc\u002Fpages\u002Findex.astro",258,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Ftemplates\u002Fastro-basic-auth\u002Fsrc\u002Fpages\u002Findex.astro",{"path":100,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":101,"sourceHtmlUrl":102},"templates\u002Fastro-basic-auth\u002Ftsconfig.json",42,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fclerk-astro-patterns\u002Ftemplates\u002Fastro-basic-auth\u002Ftsconfig.json",[104,111,118,127,134,141],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M7B25T0V7RBKES86Y3RTXQRN","blocked-page-recovery","Use when a fetch fails: 403\u002F429, paywall, WAF, bot wall.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fweb\u002Fblocked-page-recovery\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M7B25DSBBMZRHVD28MAX7N5X","gemini-vision-fallback","Vision fallback: Gemini REST API if vision_analyze blocked.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fvision\u002Fgemini-vision-fallback\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":122,"licenseFileUrl":123,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M7B22XW9QXT2ZWWXVZDFWYZP","twitter-cli","Use twitter-cli for ALL Twitter\u002FX operations — reading tweets, posting, replying, quoting, liking, retweeting, following, searching, user lookups. Invoke whenever user requests any Twitter interaction.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Ftwitter-cli\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Ftwitter-cli\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":19},"01M7B22QMWY1B4F7BC114RG4S6","prism-scan","Structural analysis through dynamically generated cognitive lenses. Generates the optimal analytical lens for the specific code\u002Fartifact, then executes it. Finds conservation laws, structural invariants, and concrete bugs that vanilla analysis misses. Use on any code file, system design, or text artifact.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fts-superhermes-prism-scan\u002FSKILL.md",[],[],{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":19},"01M7B22JA5XCAP1ACT6V50WYR1","prism-reflect","Constraint transparency: analyzes an artifact structurally, then analyzes what its own analysis concealed. Produces a conservation law AND a constraint report showing what was maximized, what was sacrificed, and what to investigate next. The only AI skill that knows what it can't see.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fts-superhermes-prism-reflect\u002FSKILL.md",[],[],{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":19},"01M7B22EB15M75M4X3C52YGDCC","prism-full","Full Prism: multi-pass structural analysis with mandatory adversarial self-correction. Designs custom analytical passes, executes them with chaining, then attacks its own findings before synthesizing. Use for maximum depth on important code or artifacts.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fts-superhermes-prism-full\u002FSKILL.md",[],[]]