AI-Readiness Scorecard
@tanstack/react-query · v5.101.4

TanStack Query is 100% ready for AI coding agents.

Claude Opus 5 has fully caught up to TanStack Query v5 — all 13 tasks compile clean, including every v4→v5 trap: object-only useQuery, gcTime, placeholderData: keepPreviousData, the renamed 'pending' status, and useInfiniteQuery's now-required initialPageParam. There's nothing to fix.

100/100
Agent-readiness
13 compile clean 0 fail type-check
Model: claude-opus-5 Tasks: 13 Method: tsc against real installed package Run: 2026-07-26
Prisma 7
87
client setup on v6 →
Vercel AI SDK 7
100
clean sweep →
Zod 4
100
clean sweep →
TanStack Query 5
100
fully absorbed
The interesting part

Every v4→v5 trap — navigated

v5 removed or renamed a lot. A model trained mostly on v4 fails all of these. Here's what Opus 5 actually wrote, verified against the installed v5.

The five v4 traps in TanStack Query v50 errors
A v4-trained model writes
// positional signature
useQuery(['todo', id], fetchTodo)

// QueryClient cache option
{ cacheTime: 5 * 60_000 }

// keep prior page's data
{ keepPreviousData: true }

// pending status
q.status === 'loading'

// infinite query
useInfiniteQuery({ queryKey, queryFn,
  getNextPageParam })  // no init
Opus 5 wrote (v5) ✓
// object-only
useQuery({ queryKey: ['todo', id],
  queryFn: fetchTodo })

// renamed
{ gcTime: 5 * 60_000 }

// new helper
{ placeholderData: keepPreviousData }

// renamed
q.status === 'pending'

// initialPageParam now required
useInfiniteQuery({ queryKey, queryFn,
  initialPageParam: 0, getNextPageParam })
Each left-hand line was valid v4 and errors against v5 (TS2769, TS2353, TS2367). The model wrote the v5 form for all five — it even imported keepPreviousData to feed placeholderData. The drift window has fully closed for this library.
13 of 13

What it gets right

Modern TanStack Query is second nature to the model.

Queries, mutations, caching config, conditional fetching, pagination, and infinite scroll all compile clean on the first try — with the current v5 API surface, not the v4 one.

useQuery (object) useMutation select enabled multi-part queryKey staleTime gcTime placeholderData: keepPreviousData status: 'pending' initialPageParam
Read the whole board together

Readiness tracks the drift window

Read the board top to bottom and the pattern is exact: the older the breaking change, the higher the score. Prisma 7 (most recent major) → 87, Next.js 16 → 92. The 2025 majors — the Vercel AI SDK and Zod — are now fully absorbed by Opus 5 → 100. TanStack Query v5 (shipped 2023) → 100 too, absorbed long ago.

A perfect score isn't luck — it's a library that changed long enough ago for the model to have learned it. The gap only shows on recent majors, and it re-opens the day your library ships its next one. That moving number is exactly what SDKProof tracks.

No opinions — just the compiler

How this was measured

13 realistic TanStack Query tasks → generated by claude-opus-5 → each solution written into a project with the real installed @tanstack/react-query v5.101.4 (+ react, @types/react) and type-checked with tsc --noEmit.
A task passes only if it compiles clean. The prompts name the functions but never the option names — so this measures what the model reaches for, not what it's told. Reproducible: pinned package versions, pinned model.

Is your SDK ready for AI agents?

Right after a major release, agents keep shipping your old API. SDKProof scores it, tracks it across model releases, and tells you exactly what to fix.

See it on GitHub →
early project · scorecards are independent analysis