Agent skill

Lazy Prefetch Pattern

by FranciscoMoretti in FranciscoMoretti/chat-js

Use the ChatJS React Query v5 lazy-prefetch pattern without blocking server rendering.

Apache-2.0Auto-check passedBackend & APIs

Install Lazy Prefetch Pattern

skills CLI
$ npx skills add FranciscoMoretti/chat-js --skill lazy-prefetch-pattern -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install FranciscoMoretti/chat-js lazy-prefetch-pattern --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/FranciscoMoretti/chat-js.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/lazy-prefetch-pattern .claude/skills/lazy-prefetch-pattern && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
lazy-prefetch-pattern
GitHub stars
1.2k
Token cost
~217 tokens
SKILL.md length
70 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Use the ChatJS React Query v5 lazy-prefetch pattern without blocking server rendering.

  • Prefetching tRPC queries in Next.js Server Components
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Changing query dehydration and hydration behavior in apps/chat

What it does

Lazy Prefetch Pattern is an agent skill from FranciscoMoretti/chat-js. 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.

Its SKILL.md is about 220 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering gRPC and Protobuf. It works with tRPC, Next.js, TanStack and OpenAI. The repository describes itself as: Production-ready AI chat. Start here and make it your own. Formerly Sparka AI. The licence is Apache-2.0.

When your agent uses it

  • Prefetching tRPC queries in Next.js Server Components
  • Changing query dehydration and hydration behavior in apps/chat

Example prompts

  • “/lazy-prefetch-pattern”

What it can do on your machine

Read from SKILL.md and the folder at commit 3a6dfcb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Lazy Prefetch Pattern loads about 217 tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 70 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~217

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from FranciscoMoretti/chat-js at commit 3a6dfcb, republished under its Apache-2.0 licence (© FranciscoMoretti). 70 words, ~217 tokens.

