Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

nuxt

/nuxt

Pomaga w pracy z Nuxt 3: Vue 3, auto-importy, routing oparty na plikach, silnik Nitro i renderowanie uniwersalne w aplikacjach full-stack zoptymalizowanych pod SEO.

Repozytorium
Agent-Skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
01.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
1
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.

Co robi i kiedy

Pomaga w pracy z Nuxt 3: Vue 3, auto-importy, routing oparty na plikach, silnik Nitro i renderowanie uniwersalne w aplikacjach full-stack zoptymalizowanych pod SEO.

Oryginalny opis (EN)

Expert Nuxt 3 assistance covering Vue 3, auto-imports, file-based routing, Nitro server engine, and universal rendering. Use when developing SEO-optimized full-stack Vue applications.

Jak działa

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Sekcje z nagłówków SKILL.md, w oryginale · 167 linii, 589 słów
Podgląd SKILL.md
---
name: nuxt
description: Expert Nuxt 3 assistance covering Vue 3, auto-imports, file-based routing, Nitro server engine, and universal rendering. Use when developing SEO-optimized full-stack Vue applications.
---

# Nuxt

Nuxt is an intuitive full-stack framework for Vue.js, providing automatic routing, server-side rendering, static site generation, and optimized Nitro server engine performance.

## When to Use

- **Full-Stack Vue 3 Web Applications**: Nuxt 3/4 with universal SSR, static generation (SSG), and auto-imports.
- **Enterprise SEO & Fast Loading Pages**: Marketing sites and e-commerce stores requiring dynamic meta tags and instant rendering.
- **Edge-Ready Server Engine (Nitro)**: Deploying serverless functions seamlessly across Cloudflare, Vercel, Netlify, and Node.
- **Modular Frontend Architecture**: Utilizing first-party modules (`@nuxtjs/tailwindcss`, `@pinia/nuxt`, `@vueuse/nuxt`).

## Quick Start

Nuxt auto-imports components and composables.

```vue
<script setup>
// useFetch is auto-imported
const { data: quote } = await useFetch("/api/quote");
</script>

<template>
  <blockquote>{{ quote.text }}</blockquote>
</template>
```

## Core Concepts

### Universal Data Fetching with useFetch & useAsyncData

SSR-friendly data fetching with automated deduplication:

```vue
<!-- pages/products/[id].vue -->
<script setup lang="ts">
interface Product {
  id: number;
  title: string;
  price: number;
}

const route = useRoute();
const productId = route.params.id;

const {
  data: product,
  pending,
  error,
} = await useFetch<Product>(`/api/products/${productId}`, {
  key: `product-${productId}`,
  lazy: false,
});

useSeoMeta({
  title: () =>
    product.value?.title ? `${product.value.title} - Store` : "Loading...",
  description: () => `Buy ${product.value?.title} online now.`,
});
</script>

<template>
  <div class="product-page">
    <div v-if="pending">Loading product details...</div>
    <div v-else-if="error">Error loading product: {{ error.message }}</div>
    <div v-else-if="product">
      <h1>{{ product.title }}</h1>
      <p class="price">${{ product.price }}</p>
    </div>
  </div>
</template>
```

### Nitro Server Engine API Routes

Creating backend API endpoints directly inside `server/api`:

```typescript
// server/api/products/[id].ts
export default defineEventHandler(async (event) => {
  const id = getRouterParam(event, "id");

  if (!id || isNaN(Number(id))) {
    throw createError({
      statusCode: 400,
      statusMessage: "Invalid product ID",
    });
  }

  return {
    id: Number(id),
    title: `Premium Mechanical Keyboard #${id}`,
    price: 149.99,
  };
});
```

### Nuxt Middleware & Route Guards

Client and server route authentication verification:

```typescript
// middleware/auth.ts
export default defineNuxtRouteMiddleware((to, from) => {
  const user = useCookie("auth_token");

  if (!user.value && to.path.startsWith("/dashboard")) {
    return navigateTo("/login");
  }
});
```

## Common Patterns

### Server API Route with useFetch Data Hydration

**Problem**: Client-side fetch triggers content flash and hurts search engine indexing.

**Solution**:
Use Nuxt server routes with universal `useFetch`:

```typescript
// server/api/products.ts
export default defineEventHandler(async (event) => {
  return await db.products.findMany({ take: 20 });
});

