tanstack-query
TanStack Query — server state management with queries, mutations, caching, infinite queries, SSR.
от skeletorflet★ 48 звёзд на GitHub
Установить tanstack-query в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
tanstack-query
Queries
useQuery({ queryKey: ['todos'], queryFn: fetchTodos })— fetch + cache + auto-refetch.- Query keys: unique key arrays for cache identity and invalidation.
enabled: false— conditional/disable;staleTime— freshness window;gcTime— garbage collection.placeholderData: keepPreviousData— smooth pagination transitions.
Mutations
useMutation({ mutationFn: addTodo, onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }) }).- Optimistic updates:
onMutate— set cache before server;onError— rollback;onSettled— refetch. mutate(data)vsmutateAsync(data)— fire-and-forget vs promise.
QueryClient
new QueryClient({ defaultOptions: { queries: { staleTime: 5 * 60 * 1000 } } })— global config.queryClient.invalidateQueries({ queryKey: ['todos'] })— refetch stale queries.queryClient.setQueryData(['todos'], newData)— direct cache writes.queryClient.prefetchQuery({ queryKey, queryFn })— warm cache before render.
Infinite Queries
useInfiniteQuery({ queryKey, queryFn: ({ pageParam }) => fetchPage(pageParam), initialPageParam: 0, getNextPageParam: (last) => last.next }).fetchNextPage,hasNextPage,isFetchingNextPage— pagination UI.useInfiniteQueryworks withIntersectionObserverfor scroll loading.
SSR & Devtools
- Hydration:
dehydrate(queryClient)/HydrationBoundary— serialize cache to HTML. <QueryClientProvider>— required wrapper around app.{ ReactQueryDevtools }— dev panel for cache inspection.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tanstack-query?
TanStack Query — server state management with queries, mutations, caching, infinite queries, SSR.
Как установить скилл tanstack-query?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tanstack-query запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…