[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EXBESDHFPHAZKN292SDB6E":3,"skill-same:01M7EXBESDHFPHAZKN292SDB6E":53},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7EXBESDHFPHAZKN292SDB6E","tanstack-router",null,"TanStack Router patterns for this repo — file-based routing, auth guards, search params, data loading, TanStack Query integration, navigation, and code splitting. Use when creating routes, adding pages, implementing auth flows, working with search\u002Fpath params, or integrating loaders with TanStack Query.","Phenomenon-Studio\u002Fphenomenon-configs","Phenomenon-Studio","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F85674486?v=4","01M7EX2X2JF76C91JB202QMQHW","Phenomenon studio","01M7EX2X37T2C5FBHAH4B60YMX",1,"MIT","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftanstack-router\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tanstack-router\ndescription: TanStack Router patterns for this repo — file-based routing, auth guards, search params, data loading, TanStack Query integration, navigation, and code splitting. Use when creating routes, adding pages, implementing auth flows, working with search\u002Fpath params, or integrating loaders with TanStack Query.\nuser-invocable: false\n---\n\n# TanStack Router\n\n## Quick start\n\nThis repo uses **file-based routing** with `@tanstack\u002Frouter-plugin\u002Fvite` and `autoCodeSplitting: true`. Routes live in `src\u002Froutes\u002F`. The generated route tree (`src\u002FrouteTree.gen.ts`) is never edited manually.\n\n### Creating a new page\n\n1. Create `src\u002Froutes\u002F_authenticated\u002F\u003Cpage-name>\u002Findex.tsx`\n2. Use `createFileRoute` — the plugin infers the path\n3. Add navigation link in sidebar constants if needed\n\n```tsx\nimport { createFileRoute } from '@tanstack\u002Freact-router';\n\nexport const Route = createFileRoute('\u002F_authenticated\u002Fmy-page\u002F')({\n  component: MyPageModule,\n});\n\nfunction MyPageModule() {\n  return \u003Cdiv>My Page\u003C\u002Fdiv>;\n}\n```\n\n## Workflows\n\n### Adding an authenticated route\n\n- [ ] Create route file under `src\u002Froutes\u002F_authenticated\u002F`\n- [ ] Add `beforeLoad` with an inline `ability.cannot(action, subject)` check if the route is restricted\n- [ ] Read that action\u002Fsubject pair against this route — a pair naming the wrong resource still compiles\n- [ ] Add loader if data is needed before render\n- [ ] Add sidebar navigation entry in `SidebarNavigation\u002Fconstants.ts`\n- [ ] Run `pnpm run dev:vite` to regenerate route tree\n\n### Adding search params to a route\n\n- [ ] Define Zod schema with `.catch()` fallbacks (not `.default()`)\n- [ ] Attach via `validateSearch`\n- [ ] Use `loaderDeps` if loader needs search params\n- [ ] Access in component via `Route.useSearch()`\n- [ ] See [REFERENCE.md](REFERENCE.md) § Search Params\n\n### Adding route with data loading (TanStack Query)\n\n- [ ] Define query options in `src\u002Fservices\u002F\u003Cdomain>\u002Fqueries.ts`\n- [ ] Blocking data: `queryClient.query({ ...factory(), staleTime: 'static' })` in loader (`queryClient.infiniteQuery` for infinite factories)\n- [ ] Non-blocking data: `queryClient.query(factory()).catch(noop)` — `query()` rejects on error\n- [ ] Never `ensureQueryData`\u002F`fetchQuery`\u002F`prefetchQuery`\u002F`*InfiniteQuery*` — deprecated, removed in v6\n- [ ] Consume with `useSuspenseQuery` (blocking) or `useQuery` (non-blocking)\n- [ ] See [REFERENCE.md](REFERENCE.md) § TanStack Query Integration\n\n## Key conventions\n\n| Pattern | This repo's approach |\n|---|---|\n| Auth guard | `_authenticated\u002Froute.tsx` — `beforeLoad` checks `getAuthToken()` + `queryClient.query({ ...meQueryOptions(), staleTime: 'static' })`, redirects to `\u002Flogin` |\n| Public routes | `_public\u002Froute.tsx` — `beforeLoad` optionally resolves auth (no redirect, works for both logged-in and anonymous users) |\n| Permission check | No guard helper — `beforeLoad({ context: { ability } })` does `if (ability.cannot(PERM_ACTIONS.READ, PERM_SUBJECTS.MERCHANT)) throw notFound()` |\n| Layouts | Pathless `_` prefix dirs (`_authenticated\u002F`, `_unauthenticated\u002F`, `_public\u002F`) with `\u003COutlet \u002F>` |\n| Code splitting | Automatic via Vite plugin — no manual lazy imports needed for routes |\n| Search params | Zod validation with `.catch()`, accessed via `Route.useSearch()` or `getRouteApi()` |\n| Navigation | `\u003CLink>` with `activeProps` for styling; `useNavigate()` for programmatic nav |\n| Router context | `queryClient` + `auth` (discriminated union `AuthContext`) + `ability` (CASL `AppAbility`, deny-all until a layout route rebuilds it) passed via `createRootRouteWithContext` |\n| Router config | `src\u002Flib\u002F@router.tsx` — `Wrap` (no router hooks) and `InnerWrap` (router hooks available) for providers |\n| Perms provider | Mounted by the layout routes that build an ability (`_authenticated`, `_public`), not by a layout component, each passing its own route id as a typed `from`; `_unauthenticated` mounts none, so `usePerms()` is unavailable under it |\n| Preloading | `defaultPreload: 'intent'` — prefetches on hover\u002Ffocus |\n| Error\u002F404 | Global defaults set on router; per-route overrides as needed |\n\n## Advanced features\n\nSee [REFERENCE.md](REFERENCE.md) for detailed patterns:\n\n- Route guards, the router-context ability & per-route permission checks\n- Search params with Zod validation\n- TanStack Query integration (blocking, non-blocking, mixed)\n- Navigation patterns (Link, useNavigate, getRouteApi)\n- Not-found handling\n- Code splitting details\n- Router configuration options\n","# TanStack Router\n\n## Quick start\n\nThis repo uses **file-based routing** with `@tanstack\u002Frouter-plugin\u002Fvite` and `autoCodeSplitting: true`. Routes live in `src\u002Froutes\u002F`. The generated route tree (`src\u002FrouteTree.gen.ts`) is never edited manually.\n\n### Creating a new page\n\n1. Create `src\u002Froutes\u002F_authenticated\u002F\u003Cpage-name>\u002Findex.tsx`\n2. Use `createFileRoute` — the plugin infers the path\n3. Add navigation link in sidebar constants if needed\n\n```tsx\nimport { createFileRoute } from '@tanstack\u002Freact-router';\n\nexport const Route = createFileRoute('\u002F_authenticated\u002Fmy-page\u002F')({\n  component: MyPageModule,\n});\n\nfunction MyPageModule() {\n  return \u003Cdiv>My Page\u003C\u002Fdiv>;\n}\n```\n\n## Workflows\n\n### Adding an authenticated route\n\n- [ ] Create route file under `src\u002Froutes\u002F_authenticated\u002F`\n- [ ] Add `beforeLoad` with an inline `ability.cannot(action, subject)` check if the route is restricted\n- [ ] Read that action\u002Fsubject pair against this route — a pair naming the wrong resource still compiles\n- [ ] Add loader if data is needed before render\n- [ ] Add sidebar navigation entry in `SidebarNavigation\u002Fconstants.ts`\n- [ ] Run `pnpm run dev:vite` to regenerate route tree\n\n### Adding search params to a route\n\n- [ ] Define Zod schema with `.catch()` fallbacks (not `.default()`)\n- [ ] Attach via `validateSearch`\n- [ ] Use `loaderDeps` if loader needs search params\n- [ ] Access in component via `Route.useSearch()`\n- [ ] See [REFERENCE.md](REFERENCE.md) § Search Params\n\n### Adding route with data loading (TanStack Query)\n\n- [ ] Define query options in `src\u002Fservices\u002F\u003Cdomain>\u002Fqueries.ts`\n- [ ] Blocking data: `queryClient.query({ ...factory(), staleTime: 'static' })` in loader (`queryClient.infiniteQuery` for infinite factories)\n- [ ] Non-blocking data: `queryClient.query(factory()).catch(noop)` — `query()` rejects on error\n- [ ] Never `ensureQueryData`\u002F`fetchQuery`\u002F`prefetchQuery`\u002F`*InfiniteQuery*` — deprecated, removed in v6\n- [ ] Consume with `useSuspenseQuery` (blocking) or `useQuery` (non-blocking)\n- [ ] See [REFERENCE.md](REFERENCE.md) § TanStack Query Integration\n\n## Key conventions\n\n| Pattern | This repo's approach |\n|---|---|\n| Auth guard | `_authenticated\u002Froute.tsx` — `beforeLoad` checks `getAuthToken()` + `queryClient.query({ ...meQueryOptions(), staleTime: 'static' })`, redirects to `\u002Flogin` |\n| Public routes | `_public\u002Froute.tsx` — `beforeLoad` optionally resolves auth (no redirect, works for both logged-in and anonymous users) |\n| Permission check | No guard helper — `beforeLoad({ context: { ability } })` does `if (ability.cannot(PERM_ACTIONS.READ, PERM_SUBJECTS.MERCHANT)) throw notFound()` |\n| Layouts | Pathless `_` prefix dirs (`_authenticated\u002F`, `_unauthenticated\u002F`, `_public\u002F`) with `\u003COutlet \u002F>` |\n| Code splitting | Automatic via Vite plugin — no manual lazy imports needed for routes |\n| Search params | Zod validation with `.catch()`, accessed via `Route.useSearch()` or `getRouteApi()` |\n| Navigation | `\u003CLink>` with `activeProps` for styling; `useNavigate()` for programmatic nav |\n| Router context | `queryClient` + `auth` (discriminated union `AuthContext`) + `ability` (CASL `AppAbility`, deny-all until a layout route rebuilds it) passed via `createRootRouteWithContext` |\n| Router config | `src\u002Flib\u002F@router.tsx` — `Wrap` (no router hooks) and `InnerWrap` (router hooks available) for providers |\n| Perms provider | Mounted by the layout routes that build an ability (`_authenticated`, `_public`), not by a layout component, each passing its own route id as a typed `from`; `_unauthenticated` mounts none, so `usePerms()` is unavailable under it |\n| Preloading | `defaultPreload: 'intent'` — prefetches on hover\u002Ffocus |\n| Error\u002F404 | Global defaults set on router; per-route overrides as needed |\n\n## Advanced features\n\nSee [REFERENCE.md](REFERENCE.md) for detailed patterns:\n\n- Route guards, the router-context ability & per-route permission checks\n- Search params with Zod validation\n- TanStack Query integration (blocking, non-blocking, mixed)\n- Navigation patterns (Link, useNavigate, getRouteApi)\n- Not-found handling\n- Code splitting details\n- Router configuration options\n",{"name":5,"description":7,"user-invocable":20},"main","a5c9ac2f39c1611831e417faea2e6d635699d9b5","template\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftanstack-router",0,"https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio","https:\u002F\u002Fphenomenonstudio.com\u002F","Phenomenon is a digital product studio bolstering a core team of world-class developers, designers, and a flexible network of multi-specialized talent. ","2026-10-23 17:20:31",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Phenomenon-Studio\u002Fphenomenon-configs --skill tanstack-router",{"tool":39,"command":40},"bunx","bunx skills add Phenomenon-Studio\u002Fphenomenon-configs --skill tanstack-router",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Phenomenon-Studio\u002Fphenomenon-configs --skill tanstack-router","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftanstack-router\u002FSKILL.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"REFERENCE.md","REFERENCE","参考文档",23990,"https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftanstack-router\u002FREFERENCE.md",[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7EXBNNR8YZB8PD7J8ZAB5FP","web-security","Enforce web security and avoid security vulnerabilities.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Fweb-security\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7EXBJGWKB32NY4R2V141G0S","typescript","Write clean, efficient TypeScript code that follows project conventions and advanced type patterns. Use when writing or reviewing TypeScript code, defining types, creating generics, handling errors, or working with React components, Zod schemas, and TanStack libraries.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftypescript\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7EXBAZW0KSMGVDB9DW157SD","tanstack-query","TanStack Query patterns for this repo — queryOptions\u002FmutationOptions factories, query key hierarchies, service layer integration, optimistic updates, Suspense usage, error handling, and TanStack Router data loading. Use when creating queries, mutations, API services, query keys, cache invalidation, optimistic updates, or integrating data fetching with routes.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftanstack-query\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7EXB6X2TG4HYWCYB293581T","tanstack-form","Build forms using TanStack Form with the project's useAppForm composition, composable field components, Zod validation schemas, FormFieldWrapper error tracking, and form.AppField vs form.Field patterns. Use when creating new forms, adding form fields, writing form validation, or working with TanStack Form in this project.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Ftanstack-form\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7EXB4EXHFSSVY64QQAE77SA","react","Build clean, modern React components that apply common best practices and avoid common pitfalls like unnecessary state management or useEffect usage.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Freact\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7EXAZ8TT354QEA4F7DVHPJ9","generate-a-commit-message","Inspects staged\u002Funstaged changes and produces a short, clean Conventional Commit message that satisfies this repo's commitlint.config.js. Delegates phrasing to the `caveman` skill (full) so the subject is terse and free of filler. Auto-detects ticket IDs (e.g. APP-1234) from the current branch and appends a `Refs:` footer. Validates the final message with `pnpm exec commitlint --edit` before presenting. Use when user says \"generate commit message\", \"write commit\", \"commit msg\", \"what should the commit be\", or invokes \u002Fgenerate-a-commit-message — typically just before `git commit`.","https:\u002F\u002Fgithub.com\u002FPhenomenon-Studio\u002Fphenomenon-configs\u002Fblob\u002Fmain\u002Ftemplate\u002Fproject\u002F{{ '.' if scope == 'app' and stack == 'vite' else '' }}\u002F.claude\u002Fskills\u002Fgenerate-a-commit-message\u002FSKILL.md",[],[]]