// pages/products.vue
<script setup>
const { data: products, pending, error } = await useFetch('/api/products');
</script>

<template>
  <div v-if="pending">Loading products...</div>
  <ul v-else>
    <li v-for="p in products" :key="p.id">{{ p.name }} - ${{ p.price }}</li>
  </ul>
</template>
```

## Best Practices

**Do**:

- Use `useFetch` inside `<script setup>` for top-level component data fetching to eliminate SSR double-fetch.
- Leverage Nuxt Server API routes (`server/api/`) for backend proxying and secret key protection.
- Use `useSeoMeta()` for reactive, type-safe SEO management.
- Enable Nitro route rules (`routeRules`) for granular caching and ISR per page.

**Don't**:

- Use standard `fetch()` directly in setup scripts; it executes on both server and client without hydration transfer.
- Access `window` or `document` outside `onMounted` or without checking `import.meta.client`.
- Mutate server-side state across user requests.

## Troubleshooting

| Error                                             | Cause                                                           | Solution                                                                    |
| :------------------------------------------------ | :-------------------------------------------------------------- | :-------------------------------------------------------------------------- |
| `window is not defined / document is not defined` | Accessing browser DOM during server-side prerender step.        | Wrap browser code in `onMounted(() => { ... })` or `<ClientOnly>`.          |
| `[nuxt] [request error] [unhandled] 500`          | Server route threw unhandled exception.                         | Check terminal console output for server stack trace and wrap in try/catch. |
| `Component not found on auto-import`              | Nested folder structure requires path prefix in component name. | Follow naming convention: `components/base/Button.vue` -> `<BaseButton />`. |

## References

- [Nuxt Documentation](https://nuxt.com/)

Wersje

RepozytoriumWynikLicencja
Ta strona · G1Joshi/Agent-Skills100MIT
TerminalSkills/skills100Apache-2.0
vercel-labs/emulate100Apache-2.0
chrishuffman5/domain-expert100MIT
PIXARTSeu/Synapse100AGPL-3.0
dkbnull/hello-skill96MIT
kimjinwoo4/vue-skills90MIT
pleaseai/claude-code-plugins85MIT
YuDefine/nuxt-supabase-starter85MIT

Migawka bazy z 13.11.2026 · wersja paczki 2438898b78b5 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100nuxt-fullstack
    Pomaga tworzyć uniwersalne aplikacje Vue full-stack w Nuxt 3, z routingiem opartym na plikach, silnikiem Nitro i modułami SEO.
  • 95nuxt3
    Prowadzi przez pełnostosowy framework Vue Nuxt 3: routing oparty na plikach, pobieranie danych, trasy serwerowe i automatyczne importy.
  • 100nuxt-core
    Obejmuje rdzeń Nuxt 5: konfigurację projektu, routing, SEO, obsługę błędów oraz ustawienia Vite 8 i Nitro v3, także przy migracji konfiguracji.
  • 90vue-nuxt
    Buduje i aktualizuje aplikacje Vue i Nuxt z renderowaniem po stronie serwera i typowanymi granicami danych.
  • 95nuxt-server
    Prowadzi przez backend w Nuxt 5 z Nitro v3 i h3 v2: trasy API, middleware, integrację baz danych D1 i Drizzle oraz migrację z Nitro v2.
  • 90vue-nuxt
    Pomaga budować aplikacje Nuxt 3: routing w pages, useFetch, trasy serwerowe, auto-importy, układy i warstwy.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.