一键导入
react
React coding standards for this project. Use when writing or modifying React components, hooks, or route files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
React coding standards for this project. Use when writing or modifying React components, hooks, or route files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Code refactor to improve implementation details, only use when explicitly requested by user.
Guides correct usage of the Rostra state management library (createStore, Store, useStore), including store scoping, selectors, optional access, prop-driven initialization, and typing. Use only when the user asks you to work with an existing rostra store or to implement a new one.
Use whenever the scope of your task touches the shopify package or its uses anywhere in the project.
TypeScript coding standards for this project. Use when writing or modifying TypeScript files.
| name | react |
| description | React coding standards for this project. Use when writing or modifying React components, hooks, or route files. |
These are the React standards for this project. Follow them when writing or modifying any React code. For detailed rationale, examples, and edge cases on composition and data patterns, see the individual reference files.
<SomePage />, that component's content belongs inline in the route component. If the page is simple, the route component just contains the markup directly.TanStack Query is the primary state management solution for server data. Components should pull data directly using hooks (useSuspenseQuery, useSearch, useRouteContext, useStore) at the leaf level where it's needed — never prop drill data that a hook can provide directly.
*Queries files using queryOptions.validateSearch + useSearch): For state that should persist across refreshes, be shareable via link, or be bookmarkable.rostra skill for implementation details.When uncertain about the right choice, ask the user.
ensureQueryData (or ensureInfiniteQueryData). Declare loaderDeps when the loader depends on search params.*Queries files using queryOptions. For Convex, wrap convexQuery() in queryOptions() — no explicit queryKey needed since convexQuery generates keys automatically.mutationOptions for all mutations. Convex mutations must be defined inside a hook (since useConvexMutation is a hook).useSuspenseQuery. Since the loader already populated the cache, this resolves synchronously. Pull data at the leaf component — do not drill it from parents.select the minimum data one consumer needs over a single shared hook that returns a large object. The query cache deduplicates fetches, so multiple hooks hitting the same query key with different select functions cost nothing. Name hooks after the data they provide (useCartQuantity, useProductTitle), not the query they read from.onMutate, snapshot previous data, apply optimistic change, roll back in onError. For Convex — use .withOptimisticUpdate. Prioritize for actions where perceived latency matters (cart ops, toggles, inline edits).defaultPendingComponent, defaultErrorComponent, and defaultNotFoundComponent. Only check mutation status (isPending, isError) for mutation-driven UI feedback.