[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AWB0PTE2NK8CJ4M4PFB8RK":3,"skill-same:01M7AWB0PTE2NK8CJ4M4PFB8RK":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},"01M7AWB0PTE2NK8CJ4M4PFB8RK","clerk-tanstack-patterns",null,"TanStack React Start auth patterns with @clerk\u002Ftanstack-react-start - createServerFn, beforeLoad guards, loaders, Vinxi server. Triggers on: TanStack auth, createServerFn clerk, beforeLoad protection, TanStack Start middleware.","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-external\u002Fclerk-tanstack-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: clerk-tanstack-patterns\ndescription: 'TanStack React Start auth patterns with @clerk\u002Ftanstack-react-start\n  - createServerFn, beforeLoad guards, loaders, Vinxi server. Triggers on: TanStack\n  auth, createServerFn clerk, beforeLoad protection, TanStack Start middleware.'\nlicense: MIT\nallowed-tools: WebFetch\nmetadata:\n  author: clerk\n  version: 1.0.0\n---\n\n# TanStack React Start Patterns\n\n## What Do You Need?\n\n| Task | Reference |\n|------|-----------|\n| Protect routes with beforeLoad | references\u002Frouter-guards.md |\n| Auth in createServerFn | references\u002Fserver-functions.md |\n| Pass auth to loaders | references\u002Floaders.md |\n| Configure Vinxi + clerkMiddleware | references\u002Fvinxi-server.md |\n\n## References\n\n| Reference | Description |\n|-----------|-------------|\n| `references\u002Frouter-guards.md` | beforeLoad auth redirect |\n| `references\u002Fserver-functions.md` | createServerFn with auth() |\n| `references\u002Floaders.md` | Auth context in loaders |\n| `references\u002Fvinxi-server.md` | clerkMiddleware() setup |\n\n## Setup\n\n```\nnpm install @clerk\u002Ftanstack-react-start\n```\n\n`.env`:\n```\nCLERK_PUBLISHABLE_KEY=pk_...\nCLERK_SECRET_KEY=sk_...\n```\n\n`src\u002Fstart.ts` (Vinxi entry):\n```typescript\nimport { clerkMiddleware } from '@clerk\u002Ftanstack-react-start\u002Fserver'\nimport { createStart } from '@tanstack\u002Freact-start'\n\nexport const startInstance = createStart(() => {\n  return {\n    requestMiddleware: [clerkMiddleware()],\n  }\n})\n```\n\n`src\u002Froutes\u002F__root.tsx` — wrap with `\u003CClerkProvider>`:\n```tsx\nimport { ClerkProvider } from '@clerk\u002Ftanstack-react-start'\n\nfunction RootDocument({ children }: { children: React.ReactNode }) {\n  return (\n    \u003Chtml lang=\"en\">\n      \u003Cbody>\n        \u003CClerkProvider>\n          {children}\n        \u003C\u002FClerkProvider>\n      \u003C\u002Fbody>\n    \u003C\u002Fhtml>\n  )\n}\n```\n\n## Mental Model\n\nTanStack Start runs on Vinxi. Auth flows through two layers:\n\n1. **Server layer** — `createServerFn` + `auth()` from `@clerk\u002Ftanstack-react-start\u002Fserver`\n2. **Router layer** — `beforeLoad` on route definitions, throws `redirect` for unauthenticated\n\nBoth layers are server-executed. Client hooks (`useAuth`, `useUser`) are React hooks for the browser side.\n\n## Minimal Pattern\n\n```typescript\nimport { createFileRoute, redirect } from '@tanstack\u002Freact-router'\nimport { createServerFn } from '@tanstack\u002Freact-start'\nimport { auth } from '@clerk\u002Ftanstack-react-start\u002Fserver'\n\nconst authStateFn = createServerFn().handler(async () => {\n  const { isAuthenticated, userId } = await auth()\n  if (!isAuthenticated) {\n    throw redirect({ to: '\u002Fsign-in' })\n  }\n  return { userId }\n})\n\nexport const Route = createFileRoute('\u002Fdashboard')({\n  beforeLoad: async () => await authStateFn(),\n})\n```\n\n## Common Pitfalls\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `auth()` returns empty | Missing `clerkMiddleware` in start.ts | Add to `requestMiddleware` array |\n| `redirect` not thrown | Using `return` instead of `throw` | `throw redirect(...)` in TanStack |\n| Wrong import for `auth` | Mixing client\u002Fserver imports | Server: `@clerk\u002Ftanstack-react-start\u002Fserver` |\n| Loader context missing userId | Not passing from beforeLoad | Return from beforeLoad, access via `context` |\n| `ClerkProvider` missing | Forgot root wrapping | Add to `__root.tsx` shell component |\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[TanStack React Start SDK](https:\u002F\u002Fclerk.com\u002Fdocs\u002Ftanstack-react-start\u002Fgetting-started\u002Fquickstart)\n","# TanStack React Start Patterns\n\n## What Do You Need?\n\n| Task | Reference |\n|------|-----------|\n| Protect routes with beforeLoad | references\u002Frouter-guards.md |\n| Auth in createServerFn | references\u002Fserver-functions.md |\n| Pass auth to loaders | references\u002Floaders.md |\n| Configure Vinxi + clerkMiddleware | references\u002Fvinxi-server.md |\n\n## References\n\n| Reference | Description |\n|-----------|-------------|\n| `references\u002Frouter-guards.md` | beforeLoad auth redirect |\n| `references\u002Fserver-functions.md` | createServerFn with auth() |\n| `references\u002Floaders.md` | Auth context in loaders |\n| `references\u002Fvinxi-server.md` | clerkMiddleware() setup |\n\n## Setup\n\n```\nnpm install @clerk\u002Ftanstack-react-start\n```\n\n`.env`:\n```\nCLERK_PUBLISHABLE_KEY=pk_...\nCLERK_SECRET_KEY=sk_...\n```\n\n`src\u002Fstart.ts` (Vinxi entry):\n```typescript\nimport { clerkMiddleware } from '@clerk\u002Ftanstack-react-start\u002Fserver'\nimport { createStart } from '@tanstack\u002Freact-start'\n\nexport const startInstance = createStart(() => {\n  return {\n    requestMiddleware: [clerkMiddleware()],\n  }\n})\n```\n\n`src\u002Froutes\u002F__root.tsx` — wrap with `\u003CClerkProvider>`:\n```tsx\nimport { ClerkProvider } from '@clerk\u002Ftanstack-react-start'\n\nfunction RootDocument({ children }: { children: React.ReactNode }) {\n  return (\n    \u003Chtml lang=\"en\">\n      \u003Cbody>\n        \u003CClerkProvider>\n          {children}\n        \u003C\u002FClerkProvider>\n      \u003C\u002Fbody>\n    \u003C\u002Fhtml>\n  )\n}\n```\n\n## Mental Model\n\nTanStack Start runs on Vinxi. Auth flows through two layers:\n\n1. **Server layer** — `createServerFn` + `auth()` from `@clerk\u002Ftanstack-react-start\u002Fserver`\n2. **Router layer** — `beforeLoad` on route definitions, throws `redirect` for unauthenticated\n\nBoth layers are server-executed. Client hooks (`useAuth`, `useUser`) are React hooks for the browser side.\n\n## Minimal Pattern\n\n```typescript\nimport { createFileRoute, redirect } from '@tanstack\u002Freact-router'\nimport { createServerFn } from '@tanstack\u002Freact-start'\nimport { auth } from '@clerk\u002Ftanstack-react-start\u002Fserver'\n\nconst authStateFn = createServerFn().handler(async () => {\n  const { isAuthenticated, userId } = await auth()\n  if (!isAuthenticated) {\n    throw redirect({ to: '\u002Fsign-in' })\n  }\n  return { userId }\n})\n\nexport const Route = createFileRoute('\u002Fdashboard')({\n  beforeLoad: async () => await authStateFn(),\n})\n```\n\n## Common Pitfalls\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| `auth()` returns empty | Missing `clerkMiddleware` in start.ts | Add to `requestMiddleware` array |\n| `redirect` not thrown | Using `return` instead of `throw` | `throw redirect(...)` in TanStack |\n| Wrong import for `auth` | Mixing client\u002Fserver imports | Server: `@clerk\u002Ftanstack-react-start\u002Fserver` |\n| Loader context missing userId | Not passing from beforeLoad | Return from beforeLoad, access via `context` |\n| `ClerkProvider` missing | Forgot root wrapping | Add to `__root.tsx` shell component |\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[TanStack React Start SDK](https:\u002F\u002Fclerk.com\u002Fdocs\u002Ftanstack-react-start\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-external\u002Fclerk-tanstack-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-tanstack-patterns",{"tool":41,"command":42},"bunx","bunx skills add dbillion\u002Fhermes-skills-public --skill clerk-tanstack-patterns",{"tool":44,"command":45},"pnpm","pnpm dlx skills add dbillion\u002Fhermes-skills-public --skill clerk-tanstack-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002FSKILL.md",true,[49,55,59,63,67,71,75,81,85,89,95,99],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"evals\u002Fevals.json","REFERENCE","参考文档",4553,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Fevals\u002Fevals.json",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Floaders.md",1793,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Freferences\u002Floaders.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Frouter-guards.md",2057,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Freferences\u002Frouter-guards.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fserver-functions.md",2152,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Freferences\u002Fserver-functions.md",{"path":68,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fvinxi-server.md",1955,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Freferences\u002Fvinxi-server.md",{"path":72,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":73,"sourceHtmlUrl":74},"templates\u002Ftanstack-basic-auth\u002Fpackage.json",513,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Ftemplates\u002Ftanstack-basic-auth\u002Fpackage.json",{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"templates\u002Ftanstack-basic-auth\u002Fsrc\u002Frouter.tsx","OTHER","其他",488,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Ftemplates\u002Ftanstack-basic-auth\u002Fsrc\u002Frouter.tsx",{"path":82,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":83,"sourceHtmlUrl":84},"templates\u002Ftanstack-basic-auth\u002Fsrc\u002Froutes\u002F__root.tsx",808,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Ftemplates\u002Ftanstack-basic-auth\u002Fsrc\u002Froutes\u002F__root.tsx",{"path":86,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":87,"sourceHtmlUrl":88},"templates\u002Ftanstack-basic-auth\u002Fsrc\u002Froutes\u002Findex.tsx",496,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Ftemplates\u002Ftanstack-basic-auth\u002Fsrc\u002Froutes\u002Findex.tsx",{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"templates\u002Ftanstack-basic-auth\u002Fsrc\u002Fstart.ts","SCRIPT","脚本",237,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Ftemplates\u002Ftanstack-basic-auth\u002Fsrc\u002Fstart.ts",{"path":96,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":97,"sourceHtmlUrl":98},"templates\u002Ftanstack-basic-auth\u002Ftsconfig.json",531,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Ftemplates\u002Ftanstack-basic-auth\u002Ftsconfig.json",{"path":100,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":101,"sourceHtmlUrl":102},"templates\u002Ftanstack-basic-auth\u002Fvite.config.ts",383,"https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills-external\u002Fclerk-tanstack-patterns\u002Ftemplates\u002Ftanstack-basic-auth\u002Fvite.config.ts",[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",[],[]]