Download SKILL.mdSave it as .claude/skills/lazy-prefetch-pattern/SKILL.md (or your agent's skills folder).
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.

© FranciscoMoretti, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/lazy-prefetch-pattern of FranciscoMoretti/chat-js.

Open the folder on GitHubat commit 3a6dfcb

Compare with similar skills

Lazy Prefetch Pattern next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Lazy Prefetch Pattern compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lazy Prefetch Pattern this skillFranciscoMoretti/chat-js1.2k—~217Automated safety check: PassApache-2.0
Olore Trpc Latestolorehq/olore103—~1kAutomated safety check: PassMIT
Trpcpproenca/dot-skills214—~2.8kAutomated safety check: PassMIT
Backend Dev Guidelineslitefuse/litefuse1001 repos~5.8kAutomated safety check: PassCustom licence
Trpc Fullstacksickn33/agentic-awesome-skills47k2 repos~3.9kAutomated safety check: PassMIT
Nodetool API Referencenodetool-ai/nodetool554—~2.8kAutomated safety check: PassAGPL-3.0

Similar skills

  • Olore Trpc Latest

    olorehq/olore

    Local tRPC documentation reference (latest). An agent skill from olorehq/olore.

    103 GitHub stars~1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Trpc

    pproenca/dot-skills

    Corrects the wrong defaults a model has for tRPC v11 (verified against 11.18.0).

    214 GitHub stars~2.8k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Backend Dev Guidelines

    litefuse/litefuse

    Comprehensive backend development guide for Litefuse's Next.js 14/tRPC/Express/TypeScript monorepo.

    100 GitHub starsUsed in 1 repo~5.8k tokens
    Backend & APIsAuto-check passed
  • Trpc Fullstack

    sickn33/agentic-awesome-skills

    Build end-to-end type-safe APIs with tRPC — routers, procedures, middleware, subscriptions, and Next.js/React integration patterns.

    47k GitHub starsUsed in 2 repos~3.9k tokens
    Backend & APIsAuto-check passed
  • Nodetool API Reference

    nodetool-ai/nodetool

    Integrate with NodeTool over REST, tRPC, MsgPack WebSocket, MCP, or the OpenAI-compatible Chat API, including the document surfaces and workflow execution.

    554 GitHub stars~2.8k tokensUpdated today
    Backend & APIsAuto-check passed
  • Trpc

    majiayu000/claude-skill-registry

    tRPC end-to-end type safety, procedures, routers, middleware, and React integration.

    666 GitHub starsUsed in 1 repo~595 tokens
    Backend & APIsAuto-check: notes

More from FranciscoMoretti/chat-js

All 9 skills in this repo
  • Vitest Visual Testing

    FranciscoMoretti/chat-js

    Make @uiverify/vitest (Vitest browser-mode) captures deterministic so component visual tests stop coming back "changed" without a real change (flaky diffs).

    1.2k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Trpc Patterns

    FranciscoMoretti/chat-js

    Implement ChatJS tRPC routers, TanStack Query hooks, mutations, and cache invalidation.

    1.2k GitHub stars~288 tokensUpdated today
    Auto-check passed
  • Worktree Ports

    FranciscoMoretti/chat-js

    Discover and use stable per-app ports assigned to a local monorepo worktree.

    1.2k GitHub stars~231 tokensUpdated today
    Auto-check: notes
  • Generate Code Snippet

    FranciscoMoretti/chat-js

    Generate a concise, shareable code snippet URL for code.franciscomoretti.com.

    1.2k GitHub stars~178 tokensUpdated today
    Auto-check passed
  • Create Vercel AI Issue

    FranciscoMoretti/chat-js

    Create a well-formed GitHub issue in vercel/ai using the gh CLI.

    1.2k GitHub stars~203 tokensUpdated today
    Auto-check passed
  • Dev Auth Bypass

    FranciscoMoretti/chat-js

    Authenticate a browser against a local ChatJS app without OAuth.

    1.2k GitHub stars~141 tokensUpdated today
    Auto-check passed

Categories

Questions about Lazy Prefetch Pattern

What does Lazy Prefetch Pattern do?

Use the ChatJS React Query v5 lazy-prefetch pattern without blocking server rendering. Lazy Prefetch Pattern is an agent skill from FranciscoMoretti/chat-js. Use the ChatJS React Query v5 lazy-prefetch pattern without blocking server rendering.

When should I use Lazy Prefetch Pattern?

Lazy Prefetch Pattern fits situations like: prefetching tRPC queries in Next.js Server Components; changing query dehydration and hydration behavior in apps/chat.

How do I install Lazy Prefetch Pattern in Claude Code?

Run `npx skills add FranciscoMoretti/chat-js --skill lazy-prefetch-pattern -a claude-code`. Or copy the skill folder (.agents/skills/lazy-prefetch-pattern in FranciscoMoretti/chat-js) into .claude/skills/lazy-prefetch-pattern in your project. Claude Code loads it when a task matches its description.

How do I install Lazy Prefetch Pattern in Codex?

Run `npx skills add FranciscoMoretti/chat-js --skill lazy-prefetch-pattern -a codex`. Or copy the skill folder (.agents/skills/lazy-prefetch-pattern in FranciscoMoretti/chat-js) into .agents/skills/lazy-prefetch-pattern in your project. Codex loads it when a task matches its description.

Can I use Lazy Prefetch Pattern in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add FranciscoMoretti/chat-js --skill lazy-prefetch-pattern -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lazy-prefetch-pattern, .gemini/skills/lazy-prefetch-pattern, .github/skills/lazy-prefetch-pattern and .opencode/skills/lazy-prefetch-pattern in your project.

What does Lazy Prefetch Pattern need to run?

SKILL.md names no scripts, command-line tools or credentials: Lazy Prefetch Pattern is instructions for the agent only.

Does Lazy Prefetch Pattern access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Lazy Prefetch Pattern safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Lazy Prefetch Pattern use?

Lazy Prefetch Pattern is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lazy Prefetch Pattern use?

About 217 tokens (SKILL.md is roughly 868 characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Lazy Prefetch Pattern?

Skills that share tags, products or a category with Lazy Prefetch Pattern: Olore Trpc Latest (olorehq/olore, 103 stars), Trpc (pproenca/dot-skills, 214 stars), Backend Dev Guidelines (litefuse/litefuse, 100 stars) and Trpc Fullstack (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lazy Prefetch Pattern?

FranciscoMoretti (a GitHub user) maintains it in FranciscoMoretti/chat-js, which has 1,201 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.

Source: FranciscoMoretti/chat-js on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.