[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78CVA9NNFH04F7DRC1AC3VM":3,"skill-same:01M78CVA9NNFH04F7DRC1AC3VM":168},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":13,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M78CVA9NNFH04F7DRC1AC3VM","state-management",null,"React Query and Zustand patterns for state management. Use when implementing data fetching, caching, mutations, or client-side state. Triggers on tasks involving useQuery, useMutation, Zustand stores, caching, or state management.","projectweb738-dev\u002FBANKDATA_JHON","projectweb738-dev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F321402929?v=4","01M78BF0E5DXCH964FKTRKZDBT","01M78BF0F66D1WXYXVN7CN29DH",0,"MIT","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: state-management\ndescription: React Query and Zustand patterns for state management. Use when implementing data fetching, caching, mutations, or client-side state. Triggers on tasks involving useQuery, useMutation, Zustand stores, caching, or state management.\nlicense: MIT\nmetadata:\n  author: agent-skills\n  version: \"1.1.0\"\n---\n\n# State Management with React Query + Zustand\n\n**Version 1.1.0** | TanStack Query v5 | Zustand v5 | March 2026\n\n> **Note:**\n> This document provides comprehensive patterns for AI agents and LLMs working with\n> TanStack Query v5 and Zustand v5. All examples are verified against v5 APIs.\n> Optimized for automated refactoring, code generation, and state management best practices.\n\n## v5 Breaking Changes (Quick Reference)\n\n**TanStack Query v5:**\n- `cacheTime` → `gcTime`\n- `keepPreviousData` option → `placeholderData: keepPreviousData` (imported helper)\n- `isPreviousData` → `isPlaceholderData`\n- `onSuccess`\u002F`onError`\u002F`onSettled` removed from `useQuery` — still valid on `useMutation`\n- `suspense: true` on `useQuery` removed → use `useSuspenseQuery`\n\n**Zustand v5:**\n- `shallow` as 2nd arg removed → `useShallow` from `zustand\u002Fshallow`\n- Selectors returning new references need `useShallow` to avoid infinite loops\n\n## Security: Persist Middleware\n\n> **Never persist auth tokens, passwords, or secrets to localStorage\u002FsessionStorage.**\n> Use `partialize` to persist only non-sensitive state. Manage tokens via HttpOnly cookies.\n\n---\n\nComprehensive patterns for server state (React Query) and client state (Zustand). Contains 26+ rules for efficient data fetching and state management.\n\n## When to Apply\n\nReference these guidelines when:\n- Fetching data from APIs\n- Managing server state and caching\n- Handling mutations and optimistic updates\n- Creating client-side stores\n- Combining React Query with Zustand\n\n## Rule Categories by Priority\n\n| Priority | Category | Impact | Prefix |\n|----------|----------|--------|--------|\n| 1 | React Query Basics | CRITICAL | `rq-` |\n| 2 | Zustand Store Patterns | CRITICAL | `zs-` |\n| 3 | Caching & Invalidation | HIGH | `cache-` |\n| 4 | Mutations & Updates | HIGH | `mut-` |\n| 5 | Optimistic Updates | MEDIUM | `opt-` |\n| 6 | DevTools & Debugging | MEDIUM | `dev-` |\n| 7 | Advanced Patterns | LOW | `adv-` |\n\n## Quick Reference\n\n### 1. React Query Basics (CRITICAL)\n\n- `rq-setup` - QueryClient and Provider setup\n- `rq-usequery` - Basic useQuery patterns\n- `rq-querykeys` - Query key organization\n- `rq-loading-error` - Handle loading and error states\n- `rq-enabled` - Conditional queries\n\n### 2. Zustand Store Patterns (CRITICAL)\n\n- `zs-create-store` - Create basic store\n- `zs-typescript` - TypeScript store patterns\n- `zs-selectors` - Efficient selectors\n- `zs-actions` - Action patterns\n- `zs-persist` - Persist state to storage\n\n### 3. Caching & Invalidation (HIGH)\n\n- `cache-stale-time` - Configure stale time\n- `cache-gc-time` - Configure garbage collection\n- `cache-invalidation` - Invalidate queries\n- `cache-prefetch` - Prefetch data\n- `cache-initial-data` - Set initial data\n\n### 4. Mutations & Updates (HIGH)\n\n- `mut-usemutation` - Basic useMutation\n- `mut-callbacks` - onSuccess, onError callbacks\n- `mut-invalidate` - Invalidate after mutation\n- `mut-update-cache` - Direct cache updates\n\n### 5. Optimistic Updates (MEDIUM)\n\n- `opt-basic` - Basic optimistic updates\n- `opt-rollback` - Rollback on error\n- `opt-variables` - Use mutation variables\n\n### 6. DevTools & Debugging (MEDIUM)\n\n- `dev-react-query` - React Query DevTools\n- `dev-zustand` - Zustand DevTools\n- `dev-debugging` - Debug strategies\n\n### 7. Advanced Patterns (LOW)\n\n- `adv-infinite-queries` - Infinite scrolling\n- `adv-parallel-queries` - Parallel requests\n- `adv-dependent-queries` - Dependent queries\n- `adv-query-zustand` - Combine RQ with Zustand\n\n## React Query Patterns\n\n### Setup\n\n```tsx\n\u002F\u002F lib\u002FqueryClient.ts\nimport { QueryClient } from '@tanstack\u002Freact-query'\n\nexport const queryClient = new QueryClient({\n  defaultOptions: {\n    queries: {\n      staleTime: 1000 * 60 * 5, \u002F\u002F 5 minutes\n      gcTime: 1000 * 60 * 30,   \u002F\u002F 30 minutes (formerly cacheTime)\n      retry: 1,\n      refetchOnWindowFocus: false,\n    },\n  },\n})\n\n\u002F\u002F App.tsx\nimport { QueryClientProvider } from '@tanstack\u002Freact-query'\nimport { ReactQueryDevtools } from '@tanstack\u002Freact-query-devtools'\nimport { queryClient } from '.\u002Flib\u002FqueryClient'\n\nfunction App() {\n  return (\n    \u003CQueryClientProvider client={queryClient}>\n      \u003CRouter \u002F>\n      \u003CReactQueryDevtools initialIsOpen={false} \u002F>\n    \u003C\u002FQueryClientProvider>\n  )\n}\n```\n\n### Query Keys Factory\n\n```tsx\n\u002F\u002F lib\u002FqueryKeys.ts\nexport const queryKeys = {\n  \u002F\u002F All posts\n  posts: {\n    all: ['posts'] as const,\n    lists: () => [...queryKeys.posts.all, 'list'] as const,\n    list: (filters: PostFilters) =>\n      [...queryKeys.posts.lists(), filters] as const,\n    details: () => [...queryKeys.posts.all, 'detail'] as const,\n    detail: (id: number) => [...queryKeys.posts.details(), id] as const,\n  },\n\n  \u002F\u002F All users\n  users: {\n    all: ['users'] as const,\n    detail: (id: number) => [...queryKeys.users.all, id] as const,\n    posts: (userId: number) => [...queryKeys.users.all, userId, 'posts'] as const,\n  },\n}\n```\n\n### useQuery Hook\n\n```tsx\n\u002F\u002F hooks\u002FusePosts.ts\nimport { useQuery } from '@tanstack\u002Freact-query'\nimport { queryKeys } from '@\u002Flib\u002FqueryKeys'\nimport { fetchPosts, fetchPost } from '@\u002Fapi\u002Fposts'\n\nexport function usePosts(filters?: PostFilters) {\n  return useQuery({\n    queryKey: queryKeys.posts.list(filters ?? {}),\n    queryFn: () => fetchPosts(filters),\n  })\n}\n\nexport function usePost(id: number) {\n  return useQuery({\n    queryKey: queryKeys.posts.detail(id),\n    queryFn: () => fetchPost(id),\n    enabled: !!id, \u002F\u002F Only run if id exists\n  })\n}\n\n\u002F\u002F Usage in component\nfunction PostList() {\n  const { data: posts, isLoading, error } = usePosts()\n\n  if (isLoading) return \u003CSpinner \u002F>\n  if (error) return \u003CError message={error.message} \u002F>\n\n  return (\n    \u003Cul>\n      {posts?.map((post) => (\n        \u003Cli key={post.id}>{post.title}\u003C\u002Fli>\n      ))}\n    \u003C\u002Ful>\n  )\n}\n```\n\n### useMutation Hook\n\n```tsx\n\u002F\u002F hooks\u002FuseCreatePost.ts\nimport { useMutation, useQueryClient } from '@tanstack\u002Freact-query'\nimport { queryKeys } from '@\u002Flib\u002FqueryKeys'\nimport { createPost } from '@\u002Fapi\u002Fposts'\n\nexport function useCreatePost() {\n  const queryClient = useQueryClient()\n\n  return useMutation({\n    mutationFn: createPost,\n    onSuccess: (newPost) => {\n      \u002F\u002F Invalidate and refetch posts list\n      queryClient.invalidateQueries({\n        queryKey: queryKeys.posts.lists(),\n      })\n    },\n    onError: (error) => {\n      console.error('Failed to create post:', error)\n    },\n  })\n}\n\n\u002F\u002F Usage\nfunction CreatePostForm() {\n  const { mutate, isPending } = useCreatePost()\n\n  const handleSubmit = (data: CreatePostData) => {\n    mutate(data)\n  }\n\n  return (\n    \u003Cform onSubmit={handleSubmit}>\n      {\u002F* form fields *\u002F}\n      \u003Cbutton disabled={isPending}>\n        {isPending ? 'Creating...' : 'Create'}\n      \u003C\u002Fbutton>\n    \u003C\u002Fform>\n  )\n}\n```\n\n### Optimistic Updates\n\n```tsx\nexport function useUpdatePost() {\n  const queryClient = useQueryClient()\n\n  return useMutation({\n    mutationFn: updatePost,\n    onMutate: async (updatedPost) => {\n      \u002F\u002F Cancel outgoing refetches\n      await queryClient.cancelQueries({\n        queryKey: queryKeys.posts.detail(updatedPost.id),\n      })\n\n      \u002F\u002F Snapshot previous value\n      const previousPost = queryClient.getQueryData(\n        queryKeys.posts.detail(updatedPost.id)\n      )\n\n      \u002F\u002F Optimistically update\n      queryClient.setQueryData(\n        queryKeys.posts.detail(updatedPost.id),\n        updatedPost\n      )\n\n      return { previousPost }\n    },\n    onError: (err, updatedPost, context) => {\n      \u002F\u002F Rollback on error\n      queryClient.setQueryData(\n        queryKeys.posts.detail(updatedPost.id),\n        context?.previousPost\n      )\n    },\n    onSettled: (data, error, variables) => {\n      \u002F\u002F Refetch after settle\n      queryClient.invalidateQueries({\n        queryKey: queryKeys.posts.detail(variables.id),\n      })\n    },\n  })\n}\n```\n\n## Zustand Patterns\n\n### Basic Store\n\n```tsx\n\u002F\u002F stores\u002FuseCounterStore.ts\nimport { create } from 'zustand'\n\ninterface CounterState {\n  count: number\n  increment: () => void\n  decrement: () => void\n  reset: () => void\n}\n\nexport const useCounterStore = create\u003CCounterState>((set) => ({\n  count: 0,\n  increment: () => set((state) => ({ count: state.count + 1 })),\n  decrement: () => set((state) => ({ count: state.count - 1 })),\n  reset: () => set({ count: 0 }),\n}))\n\n\u002F\u002F Usage\nfunction Counter() {\n  const { count, increment, decrement } = useCounterStore()\n\n  return (\n    \u003Cdiv>\n      \u003Cspan>{count}\u003C\u002Fspan>\n      \u003Cbutton onClick={increment}>+\u003C\u002Fbutton>\n      \u003Cbutton onClick={decrement}>-\u003C\u002Fbutton>\n    \u003C\u002Fdiv>\n  )\n}\n```\n\n### Store with TypeScript and Middleware\n\n```tsx\n\u002F\u002F stores\u002FuseAuthStore.ts\nimport { create } from 'zustand'\nimport { persist, devtools } from 'zustand\u002Fmiddleware'\n\ninterface User {\n  id: number\n  name: string\n  email: string\n}\n\ninterface AuthState {\n  user: User | null\n  isAuthenticated: boolean\n  login: (user: User) => void\n  logout: () => void\n}\n\n\u002F\u002F ✅ Never persist tokens to localStorage — use HttpOnly cookies server-side\nexport const useAuthStore = create\u003CAuthState>()(\n  devtools(\n    persist(\n      (set) => ({\n        user: null,\n        isAuthenticated: false,\n\n        login: (user) =>\n          set({\n            user,\n            isAuthenticated: true,\n          }),\n\n        logout: () =>\n          set({\n            user: null,\n            isAuthenticated: false,\n          }),\n      }),\n      {\n        name: 'auth-storage',\n        \u002F\u002F Only persist display info and auth flag — tokens must NOT be included\n        partialize: (state) => ({\n          user: state.user,\n          isAuthenticated: state.isAuthenticated,\n        }),\n      }\n    )\n  )\n)\n```\n\n### Selectors for Performance\n\n```tsx\n\u002F\u002F Use selectors to prevent unnecessary re-renders\nfunction UserName() {\n  \u002F\u002F Only re-renders when user.name changes\n  const name = useAuthStore((state) => state.user?.name)\n  return \u003Cspan>{name}\u003C\u002Fspan>\n}\n\n\u002F\u002F Multiple selectors\nfunction UserInfo() {\n  const user = useAuthStore((state) => state.user)\n  const isAuthenticated = useAuthStore((state) => state.isAuthenticated)\n\n  if (!isAuthenticated) return \u003CLoginButton \u002F>\n  return \u003Cspan>{user?.name}\u003C\u002Fspan>\n}\n```\n\n### Combining React Query + Zustand\n\n```tsx\n\u002F\u002F Server state: React Query (what comes from API)\nconst { data: posts } = usePosts()\n\n\u002F\u002F Client state: Zustand (UI state)\nconst { selectedPostId, selectPost } = useUIStore()\n\n\u002F\u002F Use together\nconst selectedPost = posts?.find((p) => p.id === selectedPostId)\n```\n\n## How to Use\n\nRead individual rule files for detailed explanations and code examples:\n\n```\nrules\u002Frq-usequery.md\nrules\u002Frq-query-keys.md\nrules\u002Frq-mutation-setup.md\nrules\u002Frq-optimistic-updates.md\nrules\u002Fzs-create-store.md\nrules\u002Fzs-persist.md\nrules\u002Frq-query-invalidation.md\nrules\u002Frq-prefetching.md\n```\n\n---\n\n## References\n\n### React Query (TanStack Query)\n1. [TanStack Query Documentation](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest)\n2. [React Query Overview](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Foverview)\n3. [Queries Guide](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Fqueries)\n4. [Mutations Guide](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Fmutations)\n5. [Query Keys Guide](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Fquery-keys)\n6. [Optimistic Updates](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Foptimistic-updates)\n7. [Infinite Queries](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Finfinite-queries)\n8. [Paginated Queries](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Fpaginated-queries)\n9. [React Query DevTools](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fdevtools)\n\n### Zustand\n1. [Zustand Demo](https:\u002F\u002Fzustand-demo.pmnd.rs)\n2. [Zustand GitHub](https:\u002F\u002Fgithub.com\u002Fpmndrs\u002Fzustand)\n3. [Getting Started](https:\u002F\u002Fdocs.pmnd.rs\u002Fzustand\u002Fgetting-started\u002Fintroduction)\n4. [TypeScript Guide](https:\u002F\u002Fdocs.pmnd.rs\u002Fzustand\u002Fguides\u002Ftypescript)\n5. [Persisting Store Data](https:\u002F\u002Fdocs.pmnd.rs\u002Fzustand\u002Fintegrations\u002Fpersisting-store-data)\n6. [Zustand Recipes](https:\u002F\u002Fgithub.com\u002Fpmndrs\u002Fzustand#recipes)\n\n---\n\n## License\n\nThis skill is provided as-is for educational and development purposes. React Query is MIT licensed by TanStack. Zustand is MIT licensed by Poimandres (pmnd.rs).\n","# State Management with React Query + Zustand\n\n**Version 1.1.0** | TanStack Query v5 | Zustand v5 | March 2026\n\n> **Note:**\n> This document provides comprehensive patterns for AI agents and LLMs working with\n> TanStack Query v5 and Zustand v5. All examples are verified against v5 APIs.\n> Optimized for automated refactoring, code generation, and state management best practices.\n\n## v5 Breaking Changes (Quick Reference)\n\n**TanStack Query v5:**\n- `cacheTime` → `gcTime`\n- `keepPreviousData` option → `placeholderData: keepPreviousData` (imported helper)\n- `isPreviousData` → `isPlaceholderData`\n- `onSuccess`\u002F`onError`\u002F`onSettled` removed from `useQuery` — still valid on `useMutation`\n- `suspense: true` on `useQuery` removed → use `useSuspenseQuery`\n\n**Zustand v5:**\n- `shallow` as 2nd arg removed → `useShallow` from `zustand\u002Fshallow`\n- Selectors returning new references need `useShallow` to avoid infinite loops\n\n## Security: Persist Middleware\n\n> **Never persist auth tokens, passwords, or secrets to localStorage\u002FsessionStorage.**\n> Use `partialize` to persist only non-sensitive state. Manage tokens via HttpOnly cookies.\n\n---\n\nComprehensive patterns for server state (React Query) and client state (Zustand). Contains 26+ rules for efficient data fetching and state management.\n\n## When to Apply\n\nReference these guidelines when:\n- Fetching data from APIs\n- Managing server state and caching\n- Handling mutations and optimistic updates\n- Creating client-side stores\n- Combining React Query with Zustand\n\n## Rule Categories by Priority\n\n| Priority | Category | Impact | Prefix |\n|----------|----------|--------|--------|\n| 1 | React Query Basics | CRITICAL | `rq-` |\n| 2 | Zustand Store Patterns | CRITICAL | `zs-` |\n| 3 | Caching & Invalidation | HIGH | `cache-` |\n| 4 | Mutations & Updates | HIGH | `mut-` |\n| 5 | Optimistic Updates | MEDIUM | `opt-` |\n| 6 | DevTools & Debugging | MEDIUM | `dev-` |\n| 7 | Advanced Patterns | LOW | `adv-` |\n\n## Quick Reference\n\n### 1. React Query Basics (CRITICAL)\n\n- `rq-setup` - QueryClient and Provider setup\n- `rq-usequery` - Basic useQuery patterns\n- `rq-querykeys` - Query key organization\n- `rq-loading-error` - Handle loading and error states\n- `rq-enabled` - Conditional queries\n\n### 2. Zustand Store Patterns (CRITICAL)\n\n- `zs-create-store` - Create basic store\n- `zs-typescript` - TypeScript store patterns\n- `zs-selectors` - Efficient selectors\n- `zs-actions` - Action patterns\n- `zs-persist` - Persist state to storage\n\n### 3. Caching & Invalidation (HIGH)\n\n- `cache-stale-time` - Configure stale time\n- `cache-gc-time` - Configure garbage collection\n- `cache-invalidation` - Invalidate queries\n- `cache-prefetch` - Prefetch data\n- `cache-initial-data` - Set initial data\n\n### 4. Mutations & Updates (HIGH)\n\n- `mut-usemutation` - Basic useMutation\n- `mut-callbacks` - onSuccess, onError callbacks\n- `mut-invalidate` - Invalidate after mutation\n- `mut-update-cache` - Direct cache updates\n\n### 5. Optimistic Updates (MEDIUM)\n\n- `opt-basic` - Basic optimistic updates\n- `opt-rollback` - Rollback on error\n- `opt-variables` - Use mutation variables\n\n### 6. DevTools & Debugging (MEDIUM)\n\n- `dev-react-query` - React Query DevTools\n- `dev-zustand` - Zustand DevTools\n- `dev-debugging` - Debug strategies\n\n### 7. Advanced Patterns (LOW)\n\n- `adv-infinite-queries` - Infinite scrolling\n- `adv-parallel-queries` - Parallel requests\n- `adv-dependent-queries` - Dependent queries\n- `adv-query-zustand` - Combine RQ with Zustand\n\n## React Query Patterns\n\n### Setup\n\n```tsx\n\u002F\u002F lib\u002FqueryClient.ts\nimport { QueryClient } from '@tanstack\u002Freact-query'\n\nexport const queryClient = new QueryClient({\n  defaultOptions: {\n    queries: {\n      staleTime: 1000 * 60 * 5, \u002F\u002F 5 minutes\n      gcTime: 1000 * 60 * 30,   \u002F\u002F 30 minutes (formerly cacheTime)\n      retry: 1,\n      refetchOnWindowFocus: false,\n    },\n  },\n})\n\n\u002F\u002F App.tsx\nimport { QueryClientProvider } from '@tanstack\u002Freact-query'\nimport { ReactQueryDevtools } from '@tanstack\u002Freact-query-devtools'\nimport { queryClient } from '.\u002Flib\u002FqueryClient'\n\nfunction App() {\n  return (\n    \u003CQueryClientProvider client={queryClient}>\n      \u003CRouter \u002F>\n      \u003CReactQueryDevtools initialIsOpen={false} \u002F>\n    \u003C\u002FQueryClientProvider>\n  )\n}\n```\n\n### Query Keys Factory\n\n```tsx\n\u002F\u002F lib\u002FqueryKeys.ts\nexport const queryKeys = {\n  \u002F\u002F All posts\n  posts: {\n    all: ['posts'] as const,\n    lists: () => [...queryKeys.posts.all, 'list'] as const,\n    list: (filters: PostFilters) =>\n      [...queryKeys.posts.lists(), filters] as const,\n    details: () => [...queryKeys.posts.all, 'detail'] as const,\n    detail: (id: number) => [...queryKeys.posts.details(), id] as const,\n  },\n\n  \u002F\u002F All users\n  users: {\n    all: ['users'] as const,\n    detail: (id: number) => [...queryKeys.users.all, id] as const,\n    posts: (userId: number) => [...queryKeys.users.all, userId, 'posts'] as const,\n  },\n}\n```\n\n### useQuery Hook\n\n```tsx\n\u002F\u002F hooks\u002FusePosts.ts\nimport { useQuery } from '@tanstack\u002Freact-query'\nimport { queryKeys } from '@\u002Flib\u002FqueryKeys'\nimport { fetchPosts, fetchPost } from '@\u002Fapi\u002Fposts'\n\nexport function usePosts(filters?: PostFilters) {\n  return useQuery({\n    queryKey: queryKeys.posts.list(filters ?? {}),\n    queryFn: () => fetchPosts(filters),\n  })\n}\n\nexport function usePost(id: number) {\n  return useQuery({\n    queryKey: queryKeys.posts.detail(id),\n    queryFn: () => fetchPost(id),\n    enabled: !!id, \u002F\u002F Only run if id exists\n  })\n}\n\n\u002F\u002F Usage in component\nfunction PostList() {\n  const { data: posts, isLoading, error } = usePosts()\n\n  if (isLoading) return \u003CSpinner \u002F>\n  if (error) return \u003CError message={error.message} \u002F>\n\n  return (\n    \u003Cul>\n      {posts?.map((post) => (\n        \u003Cli key={post.id}>{post.title}\u003C\u002Fli>\n      ))}\n    \u003C\u002Ful>\n  )\n}\n```\n\n### useMutation Hook\n\n```tsx\n\u002F\u002F hooks\u002FuseCreatePost.ts\nimport { useMutation, useQueryClient } from '@tanstack\u002Freact-query'\nimport { queryKeys } from '@\u002Flib\u002FqueryKeys'\nimport { createPost } from '@\u002Fapi\u002Fposts'\n\nexport function useCreatePost() {\n  const queryClient = useQueryClient()\n\n  return useMutation({\n    mutationFn: createPost,\n    onSuccess: (newPost) => {\n      \u002F\u002F Invalidate and refetch posts list\n      queryClient.invalidateQueries({\n        queryKey: queryKeys.posts.lists(),\n      })\n    },\n    onError: (error) => {\n      console.error('Failed to create post:', error)\n    },\n  })\n}\n\n\u002F\u002F Usage\nfunction CreatePostForm() {\n  const { mutate, isPending } = useCreatePost()\n\n  const handleSubmit = (data: CreatePostData) => {\n    mutate(data)\n  }\n\n  return (\n    \u003Cform onSubmit={handleSubmit}>\n      {\u002F* form fields *\u002F}\n      \u003Cbutton disabled={isPending}>\n        {isPending ? 'Creating...' : 'Create'}\n      \u003C\u002Fbutton>\n    \u003C\u002Fform>\n  )\n}\n```\n\n### Optimistic Updates\n\n```tsx\nexport function useUpdatePost() {\n  const queryClient = useQueryClient()\n\n  return useMutation({\n    mutationFn: updatePost,\n    onMutate: async (updatedPost) => {\n      \u002F\u002F Cancel outgoing refetches\n      await queryClient.cancelQueries({\n        queryKey: queryKeys.posts.detail(updatedPost.id),\n      })\n\n      \u002F\u002F Snapshot previous value\n      const previousPost = queryClient.getQueryData(\n        queryKeys.posts.detail(updatedPost.id)\n      )\n\n      \u002F\u002F Optimistically update\n      queryClient.setQueryData(\n        queryKeys.posts.detail(updatedPost.id),\n        updatedPost\n      )\n\n      return { previousPost }\n    },\n    onError: (err, updatedPost, context) => {\n      \u002F\u002F Rollback on error\n      queryClient.setQueryData(\n        queryKeys.posts.detail(updatedPost.id),\n        context?.previousPost\n      )\n    },\n    onSettled: (data, error, variables) => {\n      \u002F\u002F Refetch after settle\n      queryClient.invalidateQueries({\n        queryKey: queryKeys.posts.detail(variables.id),\n      })\n    },\n  })\n}\n```\n\n## Zustand Patterns\n\n### Basic Store\n\n```tsx\n\u002F\u002F stores\u002FuseCounterStore.ts\nimport { create } from 'zustand'\n\ninterface CounterState {\n  count: number\n  increment: () => void\n  decrement: () => void\n  reset: () => void\n}\n\nexport const useCounterStore = create\u003CCounterState>((set) => ({\n  count: 0,\n  increment: () => set((state) => ({ count: state.count + 1 })),\n  decrement: () => set((state) => ({ count: state.count - 1 })),\n  reset: () => set({ count: 0 }),\n}))\n\n\u002F\u002F Usage\nfunction Counter() {\n  const { count, increment, decrement } = useCounterStore()\n\n  return (\n    \u003Cdiv>\n      \u003Cspan>{count}\u003C\u002Fspan>\n      \u003Cbutton onClick={increment}>+\u003C\u002Fbutton>\n      \u003Cbutton onClick={decrement}>-\u003C\u002Fbutton>\n    \u003C\u002Fdiv>\n  )\n}\n```\n\n### Store with TypeScript and Middleware\n\n```tsx\n\u002F\u002F stores\u002FuseAuthStore.ts\nimport { create } from 'zustand'\nimport { persist, devtools } from 'zustand\u002Fmiddleware'\n\ninterface User {\n  id: number\n  name: string\n  email: string\n}\n\ninterface AuthState {\n  user: User | null\n  isAuthenticated: boolean\n  login: (user: User) => void\n  logout: () => void\n}\n\n\u002F\u002F ✅ Never persist tokens to localStorage — use HttpOnly cookies server-side\nexport const useAuthStore = create\u003CAuthState>()(\n  devtools(\n    persist(\n      (set) => ({\n        user: null,\n        isAuthenticated: false,\n\n        login: (user) =>\n          set({\n            user,\n            isAuthenticated: true,\n          }),\n\n        logout: () =>\n          set({\n            user: null,\n            isAuthenticated: false,\n          }),\n      }),\n      {\n        name: 'auth-storage',\n        \u002F\u002F Only persist display info and auth flag — tokens must NOT be included\n        partialize: (state) => ({\n          user: state.user,\n          isAuthenticated: state.isAuthenticated,\n        }),\n      }\n    )\n  )\n)\n```\n\n### Selectors for Performance\n\n```tsx\n\u002F\u002F Use selectors to prevent unnecessary re-renders\nfunction UserName() {\n  \u002F\u002F Only re-renders when user.name changes\n  const name = useAuthStore((state) => state.user?.name)\n  return \u003Cspan>{name}\u003C\u002Fspan>\n}\n\n\u002F\u002F Multiple selectors\nfunction UserInfo() {\n  const user = useAuthStore((state) => state.user)\n  const isAuthenticated = useAuthStore((state) => state.isAuthenticated)\n\n  if (!isAuthenticated) return \u003CLoginButton \u002F>\n  return \u003Cspan>{user?.name}\u003C\u002Fspan>\n}\n```\n\n### Combining React Query + Zustand\n\n```tsx\n\u002F\u002F Server state: React Query (what comes from API)\nconst { data: posts } = usePosts()\n\n\u002F\u002F Client state: Zustand (UI state)\nconst { selectedPostId, selectPost } = useUIStore()\n\n\u002F\u002F Use together\nconst selectedPost = posts?.find((p) => p.id === selectedPostId)\n```\n\n## How to Use\n\nRead individual rule files for detailed explanations and code examples:\n\n```\nrules\u002Frq-usequery.md\nrules\u002Frq-query-keys.md\nrules\u002Frq-mutation-setup.md\nrules\u002Frq-optimistic-updates.md\nrules\u002Fzs-create-store.md\nrules\u002Fzs-persist.md\nrules\u002Frq-query-invalidation.md\nrules\u002Frq-prefetching.md\n```\n\n---\n\n## References\n\n### React Query (TanStack Query)\n1. [TanStack Query Documentation](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest)\n2. [React Query Overview](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Foverview)\n3. [Queries Guide](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Fqueries)\n4. [Mutations Guide](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Fmutations)\n5. [Query Keys Guide](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Fquery-keys)\n6. [Optimistic Updates](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Foptimistic-updates)\n7. [Infinite Queries](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Finfinite-queries)\n8. [Paginated Queries](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fguides\u002Fpaginated-queries)\n9. [React Query DevTools](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Freact\u002Fdevtools)\n\n### Zustand\n1. [Zustand Demo](https:\u002F\u002Fzustand-demo.pmnd.rs)\n2. [Zustand GitHub](https:\u002F\u002Fgithub.com\u002Fpmndrs\u002Fzustand)\n3. [Getting Started](https:\u002F\u002Fdocs.pmnd.rs\u002Fzustand\u002Fgetting-started\u002Fintroduction)\n4. [TypeScript Guide](https:\u002F\u002Fdocs.pmnd.rs\u002Fzustand\u002Fguides\u002Ftypescript)\n5. [Persisting Store Data](https:\u002F\u002Fdocs.pmnd.rs\u002Fzustand\u002Fintegrations\u002Fpersisting-store-data)\n6. [Zustand Recipes](https:\u002F\u002Fgithub.com\u002Fpmndrs\u002Fzustand#recipes)\n\n---\n\n## License\n\nThis skill is provided as-is for educational and development purposes. React Query is MIT licensed by TanStack. Zustand is MIT licensed by Poimandres (pmnd.rs).\n",{"name":5,"license":14,"metadata":23,"description":7},{"author":24,"version":25},"agent-skills","1.1.0","main","1d1992f15739dafb1e105b9293d9d4a60f3f940f","bankdata\u002F.agents\u002Fskills\u002Fstate-management","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON","https:\u002F\u002Fbankdata-jhon.vercel.app","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev","2026-09-01 19:20:34",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add projectweb738-dev\u002FBANKDATA_JHON --skill state-management",{"tool":39,"command":40},"bunx","bunx skills add projectweb738-dev\u002FBANKDATA_JHON --skill state-management",{"tool":42,"command":43},"pnpm","pnpm dlx skills add projectweb738-dev\u002FBANKDATA_JHON --skill state-management","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002FSKILL.md",true,[47,53,57,61,65,69,73,77,81,85,89,93,97,101,105,109,112,116,120,124,128,132,136,140,144,148,152,156,160,164],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"AGENTS.md","REFERENCE","参考文档",15055,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002FAGENTS.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"README.md",3439,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002FREADME.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"rules\u002F_sections.md",4795,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002F_sections.md",{"path":62,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":63,"sourceHtmlUrl":64},"rules\u002F_template.md",2459,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002F_template.md",{"path":66,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":67,"sourceHtmlUrl":68},"rules\u002Frq-cache-time.md",3940,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-cache-time.md",{"path":70,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":71,"sourceHtmlUrl":72},"rules\u002Frq-dependent-queries.md",6564,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-dependent-queries.md",{"path":74,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":75,"sourceHtmlUrl":76},"rules\u002Frq-enabled-option.md",4644,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-enabled-option.md",{"path":78,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":79,"sourceHtmlUrl":80},"rules\u002Frq-infinite-queries.md",6529,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-infinite-queries.md",{"path":82,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":83,"sourceHtmlUrl":84},"rules\u002Frq-initial-data.md",5637,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-initial-data.md",{"path":86,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":87,"sourceHtmlUrl":88},"rules\u002Frq-mutation-callbacks.md",5755,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-mutation-callbacks.md",{"path":90,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":91,"sourceHtmlUrl":92},"rules\u002Frq-mutation-setup.md",4855,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-mutation-setup.md",{"path":94,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":95,"sourceHtmlUrl":96},"rules\u002Frq-mutation-side-effects.md",7048,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-mutation-side-effects.md",{"path":98,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":99,"sourceHtmlUrl":100},"rules\u002Frq-mutation-variables.md",5798,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-mutation-variables.md",{"path":102,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":103,"sourceHtmlUrl":104},"rules\u002Frq-optimistic-updates.md",6596,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-optimistic-updates.md",{"path":106,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":107,"sourceHtmlUrl":108},"rules\u002Frq-paginated-queries.md",6909,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-paginated-queries.md",{"path":110,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":103,"sourceHtmlUrl":111},"rules\u002Frq-parallel-queries.md","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-parallel-queries.md",{"path":113,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":114,"sourceHtmlUrl":115},"rules\u002Frq-placeholder-data.md",4995,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-placeholder-data.md",{"path":117,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":118,"sourceHtmlUrl":119},"rules\u002Frq-prefetching.md",7539,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-prefetching.md",{"path":121,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":122,"sourceHtmlUrl":123},"rules\u002Frq-query-cancellation.md",6841,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-query-cancellation.md",{"path":125,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":126,"sourceHtmlUrl":127},"rules\u002Frq-query-functions.md",3954,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-query-functions.md",{"path":129,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":130,"sourceHtmlUrl":131},"rules\u002Frq-query-invalidation.md",7008,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-query-invalidation.md",{"path":133,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":134,"sourceHtmlUrl":135},"rules\u002Frq-query-keys.md",3037,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-query-keys.md",{"path":137,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":138,"sourceHtmlUrl":139},"rules\u002Frq-refetch-options.md",4680,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-refetch-options.md",{"path":141,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":142,"sourceHtmlUrl":143},"rules\u002Frq-retry-logic.md",5612,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-retry-logic.md",{"path":145,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":146,"sourceHtmlUrl":147},"rules\u002Frq-select-transform.md",5133,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-select-transform.md",{"path":149,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":150,"sourceHtmlUrl":151},"rules\u002Frq-stale-time.md",3593,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-stale-time.md",{"path":153,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":154,"sourceHtmlUrl":155},"rules\u002Frq-suspense-mode.md",6917,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-suspense-mode.md",{"path":157,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":158,"sourceHtmlUrl":159},"rules\u002Frq-usequery.md",5237,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Frq-usequery.md",{"path":161,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":162,"sourceHtmlUrl":163},"rules\u002Fzs-create-store.md",5907,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Fzs-create-store.md",{"path":165,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":166,"sourceHtmlUrl":167},"rules\u002Fzs-persist.md",6506,"https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fstate-management\u002Frules\u002Fzs-persist.md",[169,176,183,192,199,207],{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":18},"01M78D1BKYFY69R04PNRR5HSZJ","wordpress-pro","Develops custom WordPress themes and plugins, creates and registers Gutenberg blocks and block patterns, configures WooCommerce stores, implements WordPress REST API endpoints, applies security hardening (nonces, sanitization, escaping, capability checks), and optimizes performance through caching and query tuning. Use when building WordPress themes, writing plugins, customizing Gutenberg blocks, extending WooCommerce, working with ACF, using the WordPress REST API, applying hooks and filters, or improving WordPress performance and security.","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fwordpress-pro\u002FSKILL.md",[],[],{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":18},"01M78D13G4YF5N0SPXAJRA1JYT","websocket-engineer","Use when building real-time communication systems with WebSockets or Socket.IO. Invoke for bidirectional messaging, horizontal scaling with Redis, presence tracking, room management.","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fwebsocket-engineer\u002FSKILL.md",[],[],{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":187,"licenseFileUrl":188,"sourceHtmlUrl":189,"categories":190,"keywords":191,"publishedAt":18},"01M78D10XEZAMYSSWTRE2WS9KK","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":193,"name":194,"nameZh":6,"description":195,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":196,"categories":197,"keywords":198,"publishedAt":18},"01M78D0V06RFFQBT70678K5Y7M","web-design-guidelines","UI\u002FUX best practices and accessibility audit. Use when reviewing UI code, checking accessibility, running accessibility audits, auditing forms, or ensuring web interface best practices. Triggers on \"audit accessibility\", \"check WCAG\", \"review UI\", \"check accessibility\", \"audit design\", \"review UX\", or \"check best practices\".","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fweb-design-guidelines\u002FSKILL.md",[],[],{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":187,"licenseFileUrl":203,"sourceHtmlUrl":204,"categories":205,"keywords":206,"publishedAt":18},"01M78D0QH26WXXHZW4V54HS0TS","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fweb-artifacts-builder\u002FSKILL.md",[],[],{"skillNo":208,"name":209,"nameZh":6,"description":210,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":211,"categories":212,"keywords":213,"publishedAt":18},"01M78D0C3NRETBTGVCFTXG6PSF","vue-expert","Builds Vue 3 components with Composition API patterns, configures Nuxt 3 SSR\u002FSSG projects, sets up Pinia stores, scaffolds Quasar\u002FCapacitor mobile apps, implements PWA features, and optimises Vite builds. Use when creating Vue 3 applications with Composition API, writing reusable composables, managing state with Pinia, building hybrid mobile apps with Quasar or Capacitor, configuring service workers, or tuning Vite configuration and TypeScript integration.","https:\u002F\u002Fgithub.com\u002Fprojectweb738-dev\u002FBANKDATA_JHON\u002Fblob\u002Fmain\u002Fbankdata\u002F.agents\u002Fskills\u002Fvue-expert\u002FSKILL.md",[],[]]