nuxt4-patterns

Standardize hydration-safe patterns and data fetching for Nuxt 4 SSR apps.

86|21|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/Jamkris/everything-gemini-code --skill nuxt4-patterns-jamkris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nuxt4-patterns
Source: https://github.com/Jamkris/everything-gemini-code/tree/main/skills/nuxt4-patterns
Command: npx skills add https://github.com/Jamkris/everything-gemini-code --skill nuxt4-patterns-jamkris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Nuxt 4 apps often face hydration mismatches between server-rendered HTML and client state, SSR-related data-fetching pitfalls, and inefficient route rule configurations that hurt performance and user experience.

Core Features & Use Cases

  • Hydration-safe patterns to keep SSR and client renders in sync without flicker.
  • Route rules and lazy loading guidance to optimize initial load times and SEO for Nuxt 4 sites.
  • SSR-friendly data fetching with useFetch, useAsyncData, and $fetch to avoid duplicate requests and ensure deterministic renders.
  • Use Case: debugging a Nuxt 4 app where server and client markup diverge due to non-deterministic data or browser-only code.

Quick Start

Apply hydration-safe patterns and SSR-friendly data fetching to stabilize your Nuxt 4 project.

Frequently Asked Questions about nuxt4-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix hydration mismatches in Nuxt 4 SSR?

Fix Nuxt 4 SSR hydration mismatches by applying hydration-safe patterns that keep server and client renders in sync without flicker. Standardizing data fetching prevents non-deterministic markup divergence.

What is the best way to use useFetch and useAsyncData for SSR data fetching?

Use SSR-friendly data fetching with useFetch and useAsyncData to avoid duplicate requests and ensure deterministic renders. These APIs synchronize server state with the client to prevent hydration errors.

How do route rules optimize initial load times in Nuxt 4?

Route rules optimize initial load times by configuring rendering strategies and lazy loading for Nuxt 4 sites. Proper route rules configuration improves performance and SEO across server-rendered routes.

Why does my Nuxt 4 server and client markup diverge?

Server and client markup diverges due to non-deterministic data or browser-only code. Eliminate hydration mismatches by standardizing data fetching and removing client-exclusive logic from initial renders.

Can I use $fetch for SSR-friendly data fetching in Nuxt 4?

Yes, use $fetch alongside useFetch and useAsyncData for SSR-friendly data fetching. Combining these APIs correctly avoids duplicate requests and ensures deterministic server-rendered output.

What are the limitations of hydration-safe patterns in Nuxt 4 SSR?

Hydration-safe patterns require knowledge of Nuxt 4 data fetching APIs and route rules. They cannot prevent mismatches caused by uncontrolled browser-only side effects or non-deterministic external data.