{"id":48633,"plugin_id":"plugin_asdk_app_6abd682abcbc8191b992c346a4afe819","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-10-24T13:37:00.791Z","digest":"0d227bd4b07a2cd502139ae5914ee334fc52c785824dea95e3f868dc48e803ac","against":null,"payload":{"description":"Introduce, add, debug, or migrate TanStack Query for cache and coordinate asynchronous server state.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":102}],"name":"tanstack-query","skill_md_contents":"---\nname: tanstack-query\ndescription: Introduce, add, debug, or migrate TanStack Query for cache and coordinate asynchronous server state.\n---\n\n# TanStack Query\n\nCache and coordinate asynchronous server state.\n\nUse it for: Repeated API reads, shared request state, retries, mutations, and background refresh.\n\nUsually unnecessary for: A one-off fetch with no shared cache or a component-local UI toggle.\n\n## Install and try\n\nUse the project's framework and package manager. These examples target the current official documentation checked on September 30, 2026. Match installed versions before copying them into an existing project.\n\n```sh\nnpm install @tanstack/react-query\n```\n\nMinimal example, paste into an existing React app:\n\n```tsx\nimport { QueryClient, QueryClientProvider, useQuery } from '@tanstack/react-query'\nconst client = new QueryClient()\nfunction Greeting() {\n  const query = useQuery({ queryKey: ['greeting'], queryFn: async () => 'Hello' })\n  if (query.isPending) return <p>Loading</p>\n  if (query.isError) return <p>{query.error.message}</p>\n  return <p>{query.data}</p>\n}\nexport function App() {\n  return <QueryClientProvider client={client}><Greeting /></QueryClientProvider>\n}\n```\n\nUse stable query keys that include every query input. Throw on failed HTTP status, because fetch does not. Keep one browser client and request-scoped clients for SSR. For writes, define invalidation and rollback. Query v5 uses object options. Do not replace local UI state with Query.\n\n## Implement, debug, or migrate\n\nRead the project's package manifest and lockfile before changing dependencies. Load version-matched TanStack Intent guidance with `npx @tanstack/intent@latest list`, then `npx @tanstack/intent@latest load` followed by a concrete identifier returned by the list. Do not invent skill names or assume every version includes skills. If no relevant skill is packaged, use the installed version's official docs and source. Current web docs can describe a newer API than the lockfile.\n\nFor an existing project, reproduce the failure and change the smallest relevant integration. For migration, read the version-specific migration guide and preserve behavior through a small verified slice before migrating the rest. Run the project's relevant build and checks, then verify the user-visible feature. Do not add unrelated TanStack packages.\n\nIn ChatGPT without a shell or repository tools, use the connected documentation tools and provide the code and exact commands for the user to run. Never claim files were edited, packages installed, or checks passed without execution evidence.\n\n[Official docs](https://tanstack.com/query/latest/docs/framework/react/overview) · [Version-matched guidance](https://tanstack.com/intent/latest/docs/overview)\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}