Use the ChatJS React Query v5 lazy-prefetch pattern without blocking server rendering. Use when prefetching tRPC queries in Next.js Server Components or changing query dehydration and hydration behavior in apps/chat.
Scanned 9/2/2026
Install to Claude Code
npx -y skills add FranciscoMoretti/chat-js --skill lazy-prefetch-pattern --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Lazy Prefetch Pattern?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/franciscomoretti-lazy-prefetch-pattern-chat-js)More formats (shields.io, HTML) on the badges page.
---
name: lazy-prefetch-pattern
description: Use the ChatJS React Query v5 lazy-prefetch pattern without blocking server rendering. Use when prefetching tRPC queries in Next.js Server Components or changing query dehydration and hydration behavior in apps/chat.
---
# Lazy prefetch pattern
Start optional server prefetches early without awaiting them so they can stream
through React hydration without blocking rendering.
- Use the exported `prefetch()` helper from `@/trpc/server`:
`prefetch(trpc.foo.bar.queryOptions(...))`. It handles both paginated and
non-paginated queries.
- Await only data required before rendering.
- Render through the existing `HydrateClient` or `HydrationBoundary`.
This depends on `trpc/query-client.ts` dehydrating pending queries and using
SuperJSON for serialization and hydration. Preserve those settings when using
this pattern.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...