nuxt-content
Install this skill
npx skills add onmax/nuxt-skillsWorks 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
- Initialize Nuxt Content in a Nuxt project
- Define a collection schema in content.config.ts
- Place markdown files in the content directory
- Use queryCollection in a page component to fetch data
- Pass query results to ContentRenderer for output
- 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
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.
📄 Full skill instructions — original source: onmax/nuxt-skills
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)
- Click "Download" above
- In your project, create the directory:
.agent/skills/nuxt-content/ - Save the file as
SKILL.md - 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