TanStack Query v5 integration with Next.js 16. Server-side prefetching, hydration, useQuery, useMutation, cache management.
From fuse-nextjsnpx claudepluginhub fusengine/agents --plugin fuse-nextjsThis skill uses the workspace's default tool permissions.
references/hydration.mdreferences/query-patterns.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
TanStack Query v5 provides powerful server state management with Next.js 16 integration.
Before ANY implementation, use TeamCreate to spawn 3 agents:
After implementation, run fuse-ai-pilot:sniper for validation.
| Feature | Benefit |
|---|---|
| Server prefetching | Data ready on first render, no loading flash |
| Automatic caching | Deduplication, stale-while-revalidate |
| Mutations | Optimistic updates, rollback on error |
| DevTools | Visual cache inspection |
| TypeScript-first | Full type inference |
prefetchQuery for SSR datastaleTime on prefetched queries - Prevent immediate refetch on mountqueryClient in Client Components directly - Use hooksbun add @tanstack/react-query @tanstack/react-query-devtools
staleTime - Prevent unnecessary refetches after hydrationinvalidateQueries after writesthrowOnError for critical queriesprocess.env.NODE_ENV check| Need | Reference |
|---|---|
| useQuery, useMutation | query-patterns.md |
| Server prefetching | hydration.md |
| QueryClient setup | hydration.md |
| Cache invalidation | query-patterns.md |