Back to Nuxt.js

nuxt-content

Nuxt.jsContent ManagementCMSMarkdownDatabase IntegrationMDCContent CollectionsLLMs
682🕒 2026-06-01Source ↗

Install this skill

npx skills add onmax/nuxt-skills

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

Nuxt Content facilitates content-driven application development by providing a structured, SQL-backed system for managing text and data. It moves beyond static file parsing by introducing typed collections defined in content.config.ts, allowing developers to enforce schemas on markdown, JSON, or YAML files. The framework supports remote sources like GitHub repositories and external APIs, while providing an intuitive query interface for fetching data. With native support for MDC (Markdown Components), users can integrate Vue components directly into content files. The system handles indexing, navigation generation, and database-backed storage using engines like SQLite or PostgreSQL. It acts as an abstraction layer that handles the parsing, validation, and delivery of static or dynamic content within a Nuxt application, ensuring consistent data structures across the entire frontend ecosystem.

When to Use This Skill

  • Building a documentation site with nested categories
  • Maintaining a technical blog with structured metadata and author schemas
  • Managing localized content for multilingual applications
  • Creating an interactive knowledge base with embedded UI components

How to Invoke This Skill

Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:

  • How do I define a new content collection in Nuxt?
  • Show me how to query my markdown files using Nuxt Content
  • How to render custom Vue components inside markdown?
  • Setting up GitHub as a remote content source
  • How to configure SQLite for my content database?

Pro Tips

  • 💡Always define clear schemas for your content collections using Zod within `defineCollection` to ensure data integrity and leverage full TypeScript type inference.
  • 💡For complex queries, chain multiple `queryCollection` methods like `.where()`, `.sort()`, and `.limit()` for precise content retrieval, optimizing performance by only fetching necessary data.
  • 💡Integrate `nuxt-llms` with your content workflow to dynamically generate content, summaries, or translations, significantly speeding up content creation and localization efforts.

What this skill does

  • Defines strictly typed content collections via Zod-like schemas
  • Queries content using a fluent, SQL-like API
  • Supports embedding interactive Vue components inside markdown files via MDC
  • Syncs content from remote sources like GitHub or external APIs
  • Generates automated navigation trees and search indices

When not to use it

  • Simple static pages that do not require structured data or search
  • Projects requiring heavy real-time backend database CRUD operations

Example workflow

  1. Initialize Nuxt Content in a Nuxt project
  2. Define a collection schema in content.config.ts
  3. Place markdown files in the content directory
  4. Use queryCollection in a page component to fetch data
  5. Pass query results to ContentRenderer for output
  6. Style the rendered output using prose classes

Prerequisites

  • Nuxt 3
  • Basic understanding of TypeScript

Pitfalls & limitations

  • !Schema mismatches will break the build or query returns
  • !Over-indexing large content sets can increase initial build times
  • !Mixing static local files with remote sources requires careful configuration

FAQ

What is the difference between page and data collections?
Page collections include a body property and are meant for rendering routes, whereas data collections are for structured items without associated HTML output.
Can I use external databases with Nuxt Content?
Yes, you can configure the content driver to use SQLite, PostgreSQL, or other SQL-compatible databases for persistent storage.
How are custom components rendered in markdown?
The MDC syntax allows you to use colon-prefixed tags or standard Vue components, which are parsed and rendered by the ContentRenderer component.
Do I need to read all documentation files?
No, load only the reference file corresponding to your current task, such as collections.md for schema definitions or querying.md for data fetching.

How it compares

Unlike manual file parsing which requires constant filesystem I/O and custom validation logic, this skill provides a pre-indexed, type-safe database layer that abstracts file system operations.

Source & trust

682 stars🕒 Updated 2026-06-01
📄 Full skill instructions — original source: onmax/nuxt-skills
# Nuxt Content v3

Progressive guidance for content-driven Nuxt apps with typed collections and SQL-backed queries.

## When to Use

Working with:

- Content collections (content.config.ts, defineCollection)
- Remote sources (GitHub repos, external APIs via defineCollectionSource)
- Content queries (queryCollection, navigation, search)
- MDC rendering (<ContentRenderer>, prose components)
- Database configuration (SQLite, PostgreSQL, D1, LibSQL)
- Content hooks (content:file:beforeParse, content:file:afterParse)
- i18n multi-language content
- NuxtStudio or preview mode
- LLMs integration (nuxt-llms)

**For writing documentation:** use document-writer skill
**For Nuxt basics:** use nuxt skill
**For NuxtHub deployment:** use nuxthub skill (NuxtHub v1 compatible)

## Available Guidance

Read specific files based on current work:

- **[references/collections.md](references/collections.md)** - defineCollection, schemas, sources, content.config.ts
- **[references/querying.md](references/querying.md)** - queryCollection, navigation, search, surroundings
- **[references/rendering.md](references/rendering.md)** - ContentRenderer, MDC syntax, prose components, Shiki
- **[references/config.md](references/config.md)** - Database setup, markdown plugins, renderer options
- **[references/studio.md](references/studio.md)** - NuxtStudio integration, preview mode, live editing

## Usage Pattern

**Progressive loading - only read what you need:**

- Setting up collections? → [references/collections.md](references/collections.md)
- Querying content? → [references/querying.md](references/querying.md)
- Rendering markdown/MDC? → [references/rendering.md](references/rendering.md)
- Configuring database/markdown? → [references/config.md](references/config.md)
- Using NuxtStudio? → [references/studio.md](references/studio.md)

**DO NOT read all files at once.** Load based on context:

- Editing content.config.ts → read collections.md
- Using queryCollection() → read querying.md
- Working with <ContentRenderer> or MDC → read rendering.md
- Configuring database or markdown → read config.md
- Setting up preview/studio → read studio.md

## Key Concepts

| Concept | Purpose |
| --------------- | ----------------------------------------------------------------- |
| Collections | Typed content groups with schemas |
| Page vs Data | page = routes + body, data = structured data only |
| Remote sources | source.repository for GitHub, defineCollectionSource for APIs |
| queryCollection | SQL-like fluent API for content |
| MDC | Vue components inside markdown |
| ContentRenderer | Renders parsed markdown body |

## Directory Structure

project/
├── content/ # Content files
│ ├── blog/ # Maps to 'blog' collection
│ └── .navigation.yml # Navigation metadata
├── components/content/ # MDC components
└── content.config.ts # Collection definitions


## Official Documentation

- Nuxt Content: https://content.nuxt.com
- MDC syntax: https://content.nuxt.com/docs/files/markdown#mdc-syntax
- Collections: https://content.nuxt.com/docs/collections/collections

## Token Efficiency

Main skill: ~300 tokens. Each sub-file: ~800-1200 tokens. Only load files relevant to current task.

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/nuxt-content/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/onmax/nuxt-skills/nuxt-content/SKILL.md
  • Cursor: ~/.cursor/skills/onmax/nuxt-skills/nuxt-content/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/onmax/nuxt-skills/nuxt-content/SKILL.md

🚀 Install with CLI:
npx skills add onmax/nuxt-skills

Read the Master Guide: Mastering Agent Skills

Related Skill Units

Recommended Rules

View more rules

Recommended Workflows

View more workflows

Recommended MCP Servers

View more MCP servers

Take It Further

Maximize your productivity with these powerful resources

📋

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
📖

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid nuxt.js issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under Nuxt.js and is published by Onmax, maintained in onmax/nuxt-skills.

← Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.