AGENT SKILL

nuxt-content

Build typed, content-driven Nuxt applications with @nuxt/content. Use when working with content.config.ts, collections, queryCollection, Markdown or MDC rendering, content databases, hooks, custom sources, search, or Content v2 migrations.

适用职业内容创作者
License 许可
MIT
最近更新
2026-11-15
Stars
★ 0
Forks
0

01 前言 Front Matter

name
nuxt-content
license
MIT
description
Build typed, content-driven Nuxt applications with @nuxt/content. Use when working with content.config.ts, collections, queryCollection, Markdown or MDC rendering, content databases, hooks, custom sources, search, or Content v2 migrations.

02 资源文件 5

03 SKILL.md 正文

Nuxt Content

Workflow

  1. Inspect the installed @nuxt/content version, content.config.ts, matching files under content/, and the Nuxt surface that consumes them. The branch is understood when the collection, source glob, schema, and consumer agree.
  2. Open the smallest matching guide below. Apply Nuxt Content guidance only to content-owned APIs; use Nuxt, Nuxt Studio, Nuxt UI, or Vue guidance when those packages own the remaining surface.
  3. Implement with typed collections and payload-backed Nuxt data loading. The change is complete when collection types resolve, the intended query returns the expected document shape, and the rendered route works in the target rendering mode.

Routing

Task Open
Collection types, schemas, indexes, local/remote sources, or locale prefixes Collections
Filtering, sorting, pagination, navigation, surroundings, or search Querying
Markdown, MDC, ContentRenderer, prose components, or code highlighting Rendering
Database adapters, markdown processing, renderer aliases, or deployment storage Configuration
Hooks, transformers, custom sources, raw content, debugging, or Content v2 migration Advanced
Visual editing, authentication, media, drafts, or Git publishing nuxt-studio skill
Writing or restructuring documentation prose document-writer skill

Baseline

// content.config.ts
import { defineCollection, defineContentConfig } from '@nuxt/content'
import { z } from 'zod'

export default defineContentConfig({
  collections: {
    docs: defineCollection({
      type: 'page',
      source: 'docs/**',
      schema: z.object({
        updatedAt: z.date().optional(),
      }),
    }),
  },
})
<script setup lang="ts">
const route = useRoute()
const { data: page } = await useAsyncData(route.path, () => {
  return queryCollection('docs').path(route.path).first()
})
</script>

<template>
  <ContentRenderer v-if="page" :value="page" />
</template>

Use npx nuxi typecheck to verify generated collection types. When a query is empty, confirm that its collection source includes the file—especially .navigation.yml—before changing query logic.

04 同仓库更多 Skills

wolfstar-project
wolfstar-project/wolfstar.rocks

web-perf

Audit, diagnose, or optimize website loading and interaction performance, Core Web Vitals, and Lighthouse performance scores.

★ 0
wolfstar-project
wolfstar-project/wolfstar.rocks

unlighthouse

Run Google Lighthouse on every page of a site with the unlighthouse CLI, and fail CI on low scores with unlighthouse-ci. Use when a task mentions unlighthouse, unlighthouse-ci, site-wide Lighthouse scans, performance budgets in CI, unlighthouse.config.ts, defineUnlighthouseConfig, scanner.exclude, dynamic sampling, the authenticate hook, or a scan that never exits, skips pages, or refuses to clear its output folder.

★ 0
wolfstar-project
wolfstar-project/wolfstar.rocks

performance-optimization

Optimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.

★ 0
wolfstar-project
wolfstar-project/wolfstar.rocks

fixing-accessibility

Audit and fix HTML accessibility issues including ARIA labels, keyboard navigation, focus management, color contrast, and form errors. Use when adding interactive controls, forms, dialogs, or reviewing WCAG compliance.

★ 0
wolfstar-project
wolfstar-project/wolfstar.rocks

better-accessibility

Reviews and fixes keyboard and focus behavior, ARIA, accessible names, forms, screen-reader announcements, motion and zoom in your project against WCAG 2.2.

★ 0
wolfstar-project
wolfstar-project/wolfstar.rocks

web-perf

Audit, diagnose, or optimize website loading and interaction performance, Core Web Vitals, and Lighthouse performance scores.

★ 0