Skip to content

Nuxt 4 data fetching, composables, and state management with useFetch, useAsyncData, useState, and Pinia.

CCM score
56 of 100
skills.sh installs
410
GitHub stars
257
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers composables, data fetching with useFetch and useAsyncData, and shared state with useState and Pinia
  • Includes reference files composables.md, data-fetching.md, and pinia-integration.md, loaded on demand by topic
  • Explains singleton useState versus per-call ref and SSR-safe patterns for browser APIs such as localStorage
  • Designed for Nuxt 4 developers debugging reactive data, shallow reactivity, refresh behavior, or caching

Install

$ npx -y skills add secondsky/claude-skills --skill nuxt-data -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Nuxt 4 Data Management

Composables, data fetching, and state management patterns for Nuxt 4 applications.

Quick Reference

Data Fetching Methods

MethodUse CaseSSRCachingReactive
useFetchSimple API callsYesYesYes
useAsyncDataCustom async logicYesYesYes
$fetchClient-side only, eventsNoNoNo

Composable Naming

PrefixPurposeExample
useState/logic composableuseAuth, useCart
fetchData fetching onlyfetchUsers (rare)

When to Load References

Load references/composables.md when:

  • Writing custom composables with complex state
  • Debugging state management issues or memory leaks
  • Implementing SSR-safe patterns with browser APIs
  • Building authentication or complex state composables
  • Understanding singleton vs per-call composable patterns

Details

Repository
github.com/secondsky/claude-skills
Category
Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the nuxt-data skill cover for Nuxt 4 apps?

The nuxt-data skill covers data management in Nuxt 4, including custom composables, data fetching with useFetch and useAsyncData, and shared state with useState and Pinia. It also helps debug reactive data issues and implement SSR-safe state patterns.

How do I install the nuxt-data skill?

Run npx -y skills add secondsky/claude-skills --skill nuxt-data -y in your project to install it. Once installed, the agent can write useFetch and useAsyncData calls, build composables with useState, and set up Pinia stores.

Where does nuxt-data stand in the Frontend and UI Code category?

nuxt-data is listed in the Frontend and UI Code category on Claude Marketplaces, alongside vercel-react-best-practices, web-design-guidelines, design-taste-frontend, vercel-composition-patterns and lark-apps. Its focus is narrower than those, centered on Nuxt data flow rather than general UI guidance. It goes into reactivity details such as shallow versus deep reactivity in Nuxt 4.

When should I use useFetch instead of useAsyncData in Nuxt 4 with this skill?

The skill's quick reference suggests useFetch for simple API calls and useAsyncData for custom async logic, both of which run on the server and cache results. It also notes that $fetch fits client-side only work such as events. Shallow reactivity is the Nuxt 4 default, so mutating fetched data needs deep: true or a refresh.

How does useState differ from ref in this skill's guidance?

The skill explains that useState creates shared, SSR-safe state that persists across component instances, while ref only holds local component state. Calling ref inside a composable creates a new instance on every call, so it will not be shared. The skill's rule is to use useState for global state and ref for local state only.

More from secondsky/claude-skills

All 116

Similar to Nuxt Data

More Frontend & UI Code