Skip to main content
skill CX Codex

nuxt-content — Claude Code skill for typed Nuxt content

A skill for @nuxt/content work: collections, schemas, queries and Markdown rendering. Useful once a Nuxt project grows and content needs types.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add onmax/nuxt-skills --skill nuxt-content -a claude-code
Open on GitHub

What nuxt-content does

The skill walks a task in three steps. First it inspects the installed @nuxt/content version, content.config.ts, the matching files under content/, and whatever Nuxt surface consumes them. The branch is understood when the collection, source glob, schema and consumer agree.

Then it opens one of five references: collections, querying, rendering, configuration, advanced. Inside you get collection types, schemas and indexes, filtering and sorting, MDC and ContentRenderer, database adapters, hooks, custom sources, search, and the move off Content v2. A routing table sends visual editing and Git publishing to the nuxt-studio skill, and documentation prose to document-writer.

The baseline example defines a page collection with a docs/** source and a zod schema, then queries it in Vue with queryCollection('docs').path(route.path).first() inside useAsyncData. Run npx nuxi typecheck to verify the generated types. When a query comes back empty, check that the file is covered by the collection source first — .navigation.yml included — before touching query logic. That order matters, because the glob is the usual culprit.

What it helps with

  • declare a page collection with a zod schema
  • render a Markdown page through ContentRenderer
  • filter and sort documents in queryCollection
  • wire up a custom content source or hook
  • migrate a project off Content v2

Example prompts for the agent

  • Describe the docs collection in content.config.ts and wire it to a page
  • Why does queryCollection return an empty array for this route?
  • Help me migrate from Content v2 to the current version

How to install nuxt-content

1Skills CLI (Vercel)

npx skills add onmax/nuxt-skills --skill nuxt-content -a claude-code

2Manually: put the files in place

~/.claude/skills/nuxt-content/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/nuxt-content/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about nuxt-content

How do I install nuxt-content in Claude?

Run npx skills add onmax/nuxt-skills --skill nuxt-content -a claude-code. The skill file then lives at ~/.claude/skills/nuxt-content/SKILL.md.

What does nuxt-content do?

It guides typed Nuxt apps built on @nuxt/content: collections, schemas, queries, Markdown and MDC rendering, hooks and custom sources.

Which other skills does it hand off to?

Visual editing, authentication, media and drafts go to the nuxt-studio skill, while writing and restructuring documentation prose goes to document-writer.

Source text

SKILL.md · MIT
---
name: nuxt-content
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.
license: MIT
---

# 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](references/collections.md) |
| Filtering, sorting, pagination, navigation, surroundings, or search                  | [Querying](references/querying.md)       |
| Markdown, MDC, `ContentRenderer`, prose components, or code highlighting             | [Rendering](references/rendering.md)     |
| Database adapters, markdown processing, renderer aliases, or deployment storage      | [Configuration](references/config.md)    |
| Hooks, transformers, custom sources, raw content, debugging, or Content v2 migration | [Advanced](references/advanced.md)       |
| Visual editing, authentication, media, drafts, or Git publishing                     | `nuxt-studio` skill                      |
| Writing or restructuring documentation prose                                         | `document-writer` skill                  |

## Baseline

```ts
// 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(),
      }),
    }),
  },
})
```

```vue
<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.

© onmax · MIT · onmax/nuxt-skills

Similar skills

Everything for Frontend and UI →

From the same set8

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor