nuxt-content — скилл для Claude Code: типизированный контент в Nuxt
Скилл для работы с @nuxt/content: коллекции, схемы, запросы и рендер Markdown. Пригодится, когда проект на Nuxt растёт и контент пора приводить к типам.
npx skills add onmax/nuxt-skills --skill nuxt-content -a claude-codeЧто делает nuxt-content
Скилл разбирает задачу по трём шагам. Сначала смотрит установленную версию @nuxt/content, файл content.config.ts, файлы в content/ и то место в Nuxt, которое их потребляет. Ветка считается понятой, когда коллекция, glob источника, схема и потребитель сходятся между собой.
Дальше открывается один нужный справочник из пяти: коллекции, запросы, рендеринг, конфигурация, продвинутое. Внутри — типы коллекций, схемы и индексы, фильтрация и сортировка, MDC и ContentRenderer, адаптеры баз данных, хуки, свои источники, поиск и переезд с Content v2. Есть таблица маршрутизации: визуальное редактирование и Git-публикация уходят в скилл nuxt-studio, а правка прозы документации — в document-writer.
Базовый пример даёт defineCollection с типом page, источником docs/** и схемой на zod, а на стороне Vue — queryCollection('docs').path(route.path).first() через useAsyncData. Типы проверяются командой npx nuxi typecheck. Если запрос возвращает пусто, сначала проверьте, что файл попадает в источник коллекции — особенно .navigation.yml — и только потом трогайте логику запроса. Это экономит время: причина чаще в glob, а не в фильтре.
Какие задачи решает
- объявить коллекцию с типом
pageи схемой на zod - собрать страницу из Markdown через
ContentRenderer - отфильтровать и отсортировать документы в
queryCollection - подключить свой источник контента или хук
- перевести проект с Content v2 на актуальную версию
Примеры запросов агенту
- Опиши коллекцию docs в content.config.ts и подключи её к странице
- Почему queryCollection возвращает пустой массив для этой страницы?
- Помоги переехать с Content v2 на новую версию
Как установить nuxt-content
1Через Skills CLI (Vercel)
npx skills add onmax/nuxt-skills --skill nuxt-content -a claude-code2Вручную: положить файлы
~/.claude/skills/nuxt-content/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/nuxt-content/
1Через Skills CLI (Vercel)
npx skills add onmax/nuxt-skills --skill nuxt-content -a codex2Вручную: положить файлы
.agents/skills/nuxt-content/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add onmax/nuxt-skills --skill nuxt-content -a cursor2Вручную: положить файлы
.cursor/skills/nuxt-content/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install onmax/nuxt-skills nuxt-content2Вручную: положить файлы
.github/skills/nuxt-content/SKILL.md1Через Skills CLI (Vercel)
npx skills add onmax/nuxt-skills --skill nuxt-content -a gemini-cli2Командой платформы
gemini skills install https://github.com/onmax/nuxt-skills --path skills/nuxt-contentВручную: положить файлы
.devin/skills/nuxt-content/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add onmax/nuxt-skills --skill nuxt-content -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о nuxt-content
Как установить nuxt-content в Claude?
Выполните npx skills add onmax/nuxt-skills --skill nuxt-content -a claude-code. После этого файл скилла лежит в ~/.claude/skills/nuxt-content/SKILL.md.
Что делает nuxt-content?
Помогает строить типизированные приложения на Nuxt с @nuxt/content: коллекции, схемы, запросы, рендер Markdown и MDC, хуки и свои источники.
С какими ещё скиллами он работает вместе?
Визуальное редактирование, авторизация, медиа и черновики отданы скиллу nuxt-studio, а написание и перестройка прозы документации — скиллу document-writer.
Исходный текст
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