harlan-zw avatar

Tanstack Vue Query Skilld

This one's essential if you're using TanStack Query (formerly React Query) in Vue apps. It covers the composables for async data fetching, caching, and sync across components. The API changes section is thorough, including the breaking change where useQueries now returns a Ref instead of Reactive, plus newer features like reactive getter functions and injection context support. Best practices are solid: use queryOptions for type safety, pass reactive values directly into queryKey arrays, and treat query keys like dependency arrays. The ESLint guidance alone will save you from common pitfalls like recreating QueryClient instances in components or over-subscribing with rest destructuring.

skills.sh installs
128
GitHub stars
165
last updated
Jun 3, 2026

Install

$ npx -y skills add harlan-zw/vue-ecosystem-skills --skill tanstack-vue-query-skilld --agent claude-code

Installs into .claude/skills of the current project.

Files

@tanstack/vue-query@5.103.2

Async data hooks for Vue. Version 5.103.2, prepared source at input/source. Peer deps: vue ^2.6.0 || ^3.3.0; Vue 2 needs @vue/composition-api (optional peer) (package.json:56-59). Re-exports everything from @tanstack/query-core 5.103.2, so keepPreviousData, skipToken, focusManager, onlineManager, hydration utils, and observer classes import from @tanstack/vue-query directly (src/index.ts:1).

Setup

Install the plugin once per app. It creates (or accepts) a QueryClient, provides it app-wide, and mounts/unmounts it (src/vueQueryPlugin.ts:74-154):

import { createApp } from 'vue'
import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query'

const app = createApp(App)

// Option A: pass your own client (required for SSR — one fresh client per request)
const queryClient = new QueryClient()
app.use(VueQueryPlugin, { queryClient })

// Option B: let the plugin build one with your defaults
app.use(VueQueryPlugin, {
  queryClientConfig: { defaultOptions: { queries: { staleTime: 5 * 1000 } } },
})

Sponsors

Details

Repository
github.com/harlan-zw/vue-ecosystem-skills
Category
Frontend Development
First seen
Jun 3, 2026

More from harlan-zw/vue-ecosystem-skills

All 10
1sickn33 avatarandroid_ui_verificationsickn33/antigravity-awesome-skillsandroid ui verification119skills.sh installs
2agentworkforce avatarfrontend-designagentworkforce/relayCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applicat0skills.sh installs
3davila7 avatarCross-Site Scripting and HTML Injection Testingdavila7/claude-code-templatesThis skill should be used when the user asks to "test for XSS vulnerabilities", "perform cross-site scripting attacks", "identify HTML injection flaws", "exploi0skills.sh installs
4dojoengine avatardojo-reactdojoengine/dojo.js|0skills.sh installs
5kostard avatarforgecad-component-modelkostard/forgecad-public-kitEnforce the ForgeCAD Component Model when building multi-part assemblies. Parts build at origin, connectors position them, data flows down from parent. Use when0skills.sh installs
6lukerenton avatarfrontend-designlukerenton/explore-claude-codeCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applicat0skills.sh installs