About nuxt-content
A task-focused skill for developing with Nuxt Content. It guides developers through inspecting collections and sources, choosing relevant references, implementing typed queries, and checking rendered routes.
Key features
- 01Collection and source inspection
- 02Typed collections and schemas
- 03Query and rendering guidance
- 04Typecheck and route verification
Use cases
- 01Adding or updating a content collection
- 02Debugging empty content queries
- 03Rendering Markdown or MDC pages
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ onmax/ nuxt-skills --skill nuxt-contentAfter installing, type/nuxt-contentin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/advanced.mdcollections.mdconfig.mdquerying.mdrendering.mdDetails
From the project READMENuxt Content
Workflow
- Inspect the installed
@nuxt/contentversion,content.config.ts, matching files undercontent/, and the Nuxt surface that consumes them. The branch is understood when the collection, source glob, schema, and consumer agree. - 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.
- 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.
Comments
Markdown supported